* Alarms
It is possible to set an alarm, which will be shown in the alarm window. When
- the alarm expires, the phone wakes up if it is suspended, and zavai does
- nothing but print an error message on standard error.
+ the alarm expires, the phone wakes up if it is suspended, and zavai vibrates
+ for 5 seconds.
+
+ It is planned to use the AUX button to acknowledge the alarm and stop the
+ vibration; when this will happen, vibration can go on for more than 5 seconds.
- When there will be a documented API to turn OFF the vibrator, I'll implement
- vibration on alarm. When I'll implement some audio playing infrastructure,
- I'll implement playing an audio file as well.
+ When I'll implement some audio playing infrastructure, I'll implement playing
+ an audio file as well.
+
+ Also missing are a popup that tells that an alarm is ringing, and a notifier
+ for unacknowledged popups.
Patches welcome.
http://git.freesmartphone.org/?p=specs.git;a=blob_plain;f=html/index.html;hb=HEAD
* Features to add:
+ - GSM power and network
+ - link to open SHR-dialer
+ - icon to show if there are new messages
+ - link to open SHR-messages
- switch backlight keep mode when on power/recharging
- the button changes the default for the current power mode
- alarm
- - vibrate at alarm trigger
+ + vibrate at alarm trigger
- play sound at alarm trigger
+ - acknowledge alarms with AUX button
+ - then, vibrate and play sound for longer
+ - popup that tells that an alarm is ringing
- leave expired alarm on screen until acknowledged
(alarm status icon that also brings to alarm menu)
- remember alarm names (on request, maybe with an add feature) and how
- remember unexpired alarms persistently (again, a table in sqlite?) so
that they can be reinstated if zavai is restarted
- show active alarms and allow to delete them
+ - unlock screen when receiving phone calls
- GPX status icon (off, waiting for fix, recording)
- GPX waypoint using AUX button
- GPX + Audio track
public void do_shutdown()
{
try {
- usage.Shutdown();
+ //usage.Shutdown();
+ zavai.app.run_script("shutdown -h now");
} catch (Error e) {
zavai.log.error("Shutting down phone: " + e.message);
}
public void do_reboot()
{
try {
- usage.Reboot();
+ //usage.Reboot();
+ zavai.app.run_script("shutdown -r now");
} catch (Error e) {
zavai.log.error("Rebooting phone: " + e.message);
}
{
try {
display.SetBacklightPower(false);
+ zavai.app.run_script(zavai.config.xset_dpms_short_wait);
/*
string policy = usage.GetResourcePolicy("Display");
if (policy == "auto")
{
try {
display.SetBacklightPower(true);
+ zavai.app.run_script(zavai.config.xset_dpms_long_wait);
//usage.SetResourcePolicy("Display", "auto");
} catch (GLib.Error e) {
zavai.log.error(e.message);
if (started) return;
try {
usage.RequestResource("Display");
+ zavai.app.run_script(zavai.config.xset_dpms_always_on);
zavai.log.info("Acquired display");
base.start();
} catch (GLib.Error e) {
if (!started) return;
try {
usage.ReleaseResource("Display");
+ zavai.app.run_script(zavai.config.xset_dpms_long_wait);
zavai.log.info("Released display");
base.stop();
} catch (GLib.Error e) {
public string version { get; set; }
public string homedir { get; set; }
public string icondir { get; set; }
+ public string xset_dpms_always_on { get; set; }
+ public string xset_dpms_turn_off { get; set; }
+ public string xset_dpms_long_wait { get; set; }
+ public string xset_dpms_short_wait { get; set; }
public int min_button_height { get; set; }
public Config()
homedir = GLib.Environment.get_home_dir() + "/.zavai";
icondir = "./icons";
min_button_height = 80;
+ xset_dpms_always_on = "xset dpms force on; xset dpms 0 0 0";
+ xset_dpms_turn_off = "xset dpms force off";
+ xset_dpms_long_wait = "xset dpms 0 0 30";
+ xset_dpms_short_wait = "xset dpms 0 0 5";
}
/*