static int noti;
-/* Core service: get/set device status operations about device */
+/* Core service: get/set device status operations about device
+ PASS can be enabled/disabled in deviced.spec file
+ Then you have to set PATH, INTERFACE and METHOD */
#ifdef PASS
#define THERMAL_PATH "/Org/Tizen/System/Pass/Monitor/Thermal"
#define THERMAL_INTERFACE "org.tizen.system.pass.monitor.thermal"
-#define THERMAL_METHOD_TEMP_CHANGED "ChangedSiop"
+#define THERMAL_METHOD_TEMP_CHANGED "ChangedCooldownMode"
#else
#define THERMAL_PATH "/Org/Tizen/Trm/Siop"
#define THERMAL_INTERFACE "org.tizen.trm.siop"
-#define THERMAL_METHOD_TEMP_CHANGED "ChangedSiop"
+#define THERMAL_METHOD_TEMP_CHANGED "ChangedCooldownMode"
#endif
#define SIGNAL_OVERHEAT_TIME "TimeUpdate"
#define OVERHEAT_CALLBACK_TIME 1 //seconds
#define OVERHEAT_POWEROFF_TIME 30
-/* Temp level */
-#define LEVEL_DANGER "Danger"
-#define LEVEL_CRITICAL "Critical"
-#define LEVEL_HIGH "High"
-#define LEVEL_LOW "Low"
-#define LEVEL_NORMAL "Normal"
-
-/* Action type */
-#define SHUTDOWN_ACTION "ShutDownAction"
-#define LIMIT_ACTION "LimitAction"
-#define WARNING_ACTION "WarningAction"
+/* Action type
+ Below ACTION strings have to be checked, if those are the same from PASS or SIOP */
#define RELEASE_ACTION "ReleaseAction"
-#define NORMAL_ACTION "NormalAction"
+#define WARNING_ACTION "WarningAction"
+#define LIMIT_ACTION "LimitAction"
+#define SHUTDOWN_ACTION "ShutDownAction"
enum thermal_enum_type {
- LOW,
NORMAL,
WARNING,
CRITICAL,
return temp;
}
- if (!strncmp(string, LEVEL_NORMAL, strlen(LEVEL_NORMAL)))
+ if (!strncmp(string, RELEASE_ACTION, strlen(RELEASE_ACTION)))
temp = NORMAL;
- else if (!strncmp(string, LEVEL_LOW, strlen(LEVEL_LOW)))
- temp = LOW;
- else if (!strncmp(string, LEVEL_HIGH, strlen(LEVEL_HIGH)))
+ else if (!strncmp(string, WARNING_ACTION, strlen(WARNING_ACTION)))
temp = WARNING;
- else if (!strncmp(string, LEVEL_CRITICAL, strlen(LEVEL_CRITICAL)))
+ else if (!strncmp(string, LIMIT_ACTION, strlen(LIMIT_ACTION)))
temp = CRITICAL;
- else if (!strncmp(string, LEVEL_DANGER, strlen(LEVEL_DANGER)))
+ else if (!strncmp(string, SHUTDOWN_ACTION, strlen(SHUTDOWN_ACTION)))
temp = DANGER;
return temp;
switch (new_state) {
case NORMAL:
- case LOW:
if (old_state == WARNING || old_state == CRITICAL) {
thermal_remove_noti();
thermal_add_recovery_popup();
+ }
action = strdup(RELEASE_ACTION);
- } else
- action = strdup(NORMAL_ACTION);
break;
case WARNING: