Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AP_Volz_Protocol: bugfix with scaling integer #28549

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DjMixMasterDragon
Copy link

Bugfix to the recent Volz protocol implementation. motor_temp_deg and pcb_temp_deg are both defined as uint16_t which is valid pre-scaling (ie. receiving the message from the buffer) but with scaling being done below (range -49 to +204) this will need to account for signed values.

case CMD_ID::TEMPERATURE_RESPONSE:
      // Temperature is reported relative to -50 deg C
      telem.data[index].motor_temp_deg = -50 + cmd.arg1;
      telem.data[index].pcb_temp_deg = -50 + cmd.arg2;
      break;

@IamPete1
Copy link
Member

IamPete1 commented Nov 8, 2024

@DjMixMasterDragon Well spotted, it not been cold enough for me too see this IRL. Have you been testing with hardware? How have you found the updated library? I have only been able to test on one model number.

The logging format type also need changing to match here:

From H to h.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants