{"size": 560, "ext": "js", "max_stars_repo_path": "app/battery.js", "max_stars_repo_name": "aidanblack/fitbit-blue", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "app/battery.js", "max_issues_repo_name": "aidanblack/fitbit-blue", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "app/battery.js", "max_forks_repo_name": "aidanblack/fitbit-blue", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 25.4545454545, "max_line_length": 67, "alphanum_fraction": 0.5571428571}
import document from "document";
import { battery } from "power";
import { modes } from "./modes";

class Battery {

    constructor() {}

    updateBattery(mode) {
        if (mode == modes.Battery) {
            var current = battery.chargeLevel;
            var goal = 100;
            var angle = 360 * (current / goal);
            angle = Math.round(angle);
            if (angle > 360) angle = 360;
            document.getElementById("statsArc").sweepAngle = angle;
            console.log("Battery Updated");
        }
    }
}

export default Battery;