diff --git a/ArduPlane/GCS_Mavlink.pde b/ArduPlane/GCS_Mavlink.pde index 48b434a233..b4de2d9653 100644 --- a/ArduPlane/GCS_Mavlink.pde +++ b/ArduPlane/GCS_Mavlink.pde @@ -1461,8 +1461,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(); diff --git a/ArduPlane/Log.pde b/ArduPlane/Log.pde index 997f101b92..de7dc0c5a5 100644 --- a/ArduPlane/Log.pde +++ b/ArduPlane/Log.pde @@ -478,7 +478,7 @@ static const struct LogStructure log_structure[] PROGMEM = { // Read the DataFlash.log memory : Packet Parser static void Log_Read(uint16_t log_num, int16_t start_page, int16_t end_page) { - cliSerial->printf_P(PSTR("\n" THISFIRMWARE + cliSerial->printf_P(PSTR("\n" FIRMWARE_STRING "\nFree RAM: %u\n"), (unsigned) memcheck_available_memory()); @@ -495,6 +495,7 @@ static void Log_Read(uint16_t log_num, int16_t start_page, int16_t end_page) static void start_logging() { DataFlash.StartNewLog(sizeof(log_structure)/sizeof(log_structure[0]), log_structure); + DataFlash.Log_Write_Message_P(PSTR(FIRMWARE_STRING)); } #else // LOGGING_ENABLED diff --git a/ArduPlane/config.h b/ArduPlane/config.h index 1e9219d529..105a50ab09 100644 --- a/ArduPlane/config.h +++ b/ArduPlane/config.h @@ -529,3 +529,12 @@ # define SERIAL2_BUFSIZE 256 #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 diff --git a/ArduPlane/system.pde b/ArduPlane/system.pde index 2764c03b1e..25332ef24e 100644 --- a/ArduPlane/system.pde +++ b/ArduPlane/system.pde @@ -82,7 +82,7 @@ static void init_ardupilot() // standard gps running hal.uartB->begin(38400, 256, 16); - cliSerial->printf_P(PSTR("\n\nInit " THISFIRMWARE + cliSerial->printf_P(PSTR("\n\nInit " FIRMWARE_STRING "\n\nFree RAM: %u\n"), memcheck_available_memory());