Warning thresholds added in drone profile. traffic light indication in drone satus menue added. layout and content optimized
This commit is contained in:
@@ -50,6 +50,32 @@ class DroneProfiles extends Table {
|
||||
RealColumn get maxRangeM => real()();
|
||||
RealColumn get maxEnduranceMin => real()();
|
||||
RealColumn get maxAltitudeM => real()();
|
||||
|
||||
/// Ampel-Schwellwerte fuer die Telemetriefelder im Drohnen-Status-Menue
|
||||
/// (siehe domain.DroneProfile-Doku und domain/telemetry/
|
||||
/// telemetry_field_status.dart) - Defaults identisch zu den
|
||||
/// DroneProfile.default*-Konstanten.
|
||||
RealColumn get gpsSatGreenMin =>
|
||||
real().withDefault(const Constant(8.0))();
|
||||
RealColumn get gpsSatRedMin => real().withDefault(const Constant(6.0))();
|
||||
RealColumn get hdopGreenMax => real().withDefault(const Constant(2.0))();
|
||||
RealColumn get hdopRedMax => real().withDefault(const Constant(5.0))();
|
||||
RealColumn get currentGreenMaxA =>
|
||||
real().withDefault(const Constant(20.0))();
|
||||
RealColumn get currentRedMaxA =>
|
||||
real().withDefault(const Constant(30.0))();
|
||||
RealColumn get batteryVoltageGreenMinV =>
|
||||
real().withDefault(const Constant(20.4))();
|
||||
RealColumn get batteryVoltageRedMinV =>
|
||||
real().withDefault(const Constant(19.2))();
|
||||
RealColumn get rxQualityGreenMin =>
|
||||
real().withDefault(const Constant(70.0))();
|
||||
RealColumn get rxQualityRedMin =>
|
||||
real().withDefault(const Constant(50.0))();
|
||||
RealColumn get rxSnrGreenMinDb =>
|
||||
real().withDefault(const Constant(0.0))();
|
||||
RealColumn get rxSnrRedMinDb =>
|
||||
real().withDefault(const Constant(-10.0))();
|
||||
}
|
||||
|
||||
/// Einzeilige Einstellungstabelle (id fest 0) fuer app-weite Auswahl, die
|
||||
@@ -110,7 +136,7 @@ class AppDatabase extends _$AppDatabase {
|
||||
AppDatabase.forTesting(super.executor);
|
||||
|
||||
@override
|
||||
int get schemaVersion => 7;
|
||||
int get schemaVersion => 8;
|
||||
|
||||
@override
|
||||
MigrationStrategy get migration => MigrationStrategy(
|
||||
@@ -157,6 +183,26 @@ class AppDatabase extends _$AppDatabase {
|
||||
if (from < 7) {
|
||||
await m.addColumn(missions, missions.terrainProfileJson);
|
||||
}
|
||||
if (from < 8) {
|
||||
await m.addColumn(droneProfiles, droneProfiles.gpsSatGreenMin);
|
||||
await m.addColumn(droneProfiles, droneProfiles.gpsSatRedMin);
|
||||
await m.addColumn(droneProfiles, droneProfiles.hdopGreenMax);
|
||||
await m.addColumn(droneProfiles, droneProfiles.hdopRedMax);
|
||||
await m.addColumn(droneProfiles, droneProfiles.currentGreenMaxA);
|
||||
await m.addColumn(droneProfiles, droneProfiles.currentRedMaxA);
|
||||
await m.addColumn(
|
||||
droneProfiles,
|
||||
droneProfiles.batteryVoltageGreenMinV,
|
||||
);
|
||||
await m.addColumn(
|
||||
droneProfiles,
|
||||
droneProfiles.batteryVoltageRedMinV,
|
||||
);
|
||||
await m.addColumn(droneProfiles, droneProfiles.rxQualityGreenMin);
|
||||
await m.addColumn(droneProfiles, droneProfiles.rxQualityRedMin);
|
||||
await m.addColumn(droneProfiles, droneProfiles.rxSnrGreenMinDb);
|
||||
await m.addColumn(droneProfiles, droneProfiles.rxSnrRedMinDb);
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user