Dkp.Device dev = (Dkp.Device)devs.pdata[i];
stderr.printf("Found new device %s\n", dev.native_path);
dev.print();
- if (!dev.is_rechargeable) continue;
+ stderr.printf("Rechargeable: %s\n", def.is_rechargeable ? "yes" : "no");
+ // On the FreeRunner, for some reason the battery does not
+ // appear as rechargeable, so I also match it literally
+ if (!dev.is_rechargeable || dev.native_path != "/sys/class/power_supply/battery") continue;
var bi = new BatteryIcon(dev);
bi.set_visible(true);
battery_icons.add(bi);