Refactor NucuCar.Sensors project structure
This commit is contained in:
parent
937ea25a2c
commit
058b8ffa88
42 changed files with 80 additions and 140 deletions
|
@ -1,42 +0,0 @@
|
|||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netcoreapp2.1</TargetFramework>
|
||||
<EnableDefaultItems>false</EnableDefaultItems>
|
||||
<LangVersion>8.0</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="Bme280.cs" />
|
||||
<Compile Include="Bme680.cs" />
|
||||
<Compile Include="Bme680HeaterProfile.cs" />
|
||||
<Compile Include="Bme680HeaterProfileConfig.cs" />
|
||||
<Compile Include="Bme680Mask.cs" />
|
||||
<Compile Include="Bmp280.cs" />
|
||||
<Compile Include="Bmx280Base.cs" />
|
||||
<Compile Include="Bmxx80Base.cs" />
|
||||
<Compile Include="CalibrationData\Bme680CalibrationData.cs" />
|
||||
<Compile Include="CalibrationData\Bme280CalibrationData.cs" />
|
||||
<Compile Include="CalibrationData\Bmp280CalibrationData.cs" />
|
||||
<Compile Include="CalibrationData\Bmxx80CalibrationData.cs" />
|
||||
<Compile Include="DeviceStatus.cs" />
|
||||
<Compile Include="FilteringMode\Bme680FilteringMode.cs" />
|
||||
<Compile Include="FilteringMode\Bmx280FilteringMode.cs" />
|
||||
<Compile Include="PowerMode\Bme680PowerMode.cs" />
|
||||
<Compile Include="PowerMode\Bmx280PowerMode.cs" />
|
||||
<Compile Include="Register\Bme680Register.cs" />
|
||||
<Compile Include="Register\Bmx280Register.cs" />
|
||||
<Compile Include="Register\Bmxx80Register.cs" />
|
||||
<Compile Include="Register\Bme280Register.cs" />
|
||||
<Compile Include="Sampling.cs" />
|
||||
<Compile Include="StandbyTime.cs" />
|
||||
<ProjectReference Include="$(MainLibraryPath)System.Device.Gpio.csproj">
|
||||
<AdditionalProperties>$(AdditionalProperties);RuntimeIdentifier=linux</AdditionalProperties>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Units\Units.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="README.md" />
|
||||
</ItemGroup>
|
||||
</Project>
|
|
@ -3,8 +3,8 @@ using Microsoft.AspNetCore.Hosting;
|
|||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using NucuCar.Sensors.Environment;
|
||||
using NucuCar.Sensors.Health;
|
||||
using NucuCar.Sensors.Modules.Environment;
|
||||
using NucuCar.Sensors.Modules.Health;
|
||||
|
||||
namespace NucuCar.Sensors.Grpc
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||
|
||||
namespace NucuCar.Sensors.Environment
|
||||
namespace NucuCar.Sensors.Modules.Environment
|
||||
{
|
||||
public class Bme680Config
|
||||
{
|
|
@ -7,7 +7,7 @@ using NucuCar.Sensors.Abstractions;
|
|||
using NucuCar.Sensors.Grpc;
|
||||
using NucuCarSensorsProto;
|
||||
|
||||
namespace NucuCar.Sensors.Environment
|
||||
namespace NucuCar.Sensors.Modules.Environment
|
||||
{
|
||||
/// <summary>
|
||||
/// EnvironmentSensor's gRPC service.
|
|
@ -6,13 +6,13 @@ using Microsoft.Extensions.Logging;
|
|||
using Microsoft.Extensions.Options;
|
||||
using Newtonsoft.Json;
|
||||
using NucuCar.Sensors.Abstractions;
|
||||
using NucuCar.Sensors.Environment.Bmxx80;
|
||||
using NucuCar.Sensors.Modules.Environment.Bmxx80;
|
||||
using NucuCarSensorsProto;
|
||||
using Bme680 = NucuCar.Sensors.Environment.Bmxx80.Bme680;
|
||||
using Bme680PowerMode = NucuCar.Sensors.Environment.Bmxx80.PowerMode.Bme680PowerMode;
|
||||
using Sampling = NucuCar.Sensors.Environment.Bmxx80.Sampling;
|
||||
using Bme680 = NucuCar.Sensors.Modules.Environment.Bmxx80.Bme680;
|
||||
using Bme680PowerMode = NucuCar.Sensors.Modules.Environment.Bmxx80.PowerMode.Bme680PowerMode;
|
||||
using Sampling = NucuCar.Sensors.Modules.Environment.Bmxx80.Sampling;
|
||||
|
||||
namespace NucuCar.Sensors.Environment
|
||||
namespace NucuCar.Sensors.Modules.Environment
|
||||
{
|
||||
internal class Bme680MeasurementData
|
||||
{
|
|
@ -1,8 +1,7 @@
|
|||
using Microsoft.Extensions.Logging;
|
||||
using NucuCar.Sensors.Abstractions;
|
||||
using NucuCar.Telemetry;
|
||||
|
||||
namespace NucuCar.Sensors.Environment
|
||||
namespace NucuCar.Sensors.Modules.Environment
|
||||
{
|
||||
public class Bme680Worker : SensorWorker
|
||||
{
|
|
@ -4,10 +4,10 @@
|
|||
|
||||
using System;
|
||||
using System.Device.I2c;
|
||||
using NucuCar.Sensors.Environment.Bmxx80.CalibrationData;
|
||||
using NucuCar.Sensors.Environment.Bmxx80.Register;
|
||||
using NucuCar.Sensors.Modules.Environment.Bmxx80.CalibrationData;
|
||||
using NucuCar.Sensors.Modules.Environment.Bmxx80.Register;
|
||||
|
||||
namespace NucuCar.Sensors.Environment.Bmxx80
|
||||
namespace NucuCar.Sensors.Modules.Environment.Bmxx80
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a BME280 temperature, barometric pressure and humidity sensor.
|
|
@ -6,13 +6,13 @@ using System;
|
|||
using System.Collections.Generic;
|
||||
using System.Device.I2c;
|
||||
using System.Linq;
|
||||
using NucuCar.Sensors.Environment.Bmxx80.CalibrationData;
|
||||
using NucuCar.Sensors.Environment.Bmxx80.FilteringMode;
|
||||
using NucuCar.Sensors.Environment.Bmxx80.PowerMode;
|
||||
using NucuCar.Sensors.Environment.Bmxx80.Register;
|
||||
using NucuCar.Sensors.Environment.Bmxx80.Units;
|
||||
using NucuCar.Sensors.Modules.Environment.Bmxx80.CalibrationData;
|
||||
using NucuCar.Sensors.Modules.Environment.Bmxx80.FilteringMode;
|
||||
using NucuCar.Sensors.Modules.Environment.Bmxx80.PowerMode;
|
||||
using NucuCar.Sensors.Modules.Environment.Bmxx80.Register;
|
||||
using NucuCar.Sensors.Modules.Environment.Bmxx80.Units;
|
||||
|
||||
namespace NucuCar.Sensors.Environment.Bmxx80
|
||||
namespace NucuCar.Sensors.Modules.Environment.Bmxx80
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a BME680 temperature, pressure, relative humidity and VOC gas sensor.
|
|
@ -2,7 +2,7 @@
|
|||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
namespace NucuCar.Sensors.Environment.Bmxx80
|
||||
namespace NucuCar.Sensors.Modules.Environment.Bmxx80
|
||||
{
|
||||
/// <summary>
|
||||
/// 10 addressable heater profiles stored on the Bme680.
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
using System;
|
||||
|
||||
namespace NucuCar.Sensors.Environment.Bmxx80
|
||||
namespace NucuCar.Sensors.Modules.Environment.Bmxx80
|
||||
{
|
||||
/// <summary>
|
||||
/// The heater profile configuration saved on the device.
|
|
@ -2,7 +2,7 @@
|
|||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
namespace NucuCar.Sensors.Environment.Bmxx80
|
||||
namespace NucuCar.Sensors.Modules.Environment.Bmxx80
|
||||
{
|
||||
internal enum Bme680Mask : byte
|
||||
{
|
|
@ -3,9 +3,8 @@
|
|||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Device.I2c;
|
||||
using Iot.Device.Bmxx80;
|
||||
|
||||
namespace NucuCar.Sensors.Environment.Bmxx80
|
||||
namespace NucuCar.Sensors.Modules.Environment.Bmxx80
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents a BME280 temperature and barometric pressure sensor.
|
|
@ -8,17 +8,17 @@
|
|||
using System;
|
||||
using System.Device.I2c;
|
||||
using System.IO;
|
||||
using NucuCar.Sensors.Environment.Bmxx80.FilteringMode;
|
||||
using NucuCar.Sensors.Environment.Bmxx80.Register;
|
||||
using NucuCar.Sensors.Environment.Bmxx80.Units;
|
||||
using Bmx280PowerMode = NucuCar.Sensors.Environment.Bmxx80.PowerMode.Bmx280PowerMode;
|
||||
using NucuCar.Sensors.Modules.Environment.Bmxx80.FilteringMode;
|
||||
using NucuCar.Sensors.Modules.Environment.Bmxx80.Register;
|
||||
using NucuCar.Sensors.Modules.Environment.Bmxx80.Units;
|
||||
using Bmx280PowerMode = NucuCar.Sensors.Modules.Environment.Bmxx80.PowerMode.Bmx280PowerMode;
|
||||
|
||||
namespace NucuCar.Sensors.Environment.Bmxx80
|
||||
namespace NucuCar.Sensors.Modules.Environment.Bmxx80
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the core functionality of the Bmx280 family.
|
||||
/// </summary>
|
||||
public abstract class Bmx280Base : NucuCar.Sensors.Environment.Bmxx80.Bmxx80Base
|
||||
public abstract class Bmx280Base : Bmxx80Base
|
||||
{
|
||||
/// <summary>
|
||||
/// Default I2C bus address.
|
||||
|
@ -36,7 +36,7 @@ namespace NucuCar.Sensors.Environment.Bmxx80
|
|||
protected static readonly int[] s_osToMeasCycles = { 0, 7, 9, 14, 23, 44 };
|
||||
|
||||
private Bmx280FilteringMode _filteringMode;
|
||||
private NucuCar.Sensors.Environment.Bmxx80.StandbyTime _standbyTime;
|
||||
private StandbyTime _standbyTime;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="Bmx280Base"/> class.
|
||||
|
@ -72,8 +72,8 @@ namespace NucuCar.Sensors.Environment.Bmxx80
|
|||
/// <summary>
|
||||
/// Gets or sets the standby time between two consecutive measurements.
|
||||
/// </summary>
|
||||
/// <exception cref="ArgumentOutOfRangeException">Thrown when the <see cref="NucuCar.Sensors.Environment.Bmxx80.StandbyTime"/> is set to an undefined mode.</exception>
|
||||
public NucuCar.Sensors.Environment.Bmxx80.StandbyTime StandbyTime
|
||||
/// <exception cref="ArgumentOutOfRangeException">Thrown when the <see cref="Bmxx80.StandbyTime"/> is set to an undefined mode.</exception>
|
||||
public StandbyTime StandbyTime
|
||||
{
|
||||
get => _standbyTime;
|
||||
set
|
||||
|
@ -94,13 +94,13 @@ namespace NucuCar.Sensors.Environment.Bmxx80
|
|||
/// Reads the temperature. A return value indicates whether the reading succeeded.
|
||||
/// </summary>
|
||||
/// <param name="temperature">
|
||||
/// Contains the measured temperature if the <see cref="NucuCar.Sensors.Environment.Bmxx80.Bmxx80Base.TemperatureSampling"/> was not set to <see cref="NucuCar.Sensors.Environment.Bmxx80.Sampling.Skipped"/>.
|
||||
/// Contains the measured temperature if the <see cref="Bmxx80Base.TemperatureSampling"/> was not set to <see cref="Sampling.Skipped"/>.
|
||||
/// Contains <see cref="double.NaN"/> otherwise.
|
||||
/// </param>
|
||||
/// <returns><code>true</code> if measurement was not skipped, otherwise <code>false</code>.</returns>
|
||||
public override bool TryReadTemperature(out Temperature temperature)
|
||||
{
|
||||
if (TemperatureSampling == NucuCar.Sensors.Environment.Bmxx80.Sampling.Skipped)
|
||||
if (TemperatureSampling == Sampling.Skipped)
|
||||
{
|
||||
temperature = Temperature.FromCelsius(double.NaN);
|
||||
return false;
|
||||
|
@ -142,13 +142,13 @@ namespace NucuCar.Sensors.Environment.Bmxx80
|
|||
/// Reads the pressure. A return value indicates whether the reading succeeded.
|
||||
/// </summary>
|
||||
/// <param name="pressure">
|
||||
/// Contains the measured pressure in Pa if the <see cref="NucuCar.Sensors.Environment.Bmxx80.Bmxx80Base.PressureSampling"/> was not set to <see cref="NucuCar.Sensors.Environment.Bmxx80.Sampling.Skipped"/>.
|
||||
/// Contains the measured pressure in Pa if the <see cref="Bmxx80Base.PressureSampling"/> was not set to <see cref="Sampling.Skipped"/>.
|
||||
/// Contains <see cref="double.NaN"/> otherwise.
|
||||
/// </param>
|
||||
/// <returns><code>true</code> if measurement was not skipped, otherwise <code>false</code>.</returns>
|
||||
public override bool TryReadPressure(out Pressure pressure)
|
||||
{
|
||||
if (PressureSampling == NucuCar.Sensors.Environment.Bmxx80.Sampling.Skipped)
|
||||
if (PressureSampling == Sampling.Skipped)
|
||||
{
|
||||
pressure = Pressure.FromPascal(double.NaN);
|
||||
return false;
|
||||
|
@ -173,7 +173,7 @@ namespace NucuCar.Sensors.Environment.Bmxx80
|
|||
/// </summary>
|
||||
/// <param name="seaLevelPressure">Sea-level pressure</param>
|
||||
/// <param name="altitude">
|
||||
/// Contains the calculated metres above sea-level if the <see cref="NucuCar.Sensors.Environment.Bmxx80.Bmxx80Base.PressureSampling"/> was not set to <see cref="NucuCar.Sensors.Environment.Bmxx80.Sampling.Skipped"/>.
|
||||
/// Contains the calculated metres above sea-level if the <see cref="Bmxx80Base.PressureSampling"/> was not set to <see cref="Sampling.Skipped"/>.
|
||||
/// Contains <see cref="double.NaN"/> otherwise.
|
||||
/// </param>
|
||||
/// <returns><code>true</code> if pressure measurement was not skipped, otherwise <code>false</code>.</returns>
|
||||
|
@ -196,7 +196,7 @@ namespace NucuCar.Sensors.Environment.Bmxx80
|
|||
/// Calculates the altitude in meters from the mean sea-level pressure.
|
||||
/// </summary>
|
||||
/// <param name="altitude">
|
||||
/// Contains the calculated metres above sea-level if the <see cref="NucuCar.Sensors.Environment.Bmxx80.Bmxx80Base.PressureSampling"/> was not set to <see cref="NucuCar.Sensors.Environment.Bmxx80.Sampling.Skipped"/>.
|
||||
/// Contains the calculated metres above sea-level if the <see cref="Bmxx80Base.PressureSampling"/> was not set to <see cref="Sampling.Skipped"/>.
|
||||
/// Contains <see cref="double.NaN"/> otherwise.
|
||||
/// </param>
|
||||
/// <returns><code>true</code> if pressure measurement was not skipped, otherwise <code>false</code>.</returns>
|
||||
|
@ -208,8 +208,8 @@ namespace NucuCar.Sensors.Environment.Bmxx80
|
|||
/// <summary>
|
||||
/// Get the current status of the device.
|
||||
/// </summary>
|
||||
/// <returns>The <see cref="NucuCar.Sensors.Environment.Bmxx80.DeviceStatus"/>.</returns>
|
||||
public NucuCar.Sensors.Environment.Bmxx80.DeviceStatus ReadStatus()
|
||||
/// <returns>The <see cref="DeviceStatus"/>.</returns>
|
||||
public DeviceStatus ReadStatus()
|
||||
{
|
||||
var status = Read8BitsFromRegister((byte)Bmx280Register.STATUS);
|
||||
|
||||
|
@ -219,7 +219,7 @@ namespace NucuCar.Sensors.Environment.Bmxx80
|
|||
// Bit 0.
|
||||
var imageUpdating = (status & 1) == 1;
|
||||
|
||||
return new NucuCar.Sensors.Environment.Bmxx80.DeviceStatus
|
||||
return new DeviceStatus
|
||||
{
|
||||
ImageUpdating = imageUpdating,
|
||||
Measuring = measuring
|
||||
|
@ -260,7 +260,7 @@ namespace NucuCar.Sensors.Environment.Bmxx80
|
|||
{
|
||||
base.SetDefaultConfiguration();
|
||||
FilterMode = Bmx280FilteringMode.Off;
|
||||
StandbyTime = NucuCar.Sensors.Environment.Bmxx80.StandbyTime.Ms125;
|
||||
StandbyTime = StandbyTime.Ms125;
|
||||
}
|
||||
|
||||
/// <summary>
|
|
@ -6,11 +6,11 @@ using System;
|
|||
using System.Buffers.Binary;
|
||||
using System.Device.I2c;
|
||||
using System.IO;
|
||||
using NucuCar.Sensors.Environment.Bmxx80.CalibrationData;
|
||||
using NucuCar.Sensors.Environment.Bmxx80.Register;
|
||||
using NucuCar.Sensors.Environment.Bmxx80.Units;
|
||||
using NucuCar.Sensors.Modules.Environment.Bmxx80.CalibrationData;
|
||||
using NucuCar.Sensors.Modules.Environment.Bmxx80.Register;
|
||||
using NucuCar.Sensors.Modules.Environment.Bmxx80.Units;
|
||||
|
||||
namespace NucuCar.Sensors.Environment.Bmxx80
|
||||
namespace NucuCar.Sensors.Modules.Environment.Bmxx80
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the core functionality of the Bmxx80 family.
|
||||
|
@ -306,15 +306,15 @@ namespace NucuCar.Sensors.Environment.Bmxx80
|
|||
{
|
||||
switch (this)
|
||||
{
|
||||
case NucuCar.Sensors.Environment.Bmxx80.Bme280 _:
|
||||
case Bme280 _:
|
||||
_calibrationData = new Bme280CalibrationData();
|
||||
_controlRegister = (byte)Bmx280Register.CTRL_MEAS;
|
||||
break;
|
||||
case NucuCar.Sensors.Environment.Bmxx80.Bmp280 _:
|
||||
case Bmp280 _:
|
||||
_calibrationData = new Bmp280CalibrationData();
|
||||
_controlRegister = (byte)Bmx280Register.CTRL_MEAS;
|
||||
break;
|
||||
case NucuCar.Sensors.Environment.Bmxx80.Bme680 _:
|
||||
case Bme680 _:
|
||||
_calibrationData = new Bme680CalibrationData();
|
||||
_controlRegister = (byte)Bme680Register.CTRL_MEAS;
|
||||
break;
|
|
@ -2,12 +2,9 @@
|
|||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using Iot.Device.Bmxx80;
|
||||
using Iot.Device.Bmxx80.CalibrationData;
|
||||
using Iot.Device.Bmxx80.Register;
|
||||
using NucuCar.Sensors.Environment.Bmxx80.Register;
|
||||
using NucuCar.Sensors.Modules.Environment.Bmxx80.Register;
|
||||
|
||||
namespace NucuCar.Sensors.Environment.Bmxx80.CalibrationData
|
||||
namespace NucuCar.Sensors.Modules.Environment.Bmxx80.CalibrationData
|
||||
{
|
||||
/// <summary>
|
||||
/// Calibration data for the BME280.
|
|
@ -2,12 +2,9 @@
|
|||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using Iot.Device.Bmxx80;
|
||||
using Iot.Device.Bmxx80.CalibrationData;
|
||||
using Iot.Device.Bmxx80.Register;
|
||||
using NucuCar.Sensors.Environment.Bmxx80.Register;
|
||||
using NucuCar.Sensors.Modules.Environment.Bmxx80.Register;
|
||||
|
||||
namespace NucuCar.Sensors.Environment.Bmxx80.CalibrationData
|
||||
namespace NucuCar.Sensors.Modules.Environment.Bmxx80.CalibrationData
|
||||
{
|
||||
/// <summary>
|
||||
/// Calibration data for the <see cref="Bme680"/>.
|
|
@ -2,12 +2,9 @@
|
|||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using Iot.Device.Bmxx80;
|
||||
using Iot.Device.Bmxx80.CalibrationData;
|
||||
using Iot.Device.Bmxx80.Register;
|
||||
using NucuCar.Sensors.Environment.Bmxx80.Register;
|
||||
using NucuCar.Sensors.Modules.Environment.Bmxx80.Register;
|
||||
|
||||
namespace NucuCar.Sensors.Environment.Bmxx80.CalibrationData
|
||||
namespace NucuCar.Sensors.Modules.Environment.Bmxx80.CalibrationData
|
||||
{
|
||||
/// <summary>
|
||||
/// Calibration data for the BMP280.
|
|
@ -2,9 +2,7 @@
|
|||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using Iot.Device.Bmxx80;
|
||||
|
||||
namespace NucuCar.Sensors.Environment.Bmxx80.CalibrationData
|
||||
namespace NucuCar.Sensors.Modules.Environment.Bmxx80.CalibrationData
|
||||
{
|
||||
/// <summary>
|
||||
/// Calibration data for the Bmxx80 family.
|
|
@ -2,7 +2,7 @@
|
|||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
namespace NucuCar.Sensors.Environment.Bmxx80
|
||||
namespace NucuCar.Sensors.Modules.Environment.Bmxx80
|
||||
{
|
||||
/// <summary>
|
||||
/// Indicates the status of the device.
|
|
@ -2,7 +2,7 @@
|
|||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
namespace NucuCar.Sensors.Environment.Bmxx80.FilteringMode
|
||||
namespace NucuCar.Sensors.Modules.Environment.Bmxx80.FilteringMode
|
||||
{
|
||||
/// <summary>
|
||||
/// IIR filter coefficient. The higher the coefficient, the slower the sensors
|
|
@ -2,7 +2,7 @@
|
|||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
namespace NucuCar.Sensors.Environment.Bmxx80.FilteringMode
|
||||
namespace NucuCar.Sensors.Modules.Environment.Bmxx80.FilteringMode
|
||||
{
|
||||
/// <summary>
|
||||
/// Bmx280 devices feature an internal IIR filter.
|
|
@ -2,7 +2,7 @@
|
|||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
namespace NucuCar.Sensors.Environment.Bmxx80.PowerMode
|
||||
namespace NucuCar.Sensors.Modules.Environment.Bmxx80.PowerMode
|
||||
{
|
||||
/// <summary>
|
||||
/// Sensor power mode.
|
|
@ -2,7 +2,7 @@
|
|||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
namespace NucuCar.Sensors.Environment.Bmxx80.PowerMode
|
||||
namespace NucuCar.Sensors.Modules.Environment.Bmxx80.PowerMode
|
||||
{
|
||||
/// <summary>
|
||||
/// Sensor power mode.
|
|
@ -2,7 +2,7 @@
|
|||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
namespace NucuCar.Sensors.Environment.Bmxx80.Register
|
||||
namespace NucuCar.Sensors.Modules.Environment.Bmxx80.Register
|
||||
{
|
||||
/// <summary>
|
||||
/// General control registers for the BME280.
|
|
@ -2,7 +2,7 @@
|
|||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
namespace NucuCar.Sensors.Environment.Bmxx80.Register
|
||||
namespace NucuCar.Sensors.Modules.Environment.Bmxx80.Register
|
||||
{
|
||||
/// <summary>
|
||||
/// General control registers for the BME680.
|
|
@ -2,7 +2,7 @@
|
|||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
namespace NucuCar.Sensors.Environment.Bmxx80.Register
|
||||
namespace NucuCar.Sensors.Modules.Environment.Bmxx80.Register
|
||||
{
|
||||
/// <summary>
|
||||
/// Register shared by the Bmx280 family.
|
|
@ -2,7 +2,7 @@
|
|||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
namespace NucuCar.Sensors.Environment.Bmxx80.Register
|
||||
namespace NucuCar.Sensors.Modules.Environment.Bmxx80.Register
|
||||
{
|
||||
/// <summary>
|
||||
/// Registers shared in the Bmxx80 family.
|
|
@ -2,7 +2,7 @@
|
|||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
namespace NucuCar.Sensors.Environment.Bmxx80
|
||||
namespace NucuCar.Sensors.Modules.Environment.Bmxx80
|
||||
{
|
||||
/// <summary>
|
||||
/// Oversampling settings.
|
|
@ -2,7 +2,7 @@
|
|||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
namespace NucuCar.Sensors.Environment.Bmxx80
|
||||
namespace NucuCar.Sensors.Modules.Environment.Bmxx80
|
||||
{
|
||||
/// <summary>
|
||||
/// Controls the inactive duration in normal mode.
|
|
@ -1,4 +1,4 @@
|
|||
namespace NucuCar.Sensors.Environment.Bmxx80.Units
|
||||
namespace NucuCar.Sensors.Modules.Environment.Bmxx80.Units
|
||||
{
|
||||
/// <summary>
|
||||
/// Structure representing pressure
|
|
@ -1,4 +1,4 @@
|
|||
namespace NucuCar.Sensors.Environment.Bmxx80.Units
|
||||
namespace NucuCar.Sensors.Modules.Environment.Bmxx80.Units
|
||||
{
|
||||
public struct Temperature
|
||||
{
|
|
@ -1,5 +1,5 @@
|
|||
// ReSharper disable UnusedAutoPropertyAccessor.Global
|
||||
namespace NucuCar.Sensors.Health
|
||||
namespace NucuCar.Sensors.Modules.Health
|
||||
{
|
||||
public class CpuTempConfig
|
||||
{
|
|
@ -7,7 +7,7 @@ using NucuCar.Sensors.Abstractions;
|
|||
using NucuCar.Sensors.Grpc;
|
||||
using NucuCarSensorsProto;
|
||||
|
||||
namespace NucuCar.Sensors.Health
|
||||
namespace NucuCar.Sensors.Modules.Health
|
||||
{
|
||||
public class CpuTempGrpcService : HealthSensorGrpcService.HealthSensorGrpcServiceBase
|
||||
{
|
|
@ -8,7 +8,7 @@ using Newtonsoft.Json;
|
|||
using NucuCar.Sensors.Abstractions;
|
||||
using NucuCarSensorsProto;
|
||||
|
||||
namespace NucuCar.Sensors.Health
|
||||
namespace NucuCar.Sensors.Modules.Health
|
||||
{
|
||||
public class CpuTempSensor : GenericTelemeterSensor, ISensor<CpuTempSensor>
|
||||
{
|
|
@ -1,8 +1,7 @@
|
|||
using Microsoft.Extensions.Logging;
|
||||
using NucuCar.Sensors.Abstractions;
|
||||
using NucuCar.Telemetry;
|
||||
|
||||
namespace NucuCar.Sensors.Health
|
||||
namespace NucuCar.Sensors.Modules.Health
|
||||
{
|
||||
public class CpuTempWorker : SensorWorker
|
||||
{
|
|
@ -81,8 +81,4 @@
|
|||
<ProjectReference Include="..\NucuCar.Domain.Telemetry\NucuCar.Domain.Telemetry.csproj" />
|
||||
<ProjectReference Include="..\NucuCar.Domain\NucuCar.Domain.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="Modules" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
|
|
@ -2,9 +2,9 @@ using Microsoft.AspNetCore.Hosting;
|
|||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using NucuCar.Sensors.Abstractions;
|
||||
using NucuCar.Sensors.Environment;
|
||||
using NucuCar.Sensors.Grpc;
|
||||
using NucuCar.Sensors.Health;
|
||||
using NucuCar.Sensors.Modules.Environment;
|
||||
using NucuCar.Sensors.Modules.Health;
|
||||
using NucuCar.Telemetry;
|
||||
|
||||
namespace NucuCar.Sensors
|
||||
|
|
|
@ -3,7 +3,7 @@ using Microsoft.Extensions.Options;
|
|||
using Moq;
|
||||
using NucuCar.Sensors;
|
||||
using NucuCar.Sensors.Abstractions;
|
||||
using NucuCar.Sensors.Environment;
|
||||
using NucuCar.Sensors.Modules.Environment;
|
||||
using NucuCarSensorsProto;
|
||||
using Xunit;
|
||||
|
|
@ -3,13 +3,13 @@ using System.Threading.Tasks;
|
|||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Moq;
|
||||
using NucuCar.Sensors;
|
||||
using NucuCar.Sensors.Abstractions;
|
||||
using NucuCar.Sensors.Environment;
|
||||
using NucuCar.Sensors.Modules.Environment;
|
||||
using NucuCar.UnitTests.NucuCar.Sensors.Tests.EnvironmentSensor.Tests;
|
||||
using NucuCarSensorsProto;
|
||||
using Xunit;
|
||||
|
||||
namespace NucuCar.UnitTests.NucuCar.Sensors.Tests.EnvironmentSensor.Tests
|
||||
namespace NucuCar.UnitTests.NucuCar.Sensors.Tests.EnvironmentSensor
|
||||
{
|
||||
public class Bme680WorkerTest
|
||||
{
|
|
@ -1,5 +1,5 @@
|
|||
using System.Threading.Tasks;
|
||||
using NucuCar.Sensors.Environment;
|
||||
using NucuCar.Sensors.Modules.Environment;
|
||||
using NucuCarSensorsProto;
|
||||
|
||||
namespace NucuCar.UnitTests.NucuCar.Sensors.Tests.EnvironmentSensor.Tests
|
Loading…
Reference in a new issue