Unverified Commit 31707157 authored by mntmn's avatar mntmn
Browse files

WIP: xadc: increase resolution of voltages to 2 decimals

parent edc90658
......@@ -2234,11 +2234,11 @@ int main() {
}
case REG_ZZ_TEMPERATURE: {
// includes REG_ZZ_VOLTAGE_AUX in lower 16 bits
data = (((uint32_t)(xadc_get_temperature()*10.0)) << 16) | ((uint32_t)(xadc_get_aux_voltage()*10.0));
data = (((uint32_t)(xadc_get_temperature()*10.0)) << 16) | ((uint32_t)(xadc_get_aux_voltage()*100.0));
break;
}
case REG_ZZ_VOLTAGE_INT: {
data = ((int16_t)(xadc_get_int_voltage()*10.0)) << 16;
data = ((int16_t)(xadc_get_int_voltage()*100.0)) << 16;
break;
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment