aboutsummaryrefslogtreecommitdiff
path: root/src/test/java/org/traccar/protocol/M2mProtocolDecoderTest.java
diff options
context:
space:
mode:
authorjcardus <asklocation.net@gmail.com>2022-10-26 14:48:31 +0100
committerGitHub <noreply@github.com>2022-10-26 14:48:31 +0100
commit8ceb20c2d9c70f5e0aa107095a23c187019401f1 (patch)
tree2e4e411a6c9d6b26f6841639cffdfaf931d54255 /src/test/java/org/traccar/protocol/M2mProtocolDecoderTest.java
parent78a0df7befc84b7d138b403b137f26f9df379c3d (diff)
downloadtrackermap-server-8ceb20c2d9c70f5e0aa107095a23c187019401f1.tar.gz
trackermap-server-8ceb20c2d9c70f5e0aa107095a23c187019401f1.tar.bz2
trackermap-server-8ceb20c2d9c70f5e0aa107095a23c187019401f1.zip
2 Bugs on maintenance
According to the documentation: "Traccar can help control maintenance intervals of devices. There are two attributes to configure: maintenance.start and maintenance.interval. They can be set in device, group or server attributes. Traccar generates event every time totalDistance attribute gets over maintenance.start + maintenance.interval * N value where N is a natural number. Example: maintenance.start=6000000, maintenance.interval=8000000 Events will be generated when totalDistance goes over 6000 km, 14000 km, 22000 km and so on." In this example, the event won't be fired when it goes over 6000 km. If maintenance.interval < maintenance.start and maintenance.start is multiple of maintenance.interval then the event will be fired before maintenance.start because the comparison will be on negative numbers. Another solution would be to use absolute numbers on the comparison. Example: maintenance.start = 10 000 000 maintenance.interval = 2 000 000 the event will be fired when it goes over 2 000 000 the event wont' be fired when it goes over 10 000 000
Diffstat (limited to 'src/test/java/org/traccar/protocol/M2mProtocolDecoderTest.java')
0 files changed, 0 insertions, 0 deletions