From 63580485f64fe0ec03bb134630f95ca6fa3c3ac7 Mon Sep 17 00:00:00 2001 From: N2614 Date: Mon, 25 Jan 2010 07:23:36 +0000 Subject: [PATCH] =?UTF-8?q?=E5=B9=B4=E3=82=92=E3=81=BE=E3=81=9F=E3=81=84?= =?UTF-8?q?=E3=81=A7=E3=81=84=E3=82=8B=E5=A0=B4=E5=90=88=E3=81=AE=E7=B5=8C?= =?UTF-8?q?=E9=81=8E=E6=97=A5=E6=95=B0=E8=A8=88=E7=AE=97=E3=81=AE=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-05-23%20-%20ctr.7z%20+%20svn_v1.068.zip/ctr/svn/ctr_mcu@85 013db118-44a6-b54f-8bf7-843cb86687b1 --- trunk/accero.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/trunk/accero.c b/trunk/accero.c index 3815692..d0eacc5 100644 --- a/trunk/accero.c +++ b/trunk/accero.c @@ -198,7 +198,6 @@ static void hosu_increment() last_hour = HOUR; // 履歴読み出し時に使用。BCDのままでよい last_day = DAY; last_month = MONTH; - last_year = YEAR; now_hour = get_long_hour(); // RWAIT = 0; ↑で行っています // EI(); 〃 @@ -214,7 +213,7 @@ static void hosu_increment() else if( last_year == ( now_year -1 ) ) { // 年をまたいでいるとき - u16 temp_hours = ( ( 365 + (( now_year & 0x03 ) == 1 )? 1: 0 ) * 24 ) - last_hour_fny + now_hour; + u16 temp_hours = ( ( 365 + (( now_year & 0x03 ) == 1 ? 1: 0 )) * 24 ) - last_hour_fny + now_hour; fill_hosu_hist_hours( temp_hours ); } else if( last_year < now_year ) @@ -301,7 +300,7 @@ u8 hosu_read( ) case( 3 ): hosu_read_state += 1; - return( last_year ); + return( btobcd(last_year) ); case( 4 ): hosu_read_state += 1; @@ -490,7 +489,7 @@ u16 get_long_hour() // 閏年で、閏日より後 long_hour += 1; } - long_hour += day_hex; + long_hour += day_hex - 1; long_hour *= 24; // 日数→時間 long_hour += hour_hex;