13#include "devicelist.h"
17static void Baro_exec(
Shell *shell, uint8_t *);
19DEFINE_PROGRAM_HANDLE(
"baro", Baro_exec)
28static void Baro_exec(
Shell *shell, uint8_t *flags) {
31 if (!strcmp(flags,
"read")) {
33 snprintf(str, 50,
"Ground pressure: %f\n\r", baro->groundPress);
35 snprintf(str, 50,
"Current pressure: %f\n\r", baro->press);
37 snprintf(str, 50,
"Current temperature: %f\n\r", baro->temp);
DeviceHandle_t DeviceList_getDeviceHandle(DeviceKey)
Retrieve device handle from list by key.
UART_t usb
UART interface to connect shell I/O.
Struct definition for shell interface.
void(* print)(struct UART *, char *)
UART print string method.