Skip to content

Commit

Permalink
Merge pull request #26 from WildernessLabs/develop
Browse files Browse the repository at this point in the history
Merge to main for RC2-2
  • Loading branch information
adrianstevens authored Mar 5, 2023
2 parents d70ac0d + 62c3681 commit 0886485
Show file tree
Hide file tree
Showing 50 changed files with 769 additions and 55 deletions.
9 changes: 1 addition & 8 deletions Meadow_DotNet_SDK/BasicMeadowApp/MeadowApp.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public override Task Initialize()
{
Console.WriteLine("Initialize...");

onboardLed = new RgbPwmLed(device: Device,
onboardLed = new RgbPwmLed(
redPwmPin: Device.Pins.OnboardLedRed,
greenPwmPin: Device.Pins.OnboardLedGreen,
bluePwmPin: Device.Pins.OnboardLedBlue,
Expand Down Expand Up @@ -62,12 +62,5 @@ void ShowColorPulse(Color color, TimeSpan duration)
Thread.Sleep(duration);
onboardLed.Stop();
}

void ShowColor(Color color, TimeSpan duration)
{
onboardLed.SetColor(color);
Thread.Sleep(duration);
onboardLed.Stop();
}
}
}
2 changes: 1 addition & 1 deletion Meadow_DotNet_SDK/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@
<GeneratePackageOnBuild>True</GeneratePackageOnBuild>
<TargetFramework>net472</TargetFramework>
<Author>Wilderness Labs</Author>
<Copyright>2019-2022</Copyright>
<Copyright>2019-2023</Copyright>
</PropertyGroup>
</Project>
4 changes: 2 additions & 2 deletions Meadow_DotNet_SDK/Project_Templates/Project_Templates.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

<PropertyGroup>
<PackageType>Template</PackageType>
<PackageVersion>0.9.0</PackageVersion>
<Version>0.9.0</Version>
<PackageVersion>0.9.6</PackageVersion>
<Version>0.9.6</Version>
<PackageId>WildernessLabs.Meadow.Template</PackageId>
<PackageProjectUrl>http://developer.wildernesslabs.co/Meadow/Meadow.Foundation/</PackageProjectUrl>
<PackageIcon>icon.png</PackageIcon>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ public class MeadowApp : App<F7FeatherV2>

public override Task Run()
{
Console.WriteLine("Run...");
Resolver.Log.Info("Run...");

CycleColors(TimeSpan.FromMilliseconds(1000));
return base.Run();
}

