diff --git a/backend/api/Database/Context/InitDb.cs b/backend/api/Database/Context/InitDb.cs index d17a0e2e..d2ac0502 100644 --- a/backend/api/Database/Context/InitDb.cs +++ b/backend/api/Database/Context/InitDb.cs @@ -576,15 +576,14 @@ public static void AddRobotModelsToContext(FlotillaDbContext context) { foreach (var type in Enum.GetValues()) { - RobotModel model = - new() - { - Type = type, - BatteryWarningThreshold = null, - BatteryMissionStartThreshold = null, - LowerPressureWarningThreshold = null, - UpperPressureWarningThreshold = null, - }; + RobotModel model = new() + { + Type = type, + BatteryWarningThreshold = null, + BatteryMissionStartThreshold = null, + LowerPressureWarningThreshold = null, + UpperPressureWarningThreshold = null, + }; context.Add(model); } } diff --git a/backend/api/MQTT/MqttService.cs b/backend/api/MQTT/MqttService.cs index 5b3f2b7a..19da6961 100644 --- a/backend/api/MQTT/MqttService.cs +++ b/backend/api/MQTT/MqttService.cs @@ -28,8 +28,10 @@ public class MqttService : BackgroundService private readonly int _serverPort; private readonly bool _shouldFailOnMaxRetries; - private static readonly JsonSerializerOptions serializerOptions = - new() { Converters = { new JsonStringEnumConverter(JsonNamingPolicy.CamelCase) } }; + private static readonly JsonSerializerOptions serializerOptions = new() + { + Converters = { new JsonStringEnumConverter(JsonNamingPolicy.CamelCase) }, + }; private CancellationToken _cancellationToken; private int _reconnectAttempts; diff --git a/backend/api/MQTT/MqttTopics.cs b/backend/api/MQTT/MqttTopics.cs index 93f05290..c984f473 100644 --- a/backend/api/MQTT/MqttTopics.cs +++ b/backend/api/MQTT/MqttTopics.cs @@ -11,19 +11,18 @@ public static class MqttTopics /// /// A dictionary linking MQTT topics to their respective message models /// - public static readonly Dictionary TopicsToMessages = - new() - { - { "isar/+/status", typeof(IsarStatusMessage) }, - { "isar/+/robot_info", typeof(IsarRobotInfoMessage) }, - { "isar/+/robot_heartbeat", typeof(IsarRobotHeartbeatMessage) }, - { "isar/+/mission", typeof(IsarMissionMessage) }, - { "isar/+/task", typeof(IsarTaskMessage) }, - { "isar/+/battery", typeof(IsarBatteryMessage) }, - { "isar/+/pressure", typeof(IsarPressureMessage) }, - { "isar/+/pose", typeof(IsarPoseMessage) }, - { "isar/+/cloud_health", typeof(IsarCloudHealthMessage) }, - }; + public static readonly Dictionary TopicsToMessages = new() + { + { "isar/+/status", typeof(IsarStatusMessage) }, + { "isar/+/robot_info", typeof(IsarRobotInfoMessage) }, + { "isar/+/robot_heartbeat", typeof(IsarRobotHeartbeatMessage) }, + { "isar/+/mission", typeof(IsarMissionMessage) }, + { "isar/+/task", typeof(IsarTaskMessage) }, + { "isar/+/battery", typeof(IsarBatteryMessage) }, + { "isar/+/pressure", typeof(IsarPressureMessage) }, + { "isar/+/pose", typeof(IsarPoseMessage) }, + { "isar/+/cloud_health", typeof(IsarCloudHealthMessage) }, + }; /// /// Searches a dictionary for a specific topic name and returns the corresponding value from the wildcarded dictionary