Skip to content

Commit

Permalink
[hal] Fix systemcore analog input scaling (#7691)
Browse files Browse the repository at this point in the history
  • Loading branch information
ThadHouse authored Jan 15, 2025
1 parent fa71fb5 commit f81c42e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hal/src/main/native/systemcore/AnalogInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ double HAL_GetAnalogVoltage(HAL_AnalogInputHandle analogPortHandle,

uint16_t ret = 0;
*status = port->GetAnalogInput(&ret);
return ret / 1000.0;
return ret / 4095.0 * 3.3;
}

double HAL_GetAnalogValueToVolts(HAL_AnalogInputHandle analogPortHandle,
Expand Down

0 comments on commit f81c42e

Please sign in to comment.