2013-09-22 03:01:24 -03:00
|
|
|
|
|
|
|
#ifndef __AP_HAL_LINUX_UTIL_H__
|
|
|
|
#define __AP_HAL_LINUX_UTIL_H__
|
|
|
|
|
|
|
|
#include <AP_HAL.h>
|
|
|
|
#include "AP_HAL_Linux_Namespace.h"
|
2014-11-15 01:51:21 -04:00
|
|
|
#include "ToneAlarmDriver.h"
|
2014-08-23 04:52:43 -03:00
|
|
|
|
2013-09-22 03:01:24 -03:00
|
|
|
class Linux::LinuxUtil : public AP_HAL::Util {
|
|
|
|
public:
|
2014-02-22 17:15:39 -04:00
|
|
|
void init(int argc, char * const *argv) {
|
|
|
|
saved_argc = argc;
|
|
|
|
saved_argv = argv;
|
|
|
|
}
|
|
|
|
|
2014-08-23 04:52:43 -03:00
|
|
|
|
2013-09-22 03:01:24 -03:00
|
|
|
bool run_debug_shell(AP_HAL::BetterStream *stream) { return false; }
|
2014-02-22 17:15:39 -04:00
|
|
|
|
|
|
|
/**
|
|
|
|
return commandline arguments, if available
|
|
|
|
*/
|
|
|
|
void commandline_arguments(uint8_t &argc, char * const *&argv);
|
|
|
|
|
2014-11-15 01:51:21 -04:00
|
|
|
bool toneAlarm_init();
|
2014-08-23 04:52:43 -03:00
|
|
|
void toneAlarm_set_tune(uint8_t tune);
|
|
|
|
|
|
|
|
void _toneAlarm_timer_tick();
|
2014-11-15 01:51:21 -04:00
|
|
|
|
2015-01-19 13:30:18 -04:00
|
|
|
/*
|
|
|
|
set system clock in UTC microseconds
|
|
|
|
*/
|
|
|
|
void set_system_clock(uint64_t time_utc_usec);
|
|
|
|
|
2014-11-15 01:51:21 -04:00
|
|
|
private:
|
|
|
|
static Linux::ToneAlarm _toneAlarm;
|
2014-02-22 17:15:39 -04:00
|
|
|
int saved_argc;
|
|
|
|
char* const *saved_argv;
|
2013-09-22 03:01:24 -03:00
|
|
|
};
|
|
|
|
|
2014-08-23 04:52:43 -03:00
|
|
|
|
|
|
|
|
2013-09-22 03:01:24 -03:00
|
|
|
#endif // __AP_HAL_LINUX_UTIL_H__
|