Browse Source

commander: remove counter

The counter variable in system status wasn't used anywhere.
sbg
Julian Oes 9 years ago
parent
commit
fe85841a1d
  1. 1
      msg/vehicle_status.msg
  2. 5
      src/modules/commander/commander.cpp

1
msg/vehicle_status.msg

@ -57,7 +57,6 @@ uint8 RC_IN_MODE_GENERATED = 2 @@ -57,7 +57,6 @@ uint8 RC_IN_MODE_GENERATED = 2
# state machine / state of vehicle.
# Encodes the complete system state and is set by the commander app.
uint16 counter # incremented by the writing thread everytime new data is stored
uint64 timestamp # in microseconds since system start, is set whenever the writing thread stores new data
uint8 main_state # main state machine

5
src/modules/commander/commander.cpp

@ -1,6 +1,6 @@ @@ -1,6 +1,6 @@
/****************************************************************************
*
* Copyright (c) 2013-2015 PX4 Development Team. All rights reserved.
* Copyright (c) 2013-2016 PX4 Development Team. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@ -39,7 +39,7 @@ @@ -39,7 +39,7 @@
* @author Petri Tanskanen <petri.tanskanen@inf.ethz.ch>
* @author Lorenz Meier <lorenz@px4.io>
* @author Thomas Gubler <thomas@px4.io>
* @author Julian Oes <julian@px4.io>
* @author Julian Oes <julian@oes.ch>
* @author Anton Babushkin <anton@px4.io>
* @author Sander Smeets <sander@droneslab.com>
*/
@ -1258,7 +1258,6 @@ int commander_thread_main(int argc, char *argv[]) @@ -1258,7 +1258,6 @@ int commander_thread_main(int argc, char *argv[])
status.condition_system_prearm_error_reported = false;
status.condition_system_hotplug_timeout = false;
status.counter++;
status.timestamp = hrt_absolute_time();
status.condition_power_input_valid = true;

Loading…
Cancel
Save