diff options
author | Julian Oes <joes@student.ethz.ch> | 2013-02-18 14:06:09 -0800 |
---|---|---|
committer | Julian Oes <joes@student.ethz.ch> | 2013-02-18 14:06:09 -0800 |
commit | f8326300e89c63c57662868d6253b06a13621401 (patch) | |
tree | 53008bea05fe3c8fdbe0515c2b8027d15bbd7b5f /apps/commander | |
parent | 5e7a38d9469d64ecd4a9fdf6d9c3b61cba618b87 (diff) | |
parent | 9f15f38e5705d73e1dfdf381c8d3b458a8a1557b (diff) | |
download | px4-firmware-f8326300e89c63c57662868d6253b06a13621401.tar.gz px4-firmware-f8326300e89c63c57662868d6253b06a13621401.tar.bz2 px4-firmware-f8326300e89c63c57662868d6253b06a13621401.zip |
Merge branch 'px4io-i2c' into new_state_machine
Conflicts:
apps/uORB/topics/vehicle_status.h
Diffstat (limited to 'apps/commander')
-rw-r--r-- | apps/commander/commander.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/apps/commander/commander.c b/apps/commander/commander.c index b94efc5c4..27c5f1989 100644 --- a/apps/commander/commander.c +++ b/apps/commander/commander.c @@ -1297,6 +1297,8 @@ int commander_thread_main(int argc, char *argv[]) param_get(param_find("SYS_FAILSAVE_LL"), &failsafe_lowlevel_timeout_ms); param_t _param_sys_type = param_find("MAV_TYPE"); + param_t _param_system_id = param_find("MAV_SYS_ID"); + param_t _param_component_id = param_find("MAV_COMP_ID"); /* welcome user */ warnx("[commander] starting"); @@ -1495,6 +1497,7 @@ int commander_thread_main(int argc, char *argv[]) /* parameters changed */ orb_copy(ORB_ID(parameter_update), param_changed_sub, ¶m_changed); + /* update parameters */ if (!current_status.flag_system_armed) { if (param_get(_param_sys_type, &(current_status.system_type)) != OK) { @@ -1510,6 +1513,11 @@ int commander_thread_main(int argc, char *argv[]) } else { current_status.flag_external_manual_override_ok = true; } + + /* check and update system / component ID */ + param_get(_param_system_id, &(current_status.system_id)); + param_get(_param_component_id, &(current_status.component_id)); + } } |