add weather widget preview
This commit is contained in:
@@ -26,7 +26,7 @@ void pmu_setup( TTGOClass *ttgo ) {
|
||||
// enable coulumb counter
|
||||
if ( ttgo->power->EnableCoulombcounter() )
|
||||
Serial.printf("enable coulumb counter failed!\r\n");
|
||||
if ( ttgo->power->setChargingTargetVoltage( AXP202_TARGET_VOL_4_36V ) )
|
||||
if ( ttgo->power->setChargingTargetVoltage( AXP202_TARGET_VOL_4_2V ) )
|
||||
Serial.printf("target voltage set failed!\r\n");
|
||||
if ( ttgo->power->setChargeControlCur( 300 ) )
|
||||
Serial.printf("charge current set failed!\r\n");
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
|
||||
#define PMU_EVENT_AXP_INT _BV(0)
|
||||
|
||||
#define PMU_BATTERY_CAP 380
|
||||
#define PMU_BATTERY_CAP 350
|
||||
|
||||
/*
|
||||
* @brief setup pmu: axp202
|
||||
|
||||
@@ -62,6 +62,7 @@ void powermgm_loop( TTGOClass *ttgo ) {
|
||||
// if we are in standby, wake up
|
||||
if ( powermgm_get_event( POWERMGM_STANDBY ) ) {
|
||||
powermgm_clear_event( POWERMGM_STANDBY );
|
||||
ttgo->power->setDCDC3Voltage( 3000 );
|
||||
ttgo->openBL();
|
||||
ttgo->displayWakeup();
|
||||
ttgo->bl->adjust( 0 );
|
||||
@@ -72,6 +73,7 @@ void powermgm_loop( TTGOClass *ttgo ) {
|
||||
if ( bma_get_config( BMA_STEPCOUNTER ) )
|
||||
ttgo->bma->enableStepCountInterrupt( true );
|
||||
motor_vibe( 1 );
|
||||
wifictl_on();
|
||||
}
|
||||
// if we are nor in stand by, go sleep
|
||||
else {
|
||||
@@ -84,6 +86,7 @@ void powermgm_loop( TTGOClass *ttgo ) {
|
||||
if ( bma_get_config( BMA_STEPCOUNTER ) )
|
||||
ttgo->bma->enableStepCountInterrupt( false );
|
||||
powermgm_set_event( POWERMGM_STANDBY );
|
||||
ttgo->power->setDCDC3Voltage( 2600 );
|
||||
setCpuFrequencyMhz( 10 );
|
||||
gpio_wakeup_enable ((gpio_num_t)AXP202_INT, GPIO_INTR_LOW_LEVEL);
|
||||
gpio_wakeup_enable ((gpio_num_t)BMA423_INT1, GPIO_INTR_HIGH_LEVEL);
|
||||
|
||||
Reference in New Issue
Block a user