AP_HAL: add soft_armed state to hal.util

This commit is contained in:
Jonathan Challinger 2015-01-28 15:15:48 -08:00 committed by Andrew Tridgell
parent 5059fc620c
commit aa7776ea59
1 changed files with 9 additions and 1 deletions

View File

@ -8,6 +8,9 @@
class AP_HAL::Util {
public:
// soft_armed starts out true
Util() : soft_armed(true) {}
int snprintf(char* str, size_t size,
const char *format, ...);
@ -20,6 +23,9 @@ public:
int vsnprintf_P(char* str, size_t size,
const prog_char_t *format, va_list ap);
void set_soft_armed(const bool b) { soft_armed = b; }
bool get_soft_armed() const { return soft_armed; }
// run a debug shall on the given stream if possible. This is used
// to support dropping into a debug shell to run firmware upgrade
// commands
@ -65,7 +71,9 @@ public:
virtual bool toneAlarm_init() { return false;}
virtual void toneAlarm_set_tune(uint8_t tune) {}
virtual void _toneAlarm_timer_tick() {}
protected:
bool soft_armed;
};
#endif // __AP_HAL_UTIL_H__