X-Git-Url: http://git.maemo.org/git/?p=libnomaccel;a=blobdiff_plain;f=src%2Fglobal_p.h;fp=src%2Fglobal_p.h;h=03ddd516d5f95d40dc02e8e476ab645279d41976;hp=4841845058978d326b4ee661eb44905e05bcf146;hb=913bfee3825c953fd2a8081cd6e120f0b480a562;hpb=718b114789f33651f138b33e7d39d80b028c98c6 diff --git a/src/global_p.h b/src/global_p.h index 4841845..03ddd51 100644 --- a/src/global_p.h +++ b/src/global_p.h @@ -35,6 +35,12 @@ struct _NomAccelProxy { angle roll; }; +typedef struct _NomAccelNeutral NomAccelNeutral; +struct _NomAccelNeutral { + angle pitch_neutral; + angle roll_neutral; +}; + void _accel_proxy_init (); void _accel_proxy_finit (); void _accel_read_real_values (); @@ -42,7 +48,13 @@ void _accel_recalculate_pitch (); void _accel_recalculate_roll (); #define _accel_recalculate_pitch_roll() _accel_recalculate_pitch(); _accel_recalculate_roll() +void _accel_nsettings_read_system (); +void _accel_nsettings_save_system (); + const char* const _accel_device_file_name = "/sys/class/i2c-adapter/i2c-3/3-001d/coord"; -NomAccelProxy _accel_proxy = {0}; +const char* const _accel_system_setting_file_name = "/etc/nomaccel/settings"; +extern NomAccelProxy _accel_proxy; +extern NomAccelNeutral _accel_settings[NOM_ACCEL_SETTINGS_NUMBER]; +extern NomAccelNeutralSetting _accel_settings_current; #endif