Skip to content

Commit 4be4c4c

Browse files
authored
Add M5Stack FIRE (#90)
* Add M5Stack FIRE * Adjusting naming * Adding fire and updating nugets * adjusting buzzer version and adding gitversioning * fixing fire nuget again * nit * m5core nuspec * adjusting for sonar cloud
1 parent 8dc2e15 commit 4be4c4c

File tree

21 files changed

+1040
-26
lines changed

21 files changed

+1040
-26
lines changed

README.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
| nanoFramework.M5StickCPlus (preview) | [![Build Status](https://dev.azure.com/nanoframework/nanoFramework.M5Stack/_apis/build/status/nanoFramework.M5Stack?repoName=nanoframework%2FnanoFramework.M5Stack&branchName=develop)](https://dev.azure.com/nanoframework/nanoFramework.M5Stack/_build/latest?definitionId=52&repoName=nanoframework%2FnanoFramework.M5Stack&branchName=develop) | [![NuGet](https://img.shields.io/nuget/vpre/nanoFramework.M5StickCPlus.svg?label=NuGet&style=flat&logo=nuget)](https://www.nuget.org/packages/nanoFramework.M5StickCPlus/) |
1919
| nanoFramework.M5Core2 | [![Build Status](https://dev.azure.com/nanoframework/nanoFramework.M5Stack/_apis/build/status/nanoFramework.M5Stack?repoName=nanoframework%2FnanoFramework.M5Stack&branchName=main)](https://dev.azure.com/nanoframework/nanoFramework.M5Stack/_build/latest?definitionId=52&repoName=nanoframework%2FnanoFramework.M5Stack&branchName=main) | [![NuGet](https://img.shields.io/nuget/v/nanoFramework.M5Core2.svg?label=NuGet&style=flat&logo=nuget)](https://www.nuget.org/packages/nanoFramework.M5Core2/) |
2020
| nanoFramework.M5Core2 (preview) | [![Build Status](https://dev.azure.com/nanoframework/nanoFramework.M5Stack/_apis/build/status/nanoFramework.M5Stack?repoName=nanoframework%2FnanoFramework.M5Stack&branchName=develop)](https://dev.azure.com/nanoframework/nanoFramework.M5Stack/_build/latest?definitionId=52&repoName=nanoframework%2FnanoFramework.M5Stack&branchName=develop) | [![NuGet](https://img.shields.io/nuget/vpre/nanoFramework.M5Core2.svg?label=NuGet&style=flat&logo=nuget)](https://www.nuget.org/packages/nanoFramework.M5Core2/) |
21+
| nanoFramework.Fire | [![Build Status](https://dev.azure.com/nanoframework/nanoFramework.M5Stack/_apis/build/status/nanoFramework.M5Stack?repoName=nanoframework%2FnanoFramework.M5Stack&branchName=main)](https://dev.azure.com/nanoframework/nanoFramework.M5Stack/_build/latest?definitionId=52&repoName=nanoframework%2FnanoFramework.M5Stack&branchName=main) | [![NuGet](https://img.shields.io/nuget/v/nanoFramework.Fire.svg?label=NuGet&style=flat&logo=nuget)](https://www.nuget.org/packages/nanoFramework.Fire/) |
22+
| nanoFramework.Fire (preview) | [![Build Status](https://dev.azure.com/nanoframework/nanoFramework.M5Stack/_apis/build/status/nanoFramework.M5Stack?repoName=nanoframework%2FnanoFramework.M5Stack&branchName=develop)](https://dev.azure.com/nanoframework/nanoFramework.M5Stack/_build/latest?definitionId=52&repoName=nanoframework%2FnanoFramework.M5Stack&branchName=develop) | [![NuGet](https://img.shields.io/nuget/vpre/nanoFramework.Fire.svg?label=NuGet&style=flat&logo=nuget)](https://www.nuget.org/packages/nanoFramework.Fire/) |
2123
| nanoFramework.AtomLite | [![Build Status](https://dev.azure.com/nanoframework/nanoFramework.M5Stack/_apis/build/status/nanoFramework.M5Stack?repoName=nanoframework%2FnanoFramework.M5Stack&branchName=main)](https://dev.azure.com/nanoframework/nanoFramework.M5Stack/_build/latest?definitionId=52&repoName=nanoframework%2FnanoFramework.M5Stack&branchName=main) | [![NuGet](https://img.shields.io/nuget/v/nanoFramework.AtomLite.svg?label=NuGet&style=flat&logo=nuget)](https://www.nuget.org/packages/nanoFramework.AtomLite/) |
2224
| nanoFramework.AtomLite (preview) | [![Build Status](https://dev.azure.com/nanoframework/nanoFramework.M5Stack/_apis/build/status/nanoFramework.M5Stack?repoName=nanoframework%2FnanoFramework.M5Stack&branchName=develop)](https://dev.azure.com/nanoframework/nanoFramework.M5Stack/_build/latest?definitionId=52&repoName=nanoframework%2FnanoFramework.M5Stack&branchName=develop) | [![NuGet](https://img.shields.io/nuget/vpre/nanoFramework.AtomLite.svg?label=NuGet&style=flat&logo=nuget)](https://www.nuget.org/packages/nanoFramework.AtomLite/) |
2325
| nanoFramework.AtomMatrix | [![Build Status](https://dev.azure.com/nanoframework/nanoFramework.M5Stack/_apis/build/status/nanoFramework.M5Stack?repoName=nanoframework%2FnanoFramework.M5Stack&branchName=main)](https://dev.azure.com/nanoframework/nanoFramework.M5Stack/_build/latest?definitionId=52&repoName=nanoframework%2FnanoFramework.M5Stack&branchName=main) | [![NuGet](https://img.shields.io/nuget/v/nanoFramework.AtomMatrix.svg?label=NuGet&style=flat&logo=nuget)](https://www.nuget.org/packages/nanoFramework.AtomMatrix/) |
@@ -31,6 +33,7 @@ These NuGet packages provide a support for M5Stack products:
3133
- [M5StickC](https://docs.m5stack.com/en/core/m5stickc)
3234
- [M5StickCPlus](https://docs.m5stack.com/en/core/m5stickc_plus)
3335
- [M5Core2](https://docs.m5stack.com/en/core/core2)
36+
- [Fire](https://docs.m5stack.com/en/core/fire)
3437
- [Atom Lite](https://docs.m5stack.com/en/core/atom_lite)
3538
- [Atom Matrix](https://docs.m5stack.com/en/core/atom_matrix)
3639

@@ -58,7 +61,7 @@ For the M5StickCPlus:
5861
nanoff --target M5StickCPlus --update --preview --serialport COM3
5962
```
6063

61-
For the M5Core2:
64+
For the M5Core2 and Fire:
6265

6366
```shell
6467
nanoff --target M5Core2 --update --preview --serialport COM3
@@ -137,13 +140,13 @@ nanoFramework.Console.Write("This is white on black again and on 9th line");
137140

138141
> Note: You can change the default font as well, you need to provide it as a property. The Cursor positions are calculated with the largest possible character.
139142
140-
M5Core2 has SPRAM, so you can get a full screen buffer as well. Refer to the [Graphics samples](https://github.com/nanoframework/Samples#graphics-for-screens) to understand all you can do with it.
143+
M5Core2 and Fire have SPRAM, so you can get a full screen buffer as well. Refer to the [Graphics samples](https://github.com/nanoframework/Samples#graphics-for-screens) to understand all you can do with it.
141144

142145
### Buttons
143146

144147
The main buttons except the power buttons are exposed.
145148

146-
On the M5Stack they are called `ButtonLeft`, `ButtonCenter` and `ButtonRight`. You can get access to the events as well. For example:
149+
On the M5Stack and Fire they are called `ButtonLeft`, `ButtonCenter` and `ButtonRight`. You can get access to the events as well. For example:
147150

148151
```csharp
149152
M5Stack.ButtonLeft.Press += (sender, e) =>
@@ -272,7 +275,7 @@ The `TouchEventCategory` enum is a flag and can combine buttons and states. The
272275

273276
The M5Core and M5StickC/CPlus are exposing their power management elements. It is not recommended to change any default value except if you know what you are doing.
274277

275-
Please refer to the detailed examples for the [AXP192](https://github.com/nanoframework/nanoFramework.IoT.Device/blob/develop/devices/Axp192/README.md) used in the M5StickC/CPlus; M5Core2 and [IP5306](https://github.com/nanoframework/nanoFramework.IoT.Device/blob/develop/devices/Ip5306/README.md) for the M5Core.
278+
Please refer to the detailed examples for the [AXP192](https://github.com/nanoframework/nanoFramework.IoT.Device/blob/develop/devices/Axp192/README.md) used in the M5StickC/CPlus; M5Core2 and [IP5306](https://github.com/nanoframework/nanoFramework.IoT.Device/blob/develop/devices/Ip5306/README.md) for the M5Core and Fire.
276279

277280
### Accelerometer and Gyroscope
278281

@@ -322,7 +325,7 @@ Refer to the [SerialPort documentation](https://github.com/nanoframework/System.
322325

323326
### ADC Channels
324327

325-
ADC Channels are pre setup on the M5Core, M5Core2 and Atom Lite/Matrix, access them like this:
328+
ADC Channels are pre setup on the M5Core, M5Core2, Fire and Atom Lite/Matrix, access them like this:
326329

327330
```csharp
328331
// This will give you the ADC1 channel 7 which is on pin 35 of M5Core
@@ -343,7 +346,7 @@ I2cDevice myDevice = M5Core.GetGrove(0x42);
343346

344347
### SPI Device
345348

346-
The M5Core, M5Core2 and Atom Lite/Matrix provides as well an `SpiDevice`:
349+
The M5Core, M5Core2, Fire and Atom Lite/Matrix provides as well an `SpiDevice`:
347350

348351
```csharp
349352
// In this case GPIO5 will be used as chip select:
@@ -352,7 +355,7 @@ SpiDevice mySpi = M5Core.GetSpiDevice(5);
352355

353356
### GPIO Controller
354357

355-
Similar as previously, you can get the `GpioController` on any of the M5Core, M5Core2 and M5StickC/CPlus:
358+
Similar as previously, you can get the `GpioController` on any of the M5Core, M5Core2, Fire and M5StickC/CPlus:
356359

357360
```csharp
358361
// This will open the GPIO 36 as output
@@ -361,7 +364,7 @@ var pin5 = M5StickC.GpioController.OpenPin(36, PinMode.Output);
361364

362365
### DAC
363366

364-
The M5Core, M5Core2 and Atom Lite/Matrix exposes 2 DAC and you can access them thru the `Dac1` and `Dac2` properties. Refer to the [DAC documentation](https://github.com/nanoframework/System.Device.Dac) for more information.
367+
The M5Core, M5Core2, Fire and Atom Lite/Matrix exposes 2 DAC and you can access them thru the `Dac1` and `Dac2` properties. Refer to the [DAC documentation](https://github.com/nanoframework/System.Device.Dac) for more information.
365368

366369
### Led
367370

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project ToolsVersion="Current" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<PropertyGroup Label="Globals">
4+
<NanoFrameworkProjectSystemPath>$(MSBuildExtensionsPath)\nanoFramework\v1.0\</NanoFrameworkProjectSystemPath>
5+
</PropertyGroup>
6+
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.Default.props" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.Default.props')" />
7+
<PropertyGroup>
8+
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
9+
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
10+
<ProjectTypeGuids>{11A8DD76-328B-46DF-9F39-F559912D0360};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
11+
<ProjectGuid>5ff00f7c-8ed8-4468-9959-497ce8c5b1af</ProjectGuid>
12+
<OutputType>Exe</OutputType>
13+
<AppDesignerFolder>Properties</AppDesignerFolder>
14+
<FileAlignment>512</FileAlignment>
15+
<RootNamespace>FiteTestApp</RootNamespace>
16+
<AssemblyName>FiteTestApp</AssemblyName>
17+
<TargetFrameworkVersion>v1.0</TargetFrameworkVersion>
18+
</PropertyGroup>
19+
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.props" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.props')" />
20+
<ItemGroup>
21+
<Compile Include="Program.cs" />
22+
<Compile Include="Properties\AssemblyInfo.cs" />
23+
</ItemGroup>
24+
<ItemGroup>
25+
<ProjectReference Include="..\..\nanoFramework.Fire\nanoFramework.Fire.nfproj" />
26+
</ItemGroup>
27+
<ItemGroup>
28+
<Reference Include="Iot.Device.Bmm150">
29+
<HintPath>..\..\packages\nanoFramework.Iot.Device.Bmm150.1.0.288-preview.86\lib\Iot.Device.Bmm150.dll</HintPath>
30+
</Reference>
31+
<Reference Include="Iot.Device.Button">
32+
<HintPath>..\..\packages\nanoFramework.Iot.Device.Button.1.0.288-preview.86\lib\Iot.Device.Button.dll</HintPath>
33+
</Reference>
34+
<Reference Include="Iot.Device.Buzzer">
35+
<HintPath>..\..\packages\nanoFramework.Iot.Device.Buzzer.1.0.288-preview.86\lib\Iot.Device.Buzzer.dll</HintPath>
36+
</Reference>
37+
<Reference Include="Iot.Device.Ip5306">
38+
<HintPath>..\..\packages\nanoFramework.Iot.Device.Ip5306.1.0.288-preview.86\lib\Iot.Device.Ip5306.dll</HintPath>
39+
</Reference>
40+
<Reference Include="Iot.Device.Mpu6886">
41+
<HintPath>..\..\packages\nanoFramework.Iot.Device.Mpu6886.1.0.288-preview.86\lib\Iot.Device.Mpu6886.dll</HintPath>
42+
</Reference>
43+
<Reference Include="mscorlib">
44+
<HintPath>..\..\packages\nanoFramework.CoreLibrary.1.12.0-preview.9\lib\mscorlib.dll</HintPath>
45+
</Reference>
46+
<Reference Include="nanoFramework.Graphics">
47+
<HintPath>..\..\packages\nanoFramework.Graphics.1.0.2-preview.15\lib\nanoFramework.Graphics.dll</HintPath>
48+
</Reference>
49+
<Reference Include="nanoFramework.ResourceManager">
50+
<HintPath>..\..\packages\nanoFramework.ResourceManager.1.1.4-preview.8\lib\nanoFramework.ResourceManager.dll</HintPath>
51+
</Reference>
52+
<Reference Include="nanoFramework.Runtime.Events">
53+
<HintPath>..\..\packages\nanoFramework.Runtime.Events.1.10.0-preview.8\lib\nanoFramework.Runtime.Events.dll</HintPath>
54+
</Reference>
55+
<Reference Include="nanoFramework.Runtime.Native">
56+
<HintPath>..\..\packages\nanoFramework.Runtime.Native.1.5.4-preview.5\lib\nanoFramework.Runtime.Native.dll</HintPath>
57+
</Reference>
58+
<Reference Include="nanoFramework.System.Collections">
59+
<HintPath>..\..\packages\nanoFramework.System.Collections.1.4.0-preview.21\lib\nanoFramework.System.Collections.dll</HintPath>
60+
</Reference>
61+
<Reference Include="System.Buffers.Binary.BinaryPrimitives">
62+
<HintPath>..\..\packages\nanoFramework.System.Buffers.Binary.BinaryPrimitives.1.0.288-preview.64\lib\System.Buffers.Binary.BinaryPrimitives.dll</HintPath>
63+
</Reference>
64+
<Reference Include="System.Device.Adc">
65+
<HintPath>..\..\packages\nanoFramework.System.Device.Adc.1.0.2-preview.8\lib\System.Device.Adc.dll</HintPath>
66+
</Reference>
67+
<Reference Include="System.Device.Dac">
68+
<HintPath>..\..\packages\nanoFramework.System.Device.Dac.1.4.3-preview.8\lib\System.Device.Dac.dll</HintPath>
69+
</Reference>
70+
<Reference Include="System.Device.Gpio">
71+
<HintPath>..\..\packages\nanoFramework.System.Device.Gpio.1.0.3-preview.14\lib\System.Device.Gpio.dll</HintPath>
72+
</Reference>
73+
<Reference Include="System.Device.I2c">
74+
<HintPath>..\..\packages\nanoFramework.System.Device.I2c.1.0.3-preview.8\lib\System.Device.I2c.dll</HintPath>
75+
</Reference>
76+
<Reference Include="System.Device.Model">
77+
<HintPath>..\..\packages\nanoFramework.System.Device.Model.1.0.288-preview.64\lib\System.Device.Model.dll</HintPath>
78+
</Reference>
79+
<Reference Include="System.Device.Pwm">
80+
<HintPath>..\..\packages\nanoFramework.System.Device.Pwm.1.0.1-preview.8\lib\System.Device.Pwm.dll</HintPath>
81+
</Reference>
82+
<Reference Include="System.Device.Spi">
83+
<HintPath>..\..\packages\nanoFramework.System.Device.Spi.1.0.4-preview.3\lib\System.Device.Spi.dll</HintPath>
84+
</Reference>
85+
<Reference Include="System.Math">
86+
<HintPath>..\..\packages\nanoFramework.System.Math.1.4.4-preview.15\lib\System.Math.dll</HintPath>
87+
</Reference>
88+
<Reference Include="System.Numerics">
89+
<HintPath>..\..\packages\nanoFramework.System.Numerics.1.0.288-preview.64\lib\System.Numerics.dll</HintPath>
90+
</Reference>
91+
<Reference Include="UnitsNet.ElectricCurrent">
92+
<HintPath>..\..\packages\UnitsNet.nanoFramework.ElectricCurrent.4.125.0\lib\UnitsNet.ElectricCurrent.dll</HintPath>
93+
</Reference>
94+
<Reference Include="UnitsNet.Frequency">
95+
<HintPath>..\..\packages\UnitsNet.nanoFramework.Frequency.4.125.0\lib\UnitsNet.Frequency.dll</HintPath>
96+
</Reference>
97+
<Reference Include="UnitsNet.Temperature">
98+
<HintPath>..\..\packages\UnitsNet.nanoFramework.Temperature.4.125.0\lib\UnitsNet.Temperature.dll</HintPath>
99+
</Reference>
100+
</ItemGroup>
101+
<ItemGroup>
102+
<None Include="packages.config" />
103+
</ItemGroup>
104+
<Import Project="$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets" Condition="Exists('$(NanoFrameworkProjectSystemPath)NFProjectSystem.CSharp.targets')" />
105+
<ProjectExtensions>
106+
<ProjectCapabilities>
107+
<ProjectConfigurationsDeclaredAsItems />
108+
</ProjectCapabilities>
109+
</ProjectExtensions>
110+
</Project>

Tests/FireTestApp/Program.cs

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
using nanoFramework.M5Stack;
5+
using nanoFramework.Presentation.Media;
6+
using System;
7+
using System.Diagnostics;
8+
using System.Numerics;
9+
using System.Threading;
10+
using Console = nanoFramework.M5Stack.Console;
11+
12+
Debug.WriteLine("Hello from nanoFramework!");
13+
14+
Fire.InitializeScreen();
15+
Console.Clear();
16+
17+
// Test the console display
18+
Console.Write("This is a short text. ");
19+
Console.ForegroundColor = Color.Red;
20+
Console.WriteLine("This one displays in red after the previous one and is already at the next line.");
21+
Console.BackgroundColor = Color.Yellow;
22+
Console.ForegroundColor = Color.RoyalBlue;
23+
Console.WriteLine("And this is really ugly but it's like that");
24+
Console.ResetColor();
25+
Console.Write("*@$+=}");
26+
Console.WriteLine("*@$+=}");
27+
Console.WriteLine("");
28+
Console.WriteLine("1 line empty before");
29+
Console.WriteLine("Press left button to continue");
30+
31+
while (!Fire.ButtonLeft.IsPressed)
32+
{
33+
Thread.Sleep(10);
34+
}
35+
36+
Console.Clear();
37+
38+
Console.WriteLine("Calibrating the accelerator, do not touch it!");
39+
var acc = Fire.AccelerometerGyroscope;
40+
acc.Calibrate(100);
41+
Console.WriteLine("");
42+
Console.WriteLine("Calibrating the magnetometer, please move it all around");
43+
var mag = Fire.Magnetometer;
44+
mag.CalibrateMagnetometer(100);
45+
46+
Fire.ButtonLeft.Press += (sender, e) =>
47+
{
48+
Console.ForegroundColor = Color.Yellow;
49+
Console.CursorLeft = 0;
50+
Console.CursorTop = 0;
51+
Console.Write($"Left Pressed ");
52+
};
53+
54+
Fire.ButtonCenter.Press += (sender, e) =>
55+
{
56+
Console.ForegroundColor = Color.Yellow;
57+
Console.CursorLeft = 0;
58+
Console.CursorTop = 0;
59+
Console.Write($"Center Pressed");
60+
};
61+
62+
Fire.ButtonRight.Press += (sender, e) =>
63+
{
64+
Console.ForegroundColor = Color.Yellow;
65+
Console.CursorLeft = 0;
66+
Console.CursorTop = 0;
67+
Console.Write($"Right Pressed ");
68+
};
69+
70+
Console.Clear();
71+
72+
var power = Fire.Power;
73+
Vector3 accVal;
74+
Vector3 gyroVal;
75+
Vector3 magVal;
76+
77+
while (true)
78+
{
79+
accVal = acc.GetAccelerometer();
80+
gyroVal = acc.GetGyroscope();
81+
magVal = mag.ReadMagnetometer();
82+
var headDir = Math.Atan2(magVal.X, magVal.Y) * 180.0 / Math.PI;
83+
Console.ForegroundColor = Color.Green;
84+
Console.CursorLeft = 0;
85+
Console.CursorTop = 1;
86+
Console.WriteLine("Accelerator:");
87+
Console.WriteLine($" x={accVal.X:N2} ");
88+
Console.WriteLine($" y={accVal.Y:N2} ");
89+
Console.WriteLine($" z={accVal.Z:N2} ");
90+
Console.ForegroundColor = Color.AliceBlue;
91+
Console.WriteLine("Gyroscope:");
92+
Console.WriteLine($" x={gyroVal.X:N2} ");
93+
Console.WriteLine($" y={gyroVal.Y:N2} ");
94+
Console.WriteLine($" z={gyroVal.Z:N2} ");
95+
Console.ForegroundColor = Color.Coral;
96+
Console.CursorLeft = Console.WindowWidth / 2 - 2;
97+
Console.CursorTop = 1;
98+
Console.Write("Magnetometer:");
99+
Console.CursorLeft = Console.WindowWidth / 2 - 2;
100+
Console.CursorTop++;
101+
Console.Write($" x={magVal.X:N2} ");
102+
Console.CursorLeft = Console.WindowWidth / 2 - 2;
103+
Console.CursorTop++;
104+
Console.Write($" y={magVal.Y:N2} ");
105+
Console.CursorLeft = Console.WindowWidth / 2 - 2;
106+
Console.CursorTop++;
107+
Console.Write($" z={magVal.Z:N2} ");
108+
Console.CursorLeft = Console.WindowWidth / 2 - 2;
109+
Console.CursorTop++;
110+
Console.Write($" h={headDir:N2} ");
111+
Console.ForegroundColor = Color.DarkBlue;
112+
Console.CursorLeft = Console.WindowWidth / 2 - 2;
113+
Console.CursorTop = 6;
114+
Console.Write("Power:");
115+
Console.CursorLeft = Console.WindowWidth / 2 - 2;
116+
Console.CursorTop++;
117+
Console.BackgroundColor = power.IsCharging ? Color.Black : Color.Red;
118+
Console.Write($" Charging {power.IsCharging}");
119+
Console.BackgroundColor = Color.Black;
120+
Console.Write(" ");
121+
Console.CursorLeft = Console.WindowWidth / 2 - 2;
122+
Console.CursorTop++;
123+
Console.Write($" Full {power.IsBatteryFull} ");
124+
Thread.Sleep(20);
125+
}

0 commit comments

Comments
 (0)