AP_BoardConfig: Increase the number of digits in the board serial number

Co-authored-by: Joshua Henderson <hendjoshsr71@gmail.com>
This commit is contained in:
murata 2022-04-06 02:56:26 -04:00 committed by Andrew Tridgell
parent 069b81819d
commit c6ea688d52
2 changed files with 5 additions and 2 deletions

View File

@ -169,7 +169,7 @@ const AP_Param::GroupInfo AP_BoardConfig::var_info[] = {
// @Param: SERIAL_NUM
// @DisplayName: User-defined serial number
// @Description: User-defined serial number of this vehicle, it can be any arbitrary number you want and has no effect on the autopilot
// @Range: -32768 32767
// @Range: -8388608 8388607
// @User: Standard
AP_GROUPINFO("SERIAL_NUM", 5, AP_BoardConfig, vehicleSerialNumber, 0),
@ -337,6 +337,9 @@ const AP_Param::GroupInfo AP_BoardConfig::var_info[] = {
void AP_BoardConfig::init()
{
// PARAMETER_CONVERSION - Added: APR-2022
vehicleSerialNumber.convert_parameter_width(AP_PARAM_INT16);
board_setup();
AP::rtc().set_utc_usec(hal.util->get_hw_rtc(), AP_RTC::SOURCE_HW);

View File

@ -227,7 +227,7 @@ public:
private:
static AP_BoardConfig *_singleton;
AP_Int16 vehicleSerialNumber;
AP_Int32 vehicleSerialNumber;
struct {
AP_Int8 safety_enable;