Port connection-counting x4 bluetooth sensor to x2
[khatus.git] / x2 / src / awk / exe / bar.awk
index 294dc45..8d611b1 100644 (file)
@@ -194,6 +194,14 @@ function bar_make_status_net_wifi_link(interface,    link) {
 # Bluetooth
 # -----------------------------------------------------------------------------
 
+function bar_make_status_bluetooth(    src, controllers, devices) {
+    src = "khatus_sensor_bluetooth"
+    controllers = cache_get_fmt_def(src, "count_powered_controllers", 10, "%d")
+    devices     = cache_get_fmt_def(src, "count_connected_devices"  , 10, "%d")
+    # Using %s format bellow because default value is a string
+    return sprintf("%s:%s", controllers, devices)
+}
+
 function bar_make_status_bluetooth_power(    src) {
     src = "khatus_sensor_bluetooth_power"
     return cache_get_fmt_def(src, "power_status", 10, "%s")
This page took 0.018435 seconds and 4 git commands to generate.