public override Task Initialize()
{
Console.WriteLine("Initialize...");
Resolver.Log.Info("Initialize...");

onboardLed = new RgbPwmLed(device: Device,
onboardLed = new RgbPwmLed(
redPwmPin: Device.Pins.OnboardLedRed,
greenPwmPin: Device.Pins.OnboardLedGreen,
bluePwmPin: Device.Pins.OnboardLedBlue,
Expand All @@ -37,7 +37,7 @@ public override Task Initialize()

void CycleColors(TimeSpan duration)
{
Console.WriteLine("Cycle colors...");
Resolver.Log.Info("Cycle colors...");

while (true)
{
Expand All @@ -62,12 +62,5 @@ void ShowColorPulse(Color color, TimeSpan duration)
Thread.Sleep(duration);
onboardLed.Stop();
}

void ShowColor(Color color, TimeSpan duration)
{
onboardLed.SetColor(color);
Thread.Sleep(duration);
onboardLed.Stop();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,8 @@
<None Update="meadow.config.yaml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="app.config.yaml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>WildernessLabs.Meadow.App.Template</id>
<version>0.9.0</version>
<version>0.9.6</version>
<title>Wilderness Labs Meadow App Project Template</title>
<authors>Wilderness Labs</authors>
<owners>Wilderness Labs</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Meadow application template</description>
<copyright>2019-2022</copyright>
<copyright>2019-2023</copyright>
<tags>Wilderness Labs Meadow App Sdk dotnet-new templates</tags>
<packageTypes>
<packageType name="Template" />
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Uncomment additional options as needed.
# To learn more about these config options, including custom application configuration settings, check out the Application Settings Configuration documentation.
# http://developer.wildernesslabs.co/Meadow/Meadow.OS/Configuration/Application_Settings_Configuration/

Lifecycle:
# Control whether Meadow will restart when an unhandled app exception occurs. Combine with Lifecycle > AppFailureRestartDelaySeconds to control restart timing.
RestartOnAppFailure: false
# # When app set to restart automatically on app failure,
# AppFailureRestartDelaySeconds: 15

# # Adjust the level of logging detail.
# Logging:
# LogLevel:
# Default: "Trace"
Original file line number Diff line number Diff line change
@@ -1,2 +1,43 @@
MonoControl:
Options: --jit
# Uncommented these options as needed.
# To learn more about these config options, check out the OS & Device Configuration documentation.
# http://developer.wildernesslabs.co/Meadow/Meadow.OS/Configuration/OS_Device_Configuration/

# Device:
# # Name of the device on the network.
# Name: MeadowF7V2_ConfigSample
#
# # Uncomment if SD card hardware present on this hardware (e.g., Core-Compute module with SD add-on)? Optional; default value is `false`.
# SdStorageSupported: true
# MonoControl:
# # Options allow enabling debug builds or controlling JIT compilation (`--jit` to enable [default], `--interp` to disable).
# Options: --interp --debug
# # Control how the ESP coprocessor will start and operate.
# Coprocessor:
# # Should the ESP32 automatically attempt to connect to an access point at startup?
# # If set to true, wifi.config.yaml credentials must be stored in the device.
# AutomaticallyStartNetwork: true
#
# # Should the ESP32 automatically reconnect to the configured access point?
# AutomaticallyReconnect: true
#
# # Maximum number of retry attempts for connections etc. before an error code is returned.
# MaximumRetryCount: 7
# # Network configuration.
# Network:
# # Automatically attempt to get the time at startup?
# GetNetworkTimeAtStartup: true
#
# # Time synchronization period in seconds.
# NtpRefreshPeriod: 600
#
# # Name of the NTP servers.
# NtpServers:
# - 0.pool.ntp.org
# - 1.pool.ntp.org
# - 2.pool.ntp.org
# - 3.pool.ntp.org
#
# # IP addresses of the DNS servers.
# DnsServers:
# - 1.1.1.1
# - 8.8.8.8
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Uncomment to set the default Wi-Fi credentials. (This file will be processed into secure storage on the ESP32 and then deleted from the device.)
# To learn more about these config options, including custom application configuration settings, check out the Application Settings Configuration documentation.
# http://developer.wildernesslabs.co/Meadow/Meadow.OS/Configuration/WiFi_Configuration/

# # To enable automatically connecting to a default network, make sure to enable the Coprocessor > AutomaticallyStartNetwork value in meadow.config.yaml.
# Credentials:
# Ssid: YourSSID
# Password: SSIDPassword
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "Wilderness Labs",
"classifications": [ "Meadow", "Console" ],
"name": "Meadow Application (Core-Compute module)",
"identity": "WildernessLabs.Meadow.Templates.BasicCcmApp",
"groupIdentity": "WildernessLabs.Meadow.BasicCcmApp",
"shortName": "MeadowCcm",
"tags": {
"language": "C#",
"type": "project"
},
"sourceName": "MeadowApplication",
"preferNameDirectory": true,
"primaryOutputs": [
{ "path": "MeadowApplication.csproj" }
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Deploy",
"type": "meadow",
"request": "launch",
"preLaunchTask": "meadow: Build"
}
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using Meadow;
using Meadow.Devices;
using Meadow.Foundation;
using Meadow.Foundation.Leds;
using Meadow.Peripherals.Leds;
using System;
using System.Threading;
using System.Threading.Tasks;

namespace MeadowApp
{
// Change F7CoreComputeV2 to F7FeatherV2 (or F7FeatherV1) for Feather boards
public class MeadowApp : App<F7CoreComputeV2>
{
public override Task Run()
{
Resolver.Log.Info("Run...");

Resolver.Log.Info("Hello, Meadow Core-Compute!");

return base.Run();
}

public override Task Initialize()
{
Resolver.Log.Info("Initialize...");

return base.Initialize();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<Project Sdk="Meadow.Sdk/1.1.0">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
<OutputType>Library</OutputType>
<AssemblyName>App</AssemblyName>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Meadow.Foundation" Version="0.*" />
<PackageReference Include="Meadow.F7" Version="0.*" />
</ItemGroup>
<ItemGroup>
<None Update="meadow.config.yaml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Update="app.config.yaml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>WildernessLabs.Meadow.App.Template</id>
<version>0.9.6</version>
<title>Wilderness Labs Meadow App Core-Compute Module Project Template</title>
<authors>Wilderness Labs</authors>
<owners>Wilderness Labs</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>
<description>Meadow Core-Compute module application template</description>
<copyright>2019-2023</copyright>
<tags>Wilderness Labs Meadow App Sdk dotnet-new templates</tags>
<packageTypes>
<packageType name="Template" />
</packageTypes>
<dependencies>
<group targetFramework="netstandard2.1" />
</dependencies>
</metadata>
</package>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Uncomment additional options as needed.
# To learn more about these config options, including custom application configuration settings, check out the Application Settings Configuration documentation.
# http://developer.wildernesslabs.co/Meadow/Meadow.OS/Configuration/Application_Settings_Configuration/

Lifecycle:
# Control whether Meadow will restart when an unhandled app exception occurs. Combine with Lifecycle > AppFailureRestartDelaySeconds to control restart timing.
RestartOnAppFailure: false
# # When app set to restart automatically on app failure,
# AppFailureRestartDelaySeconds: 15

# # Adjust the level of logging detail.
# Logging:
# LogLevel:
# Default: "Trace"
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Uncommented these options as needed.
# To learn more about these config options, check out the OS & Device Configuration documentation.
# http://developer.wildernesslabs.co/Meadow/Meadow.OS/Configuration/OS_Device_Configuration/

# Device:
# # Name of the device on the network.
# Name: MeadowF7V2_ConfigSample
#
# # Uncomment if SD card hardware present on this hardware (e.g., Core-Compute module with SD add-on)? Optional; default value is `false`.
# SdStorageSupported: true
# MonoControl:
# # Options allow enabling debug builds or controlling JIT compilation (`--jit` to enable [default], `--interp` to disable).
# Options: --interp --debug
# # Control how the ESP coprocessor will start and operate.
# Coprocessor:
# # Should the ESP32 automatically attempt to connect to an access point at startup?
# # If set to true, wifi.config.yaml credentials must be stored in the device.
# AutomaticallyStartNetwork: true
#
# # Should the ESP32 automatically reconnect to the configured access point?
# AutomaticallyReconnect: true
#
# # Maximum number of retry attempts for connections etc. before an error code is returned.
# MaximumRetryCount: 7
# # Network configuration.
# Network:
# # Automatically attempt to get the time at startup?
# GetNetworkTimeAtStartup: true
#
# # Time synchronization period in seconds.
# NtpRefreshPeriod: 600
#
# # Name of the NTP servers.
# NtpServers:
# - 0.pool.ntp.org
# - 1.pool.ntp.org
# - 2.pool.ntp.org
# - 3.pool.ntp.org
#
# # IP addresses of the DNS servers.
# DnsServers:
# - 1.1.1.1
# - 8.8.8.8
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Uncomment to set the default Wi-Fi credentials. (This file will be processed into secure storage on the ESP32 and then deleted from the device.)
# To learn more about these config options, including custom application configuration settings, check out the Application Settings Configuration documentation.
# http://developer.wildernesslabs.co/Meadow/Meadow.OS/Configuration/WiFi_Configuration/

# # To enable automatically connecting to a default network, make sure to enable the Coprocessor > AutomaticallyStartNetwork value in meadow.config.yaml.
# Credentials:
# Ssid: YourSSID
# Password: SSIDPassword
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"$schema": "http://json.schemastore.org/template",
"author": "Wilderness Labs",
"classifications": [ "Meadow", "Console" ],
"name": "Meadow Application",
"identity": "WildernessLabs.Meadow.Templates.BasicCcmApp.FSharp",
"groupIdentity": "WildernessLabs.Meadow.BasicCcmApp",
"shortName": "MeadowCcm",
"tags": {
"language": "F#",
"type": "project"
},
"sourceName": "MeadowApplication",
"preferNameDirectory": true,
"primaryOutputs": [
{ "path": "MeadowApplication.fsproj" }
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Deploy",
"type": "meadow",
"request": "launch",
"preLaunchTask": "meadow: Build"
}
]
}
Loading

0 comments on commit 0886485

Please sign in to comment.