Browse Source

WIP: xadc: increase resolution of voltages to 2 decimals

tags/1.7.0-beta2
mntmn 1 month ago
parent
commit
317071571d
Signed by: mntmn <lukas@mntre.com> GPG Key ID: 376511EB67AD7BAF
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      ZZ9000_proto.sdk/ZZ9000OS/src/main.c

+ 2
- 2
ZZ9000_proto.sdk/ZZ9000OS/src/main.c View File

@@ -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;
}
}


Loading…
Cancel
Save