Skip to content

Commit

Permalink
Corrected calc error
Browse files Browse the repository at this point in the history
  • Loading branch information
MrD-RC committed Jan 18, 2025
1 parent 3beae50 commit 9984acd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/io/osd/custom_elements.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ uint8_t customElementDrawPart(char *buff, uint8_t customElementIndex, uint8_t cu
}
case CUSTOM_ELEMENT_TYPE_GV_FLOAT_1_2:
{
osdFormatCentiNumber(buff, (int32_t) (constrain(gvGet(customPartValue), -999, 999) * (int32_t) 10), 1, 2, 0, 4, false);
osdFormatCentiNumber(buff, (int32_t) (constrain(gvGet(customPartValue), -999, 999)), 1, 2, 0, 4, false);
return 4;
}
case CUSTOM_ELEMENT_TYPE_GV_FLOAT_2_1:
Expand Down Expand Up @@ -161,7 +161,7 @@ uint8_t customElementDrawPart(char *buff, uint8_t customElementIndex, uint8_t cu
}
case CUSTOM_ELEMENT_TYPE_LC_FLOAT_1_2:
{
osdFormatCentiNumber(buff, (int32_t) (constrain(logicConditionGetValue(customPartValue), -999, 999) * (int32_t) 10), 1, 2, 0, 4, false);
osdFormatCentiNumber(buff, (int32_t) (constrain(logicConditionGetValue(customPartValue), -999, 999)), 1, 2, 0, 4, false);
return 4;
}
case CUSTOM_ELEMENT_TYPE_LC_FLOAT_2_1:
Expand Down

0 comments on commit 9984acd

Please sign in to comment.