X-Git-Url: https://git.xandkar.net/?p=khatus.git;a=blobdiff_plain;f=x4%2Fsanity_check;fp=x4%2Fsanity_check;h=af68cf67889f712135574815f0f896925fc7096e;hp=7ed1ca0f4575326a9e5640639a0031817809e24b;hb=3565cd1da64d6d0d273476e6bd94a83cd65d4b0e;hpb=1fd28945d92907f2c228e3a39ae7f7c649cce6b0 diff --git a/x4/sanity_check b/x4/sanity_check index 7ed1ca0..af68cf6 100755 --- a/x4/sanity_check +++ b/x4/sanity_check @@ -12,11 +12,12 @@ sensors_kill_all() { kill -9 $(cat $pid_file) || true rm $pid_file done - pkill khatus_x4 + pkill khatus_x4_sensor || true } sensors_fork_all() { ./bin/khatus_x4_sensor_datetime & + ./bin/khatus_x4_sensor_bluetooth& ./bin/khatus_x4_sensor_mpd & ./bin/khatus_x4_sensor_energy & } @@ -35,9 +36,11 @@ sensors_read_all() { do battery_state="$(sensor_read_one ${dir}/khatus_x4_sensor_energy/out/battery_state)" battery_percentage="$(sensor_read_one ${dir}/khatus_x4_sensor_energy/out/battery_percentage)" + bluetooth_controllers="$(sensor_read_one ${dir}/khatus_x4_sensor_bluetooth/out/count_powered_controllers)" + bluetooth_devices="$(sensor_read_one ${dir}/khatus_x4_sensor_bluetooth/out/count_connected_devices)" datetime="$(sensor_read_one ${dir}/khatus_x4_sensor_datetime/out/datetime)" mpd="$(sensor_read_one ${dir}/khatus_x4_sensor_mpd/out/status)" - echo "E[${battery_state} ${battery_percentage}] [${mpd}] ${datetime}" + echo "E[${battery_state} ${battery_percentage}] [${mpd}] [$bluetooth_controllers $bluetooth_devices] ${datetime}" sleep 1 done }