diff --git a/trunk/config.h b/trunk/config.h index e1e50d8..4417db6 100644 --- a/trunk/config.h +++ b/trunk/config.h @@ -15,7 +15,7 @@ #define MCU_VER_MAJOR 0x01 -#define MCU_VER_MINOR 0x1A +#define MCU_VER_MINOR 0x1B #define _firm_format_v3_ diff --git a/trunk/hoge.bin b/trunk/hoge.bin index d72762d..94163ff 100644 Binary files a/trunk/hoge.bin and b/trunk/hoge.bin differ diff --git a/trunk/pm.c b/trunk/pm.c index 0862998..b4e96ea 100644 --- a/trunk/pm.c +++ b/trunk/pm.c @@ -669,8 +669,10 @@ void BT_get_left(){ } } - // 充電許可(=アダプタも刺さってる)のに充電してない = 充電完了 - if( !BT_CHG_Ena_n && BT_IN_CHG_n ){ + // 充電許可(=アダプタも刺さってる)のに充電してない + // かつ、(少なくとも)素の電池残量が60%以上(CCICバグ回避) + // = 充電完了。電池がへたってくるとMGICが100%を返さない + if( !BT_CHG_Ena_n && BT_IN_CHG_n && vreg_ctr[ VREG_C_BT_REMAIN ] > 60 ){ vreg_ctr[ VREG_C_BT_REMAIN ] = 100; vreg_ctr[ VREG_C_BT_REMAIN_FINE ] = 0; } diff --git a/trunk/task_sys.c b/trunk/task_sys.c index 16b931c..8729cea 100644 --- a/trunk/task_sys.c +++ b/trunk/task_sys.c @@ -415,7 +415,10 @@ void tsk_sys( ) CKC = 0b00001001; OSMC = 0x00; - STOP( ); + if( PM_EXTDC_n ) // きわどいタイミングで挿抜が起きることがある + { + STOP( ); + } // 起きる // // 起きる条件は