static void cliStatus(char *cmdline) { (void)cmdline; uint8_t i; uint32_t mask; printf("System Uptime: %d seconds, Voltage: %d * 0.1V (%dS battery)\r\n", millis() / 1000, vbat, batteryCellCount); mask = sensorsMask(); printf("Hardware: %s @ %dMHz, detected sensors: ", hwNames[hw_revision], (SystemCoreClock / 1000000)); for (i = 0; ; i++) { if (sensorNames[i] == NULL) break; if (mask & (1 << i)) printf("%s ", sensorNames[i]); } if (sensors(SENSOR_ACC)) { printf("ACCHW: %s", accNames[accHardware]); if (accHardware == ACC_MPU6050) printf(".%c", core.mpu6050_scale ? 'o' : 'n'); } cliPrint("\r\n"); printf("Cycle Time: %d, I2C Errors: %d, config size: %d\r\n", cycleTime, i2cGetErrorCounter(), sizeof(master_t)); }
static void cliStatus(char *cmdline) { uint8_t i; uint32_t mask; printf("System Uptime: %d seconds, Voltage: %d * 0.1V (%dS battery)\r\n", millis() / 1000, vbat, batteryCellCount); mask = sensorsMask(); uartPrint("Detected sensors: "); for (i = 0; ; i++) { if (sensorNames[i] == NULL) break; if (mask & (1 << i)) printf("%s ", sensorNames[i]); } if (sensors(SENSOR_ACC)) printf("ACCHW: %s", accNames[accHardware]); uartPrint("\r\n"); printf("Cycle Time: %d, I2C Errors: %d\r\n", cycleTime, i2cGetErrorCounter()); }