mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-09 16:13:56 -03:00
HAL_Linux: fixed setting of custom directories
This commit is contained in:
parent
f592981a60
commit
a3c7297d8e
libraries/AP_HAL_Linux
@ -163,10 +163,10 @@ void HAL_Linux::init(int argc,char* const argv[]) const
|
||||
uartEDriver.set_device_path(gopt.optarg);
|
||||
break;
|
||||
case 'l':
|
||||
custom_log_directory = gopt.optarg;
|
||||
utilInstance.set_custom_log_directory(gopt.optarg);
|
||||
break;
|
||||
case 't':
|
||||
custom_terrain_directory = gopt.optarg;
|
||||
utilInstance.set_custom_terrain_directory(gopt.optarg);
|
||||
break;
|
||||
case 'h':
|
||||
_usage();
|
||||
|
@ -10,12 +10,6 @@ class HAL_Linux : public AP_HAL::HAL {
|
||||
public:
|
||||
HAL_Linux();
|
||||
void init(int argc, char * const * argv) const;
|
||||
const char* get_custom_log_directory() { return custom_log_directory; }
|
||||
const char* get_custom_terrain_directory() { return custom_terrain_directory; }
|
||||
|
||||
private:
|
||||
mutable const char* custom_log_directory = NULL;
|
||||
mutable const char* custom_terrain_directory = NULL;
|
||||
};
|
||||
|
||||
extern const HAL_Linux AP_HAL_Linux;
|
||||
|
@ -30,8 +30,11 @@ public:
|
||||
set system clock in UTC microseconds
|
||||
*/
|
||||
void set_system_clock(uint64_t time_utc_usec);
|
||||
const char* get_custom_log_directory();
|
||||
const char* get_custom_terrain_directory();
|
||||
const char* get_custom_log_directory() { return custom_log_directory; }
|
||||
const char* get_custom_terrain_directory() { return custom_terrain_directory; }
|
||||
|
||||
void set_custom_log_directory(const char *_custom_log_directory) { custom_log_directory = _custom_log_directory; }
|
||||
void set_custom_terrain_directory(const char *_custom_terrain_directory) { custom_terrain_directory = _custom_terrain_directory; }
|
||||
|
||||
bool is_chardev_node(const char *path);
|
||||
|
||||
@ -39,6 +42,8 @@ private:
|
||||
static Linux::ToneAlarm _toneAlarm;
|
||||
int saved_argc;
|
||||
char* const *saved_argv;
|
||||
const char* custom_log_directory = NULL;
|
||||
const char* custom_terrain_directory = NULL;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user