Copter: show git and firmware version in tlog
This commit is contained in:
parent
407bbed179
commit
1bec20482f
@ -1478,8 +1478,10 @@ void GCS_MAVLINK::handleMessage(mavlink_message_t* msg)
|
||||
mavlink_msg_param_request_list_decode(msg, &packet);
|
||||
if (mavlink_check_target(packet.target_system,packet.target_component)) break;
|
||||
|
||||
// Start sending parameters - next call to ::update will kick the first one out
|
||||
// mark the firmware version in the tlog
|
||||
send_text_P(SEVERITY_LOW, PSTR(FIRMWARE_STRING));
|
||||
|
||||
// Start sending parameters - next call to ::update will kick the first one out
|
||||
_queued_parameter = AP_Param::first(&_queued_parameter_token, &_queued_parameter_type);
|
||||
_queued_parameter_index = 0;
|
||||
_queued_parameter_count = _count_parameters();
|
||||
|
@ -832,7 +832,7 @@ static void Log_Read(uint16_t log_num, uint16_t start_page, uint16_t end_page)
|
||||
cliSerial->printf_P(PSTR((AIRFRAME_NAME)));
|
||||
#endif
|
||||
|
||||
cliSerial->printf_P(PSTR("\n" THISFIRMWARE
|
||||
cliSerial->printf_P(PSTR("\n" FIRMWARE_STRING
|
||||
"\nFree RAM: %u\n"),
|
||||
(unsigned) memcheck_available_memory());
|
||||
|
||||
@ -851,6 +851,7 @@ static void start_logging()
|
||||
if (g.log_bitmask != 0 && !ap.logging_started) {
|
||||
ap.logging_started = true;
|
||||
DataFlash.StartNewLog(sizeof(log_structure)/sizeof(log_structure[0]), log_structure);
|
||||
DataFlash.Log_Write_Message_P(PSTR(FIRMWARE_STRING));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1053,4 +1053,14 @@
|
||||
# define CLI_ENABLED ENABLED
|
||||
#endif
|
||||
|
||||
/*
|
||||
build a firmware version string.
|
||||
GIT_VERSION comes from Makefile builds
|
||||
*/
|
||||
#ifndef GIT_VERSION
|
||||
#define FIRMWARE_STRING THISFIRMWARE
|
||||
#else
|
||||
#define FIRMWARE_STRING THISFIRMWARE " (" GIT_VERSION ")"
|
||||
#endif
|
||||
|
||||
#endif // __ARDUCOPTER_CONFIG_H__
|
||||
|
@ -103,7 +103,7 @@ static void init_ardupilot()
|
||||
hal.uartB->begin(38400, 256, 16);
|
||||
#endif
|
||||
|
||||
cliSerial->printf_P(PSTR("\n\nInit " THISFIRMWARE
|
||||
cliSerial->printf_P(PSTR("\n\nInit " FIRMWARE_STRING
|
||||
"\n\nFree RAM: %u\n"),
|
||||
memcheck_available_memory());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user