Cornholio2108 / BestAlarm

0 stars 0 forks source link

Revision sensor data triggering Smart Shutdown #16

Closed Cornholio2108 closed 4 years ago

Cornholio2108 commented 4 years ago
if (powerStatus.equals("Battery")) {
            if ((activityInt != 3 && cofidence > 50) || (activityInt == 3 && cofidence < 95)) {
                smartDisable = true;
            } else {
                if ((gpsDistanceDouble > 3 && steps > 3)) {
                    smartDisable = true;
                }
            }
        } else if (powerStatus.equals("USB")) {
            if ((activityInt != 3 && cofidence > 60) || (activityInt == 3 && cofidence < 80))
            //if(activityInt!=3 && cofidence>60)
            {
                smartDisable = true;
            } else {
                if ((gpsDistanceDouble > 5 && steps > 5)) {
                    smartDisable = true;
                }
            }
        } else if (powerStatus.equals("AC")) {
            if ((activityInt != 3 && cofidence > 70) || (activityInt == 3 && cofidence < 70))
            //if(activityInt!=3 && cofidence>70)
            {
                smartDisable = true;
            } else {
                if ((gpsDistanceDouble > 10 && steps > 10)) {
                    smartDisable = true;
                }
            }
        } else {
            if ((activityInt != 3 && cofidence > 80) || (activityInt == 3 && cofidence < 60))
            //if(activityInt!=3 && cofidence>80)
            {
                smartDisable = true;
            } else {
                if ((gpsDistanceDouble > 15 && steps > 15)) {
                    smartDisable = true;
                }
            }
        }
Cornholio2108 commented 4 years ago

little bit too sensitive

Cornholio2108 commented 4 years ago

Changed to use activityRecognition only. Seems to work well so far.