Skip to content

Commit

Permalink
AP_PiccoloCAN: fixed late load of CAN parameters
Browse files Browse the repository at this point in the history
we need to load parameters in the constructor to ensure we don't
subscribe before we have parameters. Fixes a bug found by WickedShell
where the wrong CAN ESC offset is used on startup
  • Loading branch information
tridge committed Jan 27, 2024
1 parent b1ab91b commit 2cda561
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions libraries/AP_PiccoloCAN/AP_PiccoloCAN.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ const AP_Param::GroupInfo AP_PiccoloCAN::var_info[] = {
AP_PiccoloCAN::AP_PiccoloCAN()
{
AP_Param::setup_object_defaults(this, var_info);
AP_Param::load_object_from_eeprom(this, var_info);

debug_can(AP_CANManager::LOG_INFO, "PiccoloCAN: constructed\n\r");
}
Expand Down

0 comments on commit 2cda561

Please sign in to comment.