|
|
|
@ -27,14 +27,14 @@ class DialerScreen(EdjeGroup):
|
|
|
|
|
# PyneoController.register_callback("gsm_dialing", self.on_gsm_dialing)
|
|
|
|
|
PyneoController.register_callback("gsm_operator_change", self.on_gsm_operator_change)
|
|
|
|
|
PyneoController.register_callback("gsm_signal_strength_change", self.on_gsm_signal_strength_change)
|
|
|
|
|
PyneoController.register_callback("battvolt_change", self.on_battvolt_change)
|
|
|
|
|
PyneoController.register_callback("capacity_change", self.on_capacity_change)
|
|
|
|
|
|
|
|
|
|
def on_battvolt_change(self, battvolt, chgmode):
|
|
|
|
|
if chgmode == "play-only" or chgmode == "idle":
|
|
|
|
|
EdjeGroup.color_class_set(self, "battvolt_active", 255, 255, 255, 64, 0, 0, 0, 0, 0, 0, 0, 0)
|
|
|
|
|
else:
|
|
|
|
|
EdjeGroup.color_class_set(self, "battvolt_active", 255, 255, 255, 128, 0, 0, 0, 0, 0, 0, 0, 0)
|
|
|
|
|
self.part_text_set("battvolt_text", "%s V"%str(battvolt)[:4])
|
|
|
|
|
def on_capacity_change(self, status):
|
|
|
|
|
# if chgmode == "play-only" or chgmode == "idle":
|
|
|
|
|
# EdjeGroup.color_class_set(self, "battvolt_active", 255, 255, 255, 64, 0, 0, 0, 0, 0, 0, 0, 0)
|
|
|
|
|
# else:
|
|
|
|
|
# EdjeGroup.color_class_set(self, "battvolt_active", 255, 255, 255, 128, 0, 0, 0, 0, 0, 0, 0, 0)
|
|
|
|
|
self.part_text_set("battvolt_text", "%s" % status['capacity'])
|
|
|
|
|
|
|
|
|
|
def on_sim_key_required(self, key_type):
|
|
|
|
|
print '---', 'opening keyring'
|
|
|
|
|