MCPcopy Create free account
hub / github.com/TactilityProject/Tactility / setShipping

Method setShipping

Devices/unphone/Source/UnPhoneFeatures.cpp:287–298  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

285}
286
287bool UnPhoneFeatures::setShipping(bool on) const {
288 if (on) {
289 LOGGER.warn("setShipping: on");
290 batteryManagement->setWatchDogTimer(Bq24295::WatchDogTimer::Disabled);
291 batteryManagement->setBatFetOn(false);
292 } else {
293 LOGGER.warn("setShipping: off");
294 batteryManagement->setWatchDogTimer(Bq24295::WatchDogTimer::Enabled40s);
295 batteryManagement->setBatFetOn(true);
296 }
297 return true;
298}
299
300void UnPhoneFeatures::wakeOnPowerSwitch() const {
301 esp_sleep_enable_ext0_wakeup(pin::POWER_SWITCH, 1);

Callers 1

updatePowerSwitchFunction · 0.80

Calls 3

warnMethod · 0.80
setWatchDogTimerMethod · 0.80
setBatFetOnMethod · 0.80

Tested by

no test coverage detected