system/sensortest: Add rows for the voltage, current and power topics.

The three electrical topics exist and publish, but sensortest rejects
their node names before opening them: its table is matched by name and
carries each structure's size, so a type without a row is one the tool
cannot read at all.

All three are a timestamp and a single value, the shape print_valf
already handles.

Signed-off-by: Justin Hammond <justin@dynam.ac>
This commit is contained in:
Justin Hammond 2026-09-20 16:58:20 +08:00 • committed by Matteo Golin
parent 0e2e851f50
commit 6d45e5404d

View file

@ -90,6 +90,8 @@ static const struct sensor_info g_sensor_info[] =
{print_valf2, sizeof(struct sensor_baro), "baro"},
{print_cap, sizeof(struct sensor_cap), "cap"},
{print_valf, sizeof(struct sensor_co2), "co2"},
{print_valf, sizeof(struct sensor_current),
"current"},
{print_valf, sizeof(struct sensor_dust), "dust"},
{print_ecg, sizeof(struct sensor_ecg), "ecg"},
{print_force, sizeof(struct sensor_force), "force"},
@ -112,6 +114,7 @@ static const struct sensor_info g_sensor_info[] =
{print_valf, sizeof(struct sensor_pm10), "pm10"},
{print_valf, sizeof(struct sensor_pm1p0), "pm1p0"},
{print_valf, sizeof(struct sensor_pm25), "pm25"},
{print_valf, sizeof(struct sensor_power), "power"},
{print_ppgd, sizeof(struct sensor_ppgd), "ppgd"},
{print_ppgq, sizeof(struct sensor_ppgq), "ppgq"},
{print_valf, sizeof(struct sensor_prox), "prox"},
@ -120,7 +123,9 @@ static const struct sensor_info g_sensor_info[] =
sizeof(struct sensor_velocity), "velocity"},
{print_valf, sizeof(struct sensor_temp), "temp"},
{print_valf, sizeof(struct sensor_tvoc), "tvoc"},
{print_valf, sizeof(struct sensor_uv), "uv"}
{print_valf, sizeof(struct sensor_uv), "uv"},
{print_valf, sizeof(struct sensor_voltage),
"voltage"}
};
/****************************************************************************