application: minor, rename print_voltage to printf_fpu

This commit is contained in:
King Kévin 2021-03-11 13:51:13 +01:00
parent 312da80d6b
commit a90c189eb3
1 changed files with 3 additions and 3 deletions

View File

@ -92,7 +92,7 @@ size_t putc(char c)
* @param[in] precision number of digits after comma to print
* @note %f is used to force scientific notation
*/
static void print_voltage(double voltage, uint8_t precision)
static void print_fpu(double voltage, uint8_t precision)
{
uint32_t multiplier = 1;
for (uint8_t i = 0; i < precision; i++) {
@ -139,7 +139,7 @@ static void print_voltage_target(void)
gpio_set(GPIO_PORT(TARGET_EN), GPIO_PIN(TARGET_EN)); // ensure the level shifters pulling up the signals are not enabled
float* voltages = measure_voltages(); // measure voltages
puts("target voltage: ");
print_voltage(voltages[1], 2);
print_fpu(voltages[1], 2);
puts(" V");
if (voltages[1] > 3.25) {
puts(" (warning: signal voltage may exceed 3.30 V limit)");
@ -226,7 +226,7 @@ static void command_voltages(void* argument)
mux_select(i); // select the channel
voltages = measure_voltages(); // measure raw voltages
puts(" ");
print_voltage(voltages[2], 2);
print_fpu(voltages[2], 2);
puts(" V\n");
}
}