Skip to content

Commit

Permalink
Add clock test app
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianstevens committed Mar 23, 2020
1 parent 1e549fd commit ff5d869
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 1 deletion.
7 changes: 7 additions & 0 deletions source/Meadow.Core.sln
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SerialLoopback", "Tests\Ser
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Profiler", "Tests\Profiler\Profiler.csproj", "{4B689705-4092-4104-A4EC-B4C2696141A1}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "RealTimeClock", "Tests\RealTimeClock\RealTimeClock.csproj", "{74CFCE38-FB3F-429E-8531-72715F64B107}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -158,6 +160,10 @@ Global
{4B689705-4092-4104-A4EC-B4C2696141A1}.Debug|Any CPU.Build.0 = Debug|Any CPU
{4B689705-4092-4104-A4EC-B4C2696141A1}.Release|Any CPU.ActiveCfg = Release|Any CPU
{4B689705-4092-4104-A4EC-B4C2696141A1}.Release|Any CPU.Build.0 = Release|Any CPU
{74CFCE38-FB3F-429E-8531-72715F64B107}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{74CFCE38-FB3F-429E-8531-72715F64B107}.Debug|Any CPU.Build.0 = Debug|Any CPU
{74CFCE38-FB3F-429E-8531-72715F64B107}.Release|Any CPU.ActiveCfg = Release|Any CPU
{74CFCE38-FB3F-429E-8531-72715F64B107}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -187,6 +193,7 @@ Global
{00B22D2E-18A0-4BDC-A3D7-5FF33377ED70} = {713BD65C-881B-45B1-9729-42BD2B9593FB}
{EA14DADF-10F8-4E28-AB73-8D4949869E9C} = {CDA0F516-977E-4F27-9434-9A0961EF91D1}
{4B689705-4092-4104-A4EC-B4C2696141A1} = {CDA0F516-977E-4F27-9434-9A0961EF91D1}
{74CFCE38-FB3F-429E-8531-72715F64B107} = {CDA0F516-977E-4F27-9434-9A0961EF91D1}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {346406ED-19A9-40FB-A3F7-14139F44C0C8}
Expand Down
1 change: 0 additions & 1 deletion source/Tests/BasicI2CTest/BasicI2CTest.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Meadow.Sdk/1.1.0">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<ProjectGuid>{DC2AB456-74B1-4408-9640-960B555460C8}</ProjectGuid>
<OutputType>Exe</OutputType>
<RootNamespace>BasicI2CTest</RootNamespace>
<AssemblyName>App</AssemblyName>
Expand Down
21 changes: 21 additions & 0 deletions source/Tests/RealTimeClock/MeadowApp.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
using System;
using System.Threading;
using Meadow;
using Meadow.Devices;

namespace MeadowApp
{
public class MeadowApp : App<F7Micro, MeadowApp>
{

public MeadowApp()
{
//set current time to 12pm on March 20, 2020
Console.WriteLine("Hello RTC");

Device.SetClock(new DateTime(2020, 3, 22, 12, 0, 0));

Console.WriteLine($"Today is: {DateTime.Now}");
}
}
}
17 changes: 17 additions & 0 deletions source/Tests/RealTimeClock/Program.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System.Threading;
using Meadow;

namespace MeadowApp
{
class Program
{
static IApp app;
public static void Main(string[] args)
{
// instantiate and run new meadow app
app = new MeadowApp();

Thread.Sleep(Timeout.Infinite);
}
}
}
10 changes: 10 additions & 0 deletions source/Tests/RealTimeClock/RealTimeClock.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<Project Sdk="Meadow.Sdk/1.1.0">
<PropertyGroup>
<TargetFramework>net472</TargetFramework>
<OutputType>Exe</OutputType>
<AssemblyName>App</AssemblyName>
</PropertyGroup>
<ItemGroup>
<ProjectReference Include="..\..\Meadow.Core\Meadow.Core.csproj" />
</ItemGroup>
</Project>

0 comments on commit ff5d869

Please sign in to comment.