mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-23 08:13:56 -04:00
Copter: show git and firmware version in tlog
This commit is contained in:
parent
cae3d3b378
commit
6b1f59372c
@ -1478,8 +1478,10 @@ void GCS_MAVLINK::handleMessage(mavlink_message_t* msg)
|
|||||||
mavlink_msg_param_request_list_decode(msg, &packet);
|
mavlink_msg_param_request_list_decode(msg, &packet);
|
||||||
if (mavlink_check_target(packet.target_system,packet.target_component)) break;
|
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 = AP_Param::first(&_queued_parameter_token, &_queued_parameter_type);
|
||||||
_queued_parameter_index = 0;
|
_queued_parameter_index = 0;
|
||||||
_queued_parameter_count = _count_parameters();
|
_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)));
|
cliSerial->printf_P(PSTR((AIRFRAME_NAME)));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
cliSerial->printf_P(PSTR("\n" THISFIRMWARE
|
cliSerial->printf_P(PSTR("\n" FIRMWARE_STRING
|
||||||
"\nFree RAM: %u\n"),
|
"\nFree RAM: %u\n"),
|
||||||
(unsigned) memcheck_available_memory());
|
(unsigned) memcheck_available_memory());
|
||||||
|
|
||||||
@ -851,6 +851,7 @@ static void start_logging()
|
|||||||
if (g.log_bitmask != 0 && !ap.logging_started) {
|
if (g.log_bitmask != 0 && !ap.logging_started) {
|
||||||
ap.logging_started = true;
|
ap.logging_started = true;
|
||||||
DataFlash.StartNewLog(sizeof(log_structure)/sizeof(log_structure[0]), log_structure);
|
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
|
# define CLI_ENABLED ENABLED
|
||||||
#endif
|
#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__
|
#endif // __ARDUCOPTER_CONFIG_H__
|
||||||
|
@ -103,7 +103,7 @@ static void init_ardupilot()
|
|||||||
hal.uartB->begin(38400, 256, 16);
|
hal.uartB->begin(38400, 256, 16);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
cliSerial->printf_P(PSTR("\n\nInit " THISFIRMWARE
|
cliSerial->printf_P(PSTR("\n\nInit " FIRMWARE_STRING
|
||||||
"\n\nFree RAM: %u\n"),
|
"\n\nFree RAM: %u\n"),
|
||||||
memcheck_available_memory());
|
memcheck_available_memory());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user