mirror of
https://github.com/dz0ny/meshcore-sar.git
synced 2026-08-11 08:20:36 +00:00
fix: Tame rapid GPS updates #41
This commit is contained in:
@@ -19,6 +19,13 @@ void main() {
|
||||
service.fastLocationChannelIdx = null;
|
||||
});
|
||||
|
||||
test('loads conservative fast location defaults', () async {
|
||||
await service.loadSettings();
|
||||
|
||||
expect(service.fastLocationMovementThresholdMeters, 10.0);
|
||||
expect(service.fastLocationActiveCadenceSeconds, 10);
|
||||
});
|
||||
|
||||
test('persists and restores fast location channel idx', () async {
|
||||
await service.updateFastLocationChannelIdx(3);
|
||||
|
||||
@@ -37,4 +44,12 @@ void main() {
|
||||
|
||||
expect(service.fastLocationChannelIdx, isNull);
|
||||
});
|
||||
|
||||
test('clamps fast location settings to conservative limits', () async {
|
||||
await service.updateFastLocationMovementThreshold(3);
|
||||
await service.updateFastLocationActiveCadenceSeconds(45);
|
||||
|
||||
expect(service.fastLocationMovementThresholdMeters, 10.0);
|
||||
expect(service.fastLocationActiveCadenceSeconds, 31);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user