From c99a58499ef2827b90a041bcc2d90d949b2414bc Mon Sep 17 00:00:00 2001 From: Spitzbube Date: Sat, 23 Jan 2021 12:52:21 +0100 Subject: [PATCH] intermediate commit --- applications/v2.3/HandleDownKey.c | 16 +- applications/v2.3/HandleEnterKey.c | 36 +-- applications/v2.3/HandleMinusKey.c | 16 +- applications/v2.3/HandleUpKey.c | 8 +- applications/v2.3/data.c | 55 ++-- applications/v2.3/data.h | 55 ++-- applications/v2.3/file_1f30.c | 65 ++--- applications/v2.3/func_23130.c | 448 ++++++++++++++--------------- applications/v2.3/func_27844.c | 76 ++--- applications/v2.3/func_3d72c.c | 48 ++-- applications/v2.3/language.c | 93 +++--- applications/v2.3/macros.h | 6 + applications/v2.3/main.c | 361 ++++++++--------------- applications/v2.3/menu.h | 17 ++ applications/v2.3/slew2.c | 5 +- applications/v2.3/uart.c | 16 +- 16 files changed, 600 insertions(+), 721 deletions(-) diff --git a/applications/v2.3/HandleDownKey.c b/applications/v2.3/HandleDownKey.c index ab4594b..3729872 100644 --- a/applications/v2.3/HandleDownKey.c +++ b/applications/v2.3/HandleDownKey.c @@ -93,10 +93,10 @@ void HandleDownKey(void) case MENU_CONTEXT_DEC_BKLASH_CORR: //1700: //0x5b410: DEC Bklash Correction - bData_40003173 = 1; - bData_40003171 = 1; - bData_40003172 = 1; - bData_40003170 = 1; + g_bAlignmentFourLineMenuFocusItem = 1; + g_bAlignmentFourLineMenuTopItem = 1; + g_bAlignmentEightLineMenuFocusItem = 1; + g_bAlignmentEightLineMenuTopItem = 1; Data_40002c64_MenuContextId = MENU_CONTEXT_ONE_STAR_ALIGN; //1100; break; @@ -235,10 +235,10 @@ void HandleDownKey(void) case MENU_CONTEXT_TIME_DATE: //4100: //0x5b718 HandleLongListScroll(1, 14); - Data_40002c64_MenuContextId = 4200; + Data_40002c64_MenuContextId = MENU_CONTEXT_DAYLIGHT_SAVING; //4200; break; - case 4200: + case MENU_CONTEXT_DAYLIGHT_SAVING: //4200: //0x5b738 HandleLongListScroll(1, 14); Data_40002c64_MenuContextId = MENU_CONTEXT_SITE_SETTING; //4300; @@ -247,10 +247,10 @@ void HandleDownKey(void) case MENU_CONTEXT_SITE_SETTING: //4300: //0x5b758 HandleLongListScroll(1, 14); - Data_40002c64_MenuContextId = 4400; + Data_40002c64_MenuContextId = MENU_CONTEXT_SKY_LAND; //4400; break; - case 4400: + case MENU_CONTEXT_SKY_LAND: //4400: //0x5b778 HandleLongListScroll(1, 14); Data_40002c64_MenuContextId = MENU_CONTEXT_AZ_EQU; //4500; diff --git a/applications/v2.3/HandleEnterKey.c b/applications/v2.3/HandleEnterKey.c index 05de039..972e7be 100644 --- a/applications/v2.3/HandleEnterKey.c +++ b/applications/v2.3/HandleEnterKey.c @@ -113,7 +113,7 @@ void HandleEnterKey(void) switch (Data_40002f15_RecentTargetTypeArray[bData_4000316e_FocusLineOn8LineDisplay - 1]) { - case 1: + case MENU_RECENT_TARGET_SOLAR_SYSTEM: //1: //0x531d4 bData_40003176 = 1; bData_40003174 = 1; @@ -126,7 +126,7 @@ void HandleEnterKey(void) //->0x53690 break; - case 2: + case MENU_RECENT_TARGET_CONSTELLATION: //2: //0x5321c bData_40003176 = 2; bData_40003174 = 1; @@ -139,7 +139,7 @@ void HandleEnterKey(void) //->0x53690 break; - case 3: + case MENU_RECENT_TARGET_FAMOUS_STAR: //3: //0x53268 bData_40003176 = 3; bData_40003174 = 1; @@ -152,7 +152,7 @@ void HandleEnterKey(void) //->0x53690 break; - case 4: + case MENU_RECENT_TARGET_MESSIER: //4: //0x532b4 bData_40003176 = 4; bData_40003174 = 1; @@ -166,7 +166,7 @@ void HandleEnterKey(void) //->0x53690 break; - case 5: + case MENU_RECENT_TARGET_NGC: //5: //0x5330c bData_40003176 = 5; bData_40003174 = 1; @@ -180,7 +180,7 @@ void HandleEnterKey(void) //->0x53690 break; - case 6: + case MENU_RECENT_TARGET_IC: //6: //0x53364 bData_40003176 = 6; bData_40003174 = 1; @@ -194,7 +194,7 @@ void HandleEnterKey(void) //->0x53690 break; - case 7: + case MENU_RECENT_TARGET_SH2: //7: //0x5345c bData_40003176 = 7; bData_40003174 = 1; @@ -208,7 +208,7 @@ void HandleEnterKey(void) //->0x53690 break; - case 8: + case MENU_RECENT_TARGET_BRIGHT_STAR: //8: //0x534b4 bData_40003176 = 8; bData_40003174 = 1; @@ -222,7 +222,7 @@ void HandleEnterKey(void) //->0x53690 break; - case 9: + case MENU_RECENT_TARGET_SAO_CAT: //9: //0x5350c bData_40003176 = 8; bData_40003174 = 2; @@ -295,10 +295,10 @@ void HandleEnterKey(void) case MENU_CONTEXT_ALIGNMENT: //1000: //0x53698 - bData_40003173 = 1; - bData_40003171 = 1; - bData_40003172 = 1; - bData_40003170 = 1; + g_bAlignmentFourLineMenuFocusItem = 1; + g_bAlignmentFourLineMenuTopItem = 1; + g_bAlignmentEightLineMenuFocusItem = 1; + g_bAlignmentEightLineMenuTopItem = 1; Data_40002c64_MenuContextId = MENU_CONTEXT_ONE_STAR_ALIGN; //1100; break; @@ -1045,10 +1045,7 @@ void HandleEnterKey(void) Data_40003500.dwData = fabs((int) ((6.0 * dTrackingRate) / 15.04)); - uart1_write_byte(0x55); - uart1_write_byte(0xaa); - uart1_write_byte(0x01); - uart1_write_byte(0x04); + UART1_WRITE_HEADER(4); uart1_write_byte(0x41); if (dTrackingRate > 0) @@ -1065,10 +1062,7 @@ void HandleEnterKey(void) uart1_write_byte(Data_40003500.bData[1]); uart1_write_byte(Data_40003500.bData[0]); - uart1_write_byte(0x55); - uart1_write_byte(0xaa); - uart1_write_byte(0x01); - uart1_write_byte(0x04); + UART1_WRITE_HEADER(4); uart1_write_byte(0x01); if (dTrackingRate > 0) diff --git a/applications/v2.3/HandleMinusKey.c b/applications/v2.3/HandleMinusKey.c index 35fa277..609ebf2 100644 --- a/applications/v2.3/HandleMinusKey.c +++ b/applications/v2.3/HandleMinusKey.c @@ -228,17 +228,17 @@ void HandleMinusKey(void) Data_40002c64_MenuContextId = 3000; break; - case 3600: + case MENU_CONTEXT_EYEPIECE_FOV: //3600: //0x5fe78 Data_40002c64_MenuContextId = 3000; break; - case 3700: + case MENU_CONTEXT_EYEPIECE_MAGN: //3700: //0x5fe8c Data_40002c64_MenuContextId = 3000; break; - case 3800: + case MENU_CONTEXT_DISPLAY_ILLUMINATION: //3800: //0x5fea0 Data_40002c64_MenuContextId = 3000; break; @@ -362,7 +362,7 @@ void HandleMinusKey(void) //0x60080 case 360022: //0x60088 - Data_40002c64_MenuContextId = 3700; + Data_40002c64_MenuContextId = MENU_CONTEXT_EYEPIECE_MAGN; //3700; break; case 370021: @@ -371,22 +371,22 @@ void HandleMinusKey(void) //0x600a0 case 370023: //0x600a4 - Data_40002c64_MenuContextId = 3600; + Data_40002c64_MenuContextId = MENU_CONTEXT_EYEPIECE_FOV; //3600; break; case 3602: //0x600b4 - Data_40002c64_MenuContextId = 3600; + Data_40002c64_MenuContextId = MENU_CONTEXT_EYEPIECE_FOV; //3600; break; case 3801: //0x600c8 - Data_40002c64_MenuContextId = 3800; + Data_40002c64_MenuContextId = MENU_CONTEXT_DISPLAY_ILLUMINATION; //3800; break; case 3802: //0x600dc - Data_40002c64_MenuContextId = 3800; + Data_40002c64_MenuContextId = MENU_CONTEXT_DISPLAY_ILLUMINATION; //3800; break; case 4301: diff --git a/applications/v2.3/HandleUpKey.c b/applications/v2.3/HandleUpKey.c index e91a50f..f9d9fa5 100644 --- a/applications/v2.3/HandleUpKey.c +++ b/applications/v2.3/HandleUpKey.c @@ -344,10 +344,10 @@ void HandleUpKey(void) case MENU_CONTEXT_ONE_STAR_ALIGN: //1100: //0x5d9a4 - bData_40003173 = 4; - bData_40003171 = 4; - bData_40003172 = 7; - bData_40003170 = 8; + g_bAlignmentFourLineMenuFocusItem = 4; + g_bAlignmentFourLineMenuTopItem = 4; + g_bAlignmentEightLineMenuFocusItem = 7; + g_bAlignmentEightLineMenuTopItem = 8; Data_40002c64_MenuContextId = MENU_CONTEXT_DEC_BKLASH_CORR; break; diff --git a/applications/v2.3/data.c b/applications/v2.3/data.c index 233bec8..33bfdef 100644 --- a/applications/v2.3/data.c +++ b/applications/v2.3/data.c @@ -25,8 +25,8 @@ unsigned char bData_40002c14_uart1ReceiveStep; //40002c14 unsigned char bData_40002c15_uart1ReceiveHeader[4]; //40002c15 unsigned char uart1_bRxData; //40002c19 unsigned char bData_40002c1a; //40002c1a // V2.2: 40002c1e -int Data_40002c1c; //40002c1c -int Data_40002c20; //40002c20 +int g_iUart0GuideValueRa; //40002c1c +int g_iUart0GuideValueDec; //40002c20 Union_40002c24 Data_40002c24; //40002c24 Union_40002c28 Data_40002c28; //40002c28 int fill_40002c2c; //40002c2c @@ -219,6 +219,7 @@ char* strTelescopeAlign; //40002f20 char* strNavigation; //40002f24 char* strUtilities; //40002f28 char* strSetup; //40002f2c + char* strOneStarAlign; //40002f30 char* strTwoStarAlign; //40002f34 char* strThreeStarAlign; //40002f38 @@ -226,22 +227,24 @@ char* strTargetSync; //40002f3c char* strPoleAxisDev; //40002f40 char* strRaBklashCorr; //40002f44 char* strDecBklashCorr; //40002f48 -char* Data_40002f4c; //40002f4c -char* Data_40002f50; //40002f50 -char* Data_40002f54; //40002f54 -char* Data_40002f58; //40002f58 +char* strAlignmentSpare1; //40002f4c +char* strAlignmentSpare2; //40002f50 +char* strAlignmentSpare3; //40002f54 +char* strAlignmentSpare4; //40002f58 + char* strSolarSystem; //40002f5c char* strConstellation; //40002f60 char* strFamousStar; //40002f64 -char* Data_40002f68; //40002f68 -char* Data_40002f6c; //40002f6c -char* Data_40002f70; //40002f70 -char* Data_40002f74; //40002f74 -char* Data_40002f78; //40002f78 -char* Data_40002f7c; //40002f7c -char* Data_40002f80; //40002f80 -char* Data_40002f84; //40002f84 -char* Data_40002f88; //40002f88 +char* g_pcstrMessierCatalogue; //40002f68 +char* g_pcstrNGCCatalogue; //40002f6c +char* g_pcstrICCatalogue; //40002f70 +char* g_pcstrSh2Catalogue; //40002f74 +char* g_pcstrBrightStarCatalogue; //40002f78 +char* g_pcstrSAOStarCatalogue; //40002f7c +char* g_pcstrCustomerObjects; //40002f80 +char* g_pcstrInputRAandDEC; //40002f84 +char* g_pcstrCustomLandGoal; //40002f88 + char* strCurrentObjects; //40002f8c char* Data_40002f90; //40002f90 char* Data_40002f94; //40002f94 @@ -366,10 +369,10 @@ char fill_4000316c; //4000316c unsigned char bData_4000316d; //4000316d unsigned char bData_4000316e_FocusLineOn8LineDisplay; //4000316e unsigned char bData_4000316f_FocusLineOn4LineDisplay; //4000316f -unsigned char bData_40003170; //40003170 -unsigned char bData_40003171; //40003171 -unsigned char bData_40003172; //40003172 -unsigned char bData_40003173; //40003173 +unsigned char g_bAlignmentEightLineMenuTopItem; //40003170 +unsigned char g_bAlignmentFourLineMenuTopItem; //40003171 +unsigned char g_bAlignmentEightLineMenuFocusItem; //40003172 +unsigned char g_bAlignmentFourLineMenuFocusItem; //40003173 unsigned char bData_40003174; //40003174 unsigned char bData_40003175; //40003175 unsigned char bData_40003176; //40003176 @@ -533,10 +536,12 @@ char* Data_40003398; //40003398 char* Data_4000339c; //4000339c char* Data_400033a0; //400033a0 char* Data_400033a4; //400033a4 -char* Data_400033a8; //400033a8 -char* Data_400033ac; //400033ac -char* Data_400033b0; //400033b0 -char* Data_400033b4; //400033b4 + +char* g_pcstrFourLineMenu1; //400033a8 +char* g_pcstrFourLineMenu2; //400033ac +char* g_pcstrFourLineMenu3; //400033b0 +char* g_pcstrFourLineMenu4; //400033b4 + int fill_400033b8; //400033b8 int fill_400033bc; //400033bc int fill_400033c0; //400033c0 @@ -569,8 +574,8 @@ double fill_40003468; //40003468 double fill_40003470; //40003470 double fill_40003478; //40003478 double fill_40003480; //40003480 -int Data_40003488; //40003488 -int Data_4000348c; //4000348c +int g_iAscomGuideValueRa; //40003488 +int g_iAscomGuideValueDec; //4000348c double dData_40003490; //40003490 char bData_40003498; //40003498 double dData_400034a0_SiderealTimeGreenwich0UT; //400034a0 diff --git a/applications/v2.3/data.h b/applications/v2.3/data.h index 3cbb3a4..d86b41a 100644 --- a/applications/v2.3/data.h +++ b/applications/v2.3/data.h @@ -251,8 +251,8 @@ extern unsigned char bData_40002c14_uart1ReceiveStep; //40002c14 extern unsigned char bData_40002c15_uart1ReceiveHeader[4]; //40002c15 extern unsigned char uart1_bRxData; //40002c19 extern unsigned char bData_40002c1a; //40002c1a // V2.2: 40002c1e -extern int Data_40002c1c; //40002c1c -extern int Data_40002c20; //40002c20 +extern int g_iUart0GuideValueRa; //40002c1c +extern int g_iUart0GuideValueDec; //40002c20 extern Union_40002c24 Data_40002c24; //40002c24 extern Union_40002c28 Data_40002c28; //40002c28 extern char bHelpActive; //40002c58 @@ -413,6 +413,7 @@ extern char* strTelescopeAlign; //40002f20 extern char* strNavigation; //40002f24 extern char* strUtilities; //40002f28 extern char* strSetup; //40002f2c + extern char* strOneStarAlign; //40002f30 extern char* strTwoStarAlign; //40002f34 extern char* strThreeStarAlign; //40002f38 @@ -420,22 +421,24 @@ extern char* strTargetSync; //40002f3c extern char* strPoleAxisDev; //40002f40 extern char* strRaBklashCorr; //40002f44 extern char* strDecBklashCorr; //40002f48 -extern char* Data_40002f4c; //40002f4c -extern char* Data_40002f50; //40002f50 -extern char* Data_40002f54; //40002f54 -extern char* Data_40002f58; //40002f58 +extern char* strAlignmentSpare1; //40002f4c +extern char* strAlignmentSpare2; //40002f50 +extern char* strAlignmentSpare3; //40002f54 +extern char* strAlignmentSpare4; //40002f58 + extern char* strSolarSystem; //40002f5c extern char* strConstellation; //40002f60 extern char* strFamousStar; //40002f64 -extern char* Data_40002f68; //40002f68 -extern char* Data_40002f6c; //40002f6c -extern char* Data_40002f70; //40002f70 -extern char* Data_40002f74; //40002f74 -extern char* Data_40002f78; //40002f78 -extern char* Data_40002f7c; //40002f7c -extern char* Data_40002f80; //40002f80 -extern char* Data_40002f84; //40002f84 -extern char* Data_40002f88; //40002f88 +extern char* g_pcstrMessierCatalogue; //40002f68 +extern char* g_pcstrNGCCatalogue; //40002f6c +extern char* g_pcstrICCatalogue; //40002f70 +extern char* g_pcstrSh2Catalogue; //40002f74 +extern char* g_pcstrBrightStarCatalogue; //40002f78 +extern char* g_pcstrSAOStarCatalogue; //40002f7c +extern char* g_pcstrCustomerObjects; //40002f80 +extern char* g_pcstrInputRAandDEC; //40002f84 +extern char* g_pcstrCustomLandGoal; //40002f88 + extern char* strCurrentObjects; //40002f8c extern char* Data_40002f90; //40002f90 extern char* Data_40002f94; //40002f94 @@ -547,10 +550,10 @@ extern int Data_40003168_LunarPhaseMonth; //40003168 extern unsigned char bData_4000316d; //4000316d extern unsigned char bData_4000316e_FocusLineOn8LineDisplay; //4000316e extern unsigned char bData_4000316f_FocusLineOn4LineDisplay; //4000316f -extern unsigned char bData_40003170; //40003170 -extern unsigned char bData_40003171; //40003171 -extern unsigned char bData_40003172; //40003172 -extern unsigned char bData_40003173; //40003173 +extern unsigned char g_bAlignmentEightLineMenuTopItem; //40003170 +extern unsigned char g_bAlignmentFourLineMenuTopItem; //40003171 +extern unsigned char g_bAlignmentEightLineMenuFocusItem; //40003172 +extern unsigned char g_bAlignmentFourLineMenuFocusItem; //40003173 extern unsigned char bData_40003174; //40003174 extern unsigned char bData_40003175; //40003175 extern unsigned char bData_40003176; //40003176 @@ -685,10 +688,12 @@ extern char* Data_40003398; //40003398 extern char* Data_4000339c; //4000339c extern char* Data_400033a0; //400033a0 extern char* Data_400033a4; //400033a4 -extern char* Data_400033a8; //400033a8 -extern char* Data_400033ac; //400033ac -extern char* Data_400033b0; //400033b0 -extern char* Data_400033b4; //400033b4 + +extern char* g_pcstrFourLineMenu1; //400033a8 +extern char* g_pcstrFourLineMenu2; //400033ac +extern char* g_pcstrFourLineMenu3; //400033b0 +extern char* g_pcstrFourLineMenu4; //400033b4 + extern Union_400033c8 Data_400033c8; //400033c8 extern Union_400033cc Data_400033cc; //400033cc extern double dData_400033d8; //400033d8 @@ -710,8 +715,8 @@ extern double dData_40003448; //40003448 extern double dData_40003450; //40003450 extern double dData_40003458; //40003458 extern double dData_40003460; //40003460 -extern int Data_40003488; //40003488 -extern int Data_4000348c; //4000348c +extern int g_iAscomGuideValueRa; //40003488 +extern int g_iAscomGuideValueDec; //4000348c extern double dData_40003490; //40003490 extern char bData_40003498; //40003498 extern double dData_400034a0_SiderealTimeGreenwich0UT; //400034a0 diff --git a/applications/v2.3/file_1f30.c b/applications/v2.3/file_1f30.c index 462ca0b..1c06133 100644 --- a/applications/v2.3/file_1f30.c +++ b/applications/v2.3/file_1f30.c @@ -2199,9 +2199,9 @@ void func_65d4(double sp40, double sp48) Data_400033cc.dwData = 5; } //6af4 - if ((iMountAutoguideRa != 0) || (Data_40003488 != 0)) + if ((iMountAutoguideRa != 0) || (g_iAscomGuideValueRa != 0)) { - Data_400033cc.dwData = abs(2*((iMountAutoguideRa + 6 * Data_40003488)) + 6); + Data_400033cc.dwData = abs(2*((iMountAutoguideRa + 6 * g_iAscomGuideValueRa)) + 6); if (iMountAutoguideRa == 1) { @@ -2299,10 +2299,7 @@ void func_65d4(double sp40, double sp48) //6d64 } //if (g_iSlewStepRaAxis != 0) //6d68 - uart1_write_byte(0x55); - uart1_write_byte(0xaa); - uart1_write_byte(0x01); - uart1_write_byte(1 + 2 + 3); + UART1_WRITE_HEADER(1 + 2 + 3); uart1_write_byte(0x02); //Send RA? uart1_write_byte(Data_400033cc.bData[1]); uart1_write_byte(Data_400033cc.bData[0]); @@ -2376,10 +2373,7 @@ void func_65d4(double sp40, double sp48) Data_400033cc.dwData = 980; } //6f08 - uart1_write_byte(0x55); - uart1_write_byte(0xaa); - uart1_write_byte(0x01); - uart1_write_byte(0x06); + UART1_WRITE_HEADER(6); uart1_write_byte(0x42); uart1_write_byte(Data_400033cc.bData[1]); uart1_write_byte(Data_400033cc.bData[0]); @@ -2429,7 +2423,7 @@ void func_65d4(double sp40, double sp48) if (bData_40002c1a == 1) { //7164 - if ((Data_40004128.dData_312 == 2) && (Data_4000348c != 0)) + if ((Data_40004128.dData_312 == 2) && (g_iAscomGuideValueDec != 0)) { Data_400033cc.dwData = 32; } @@ -2521,10 +2515,7 @@ void func_65d4(double sp40, double sp48) } } //7390 - uart1_write_byte(0x55); - uart1_write_byte(0xaa); - uart1_write_byte(0x01); - uart1_write_byte(1 + 2 + 3); + UART1_WRITE_HEADER(1 + 2 + 3); uart1_write_byte(0x22); //Send DEC? uart1_write_byte(Data_400033cc.bData[1]); uart1_write_byte(Data_400033cc.bData[0]); @@ -2598,10 +2589,7 @@ void func_65d4(double sp40, double sp48) Data_400033cc.dwData = 980; } - uart1_write_byte(0x55); - uart1_write_byte(0xaa); - uart1_write_byte(0x01); - uart1_write_byte(0x06); + UART1_WRITE_HEADER(6); uart1_write_byte(0x62); uart1_write_byte(Data_400033cc.bData[1]); uart1_write_byte(Data_400033cc.bData[0]); @@ -2617,10 +2605,7 @@ void func_65d4(double sp40, double sp48) /* 7590 - complete */ void func_7590(void) { - uart1_write_byte(0x55); - uart1_write_byte(0xaa); - uart1_write_byte(0x01); - uart1_write_byte(0x01); + UART1_WRITE_HEADER(1); uart1_write_byte(0xff); } @@ -4007,10 +3992,7 @@ void StopSlewing(void) Data_40004128.dData_304 = 0.0; bTrackingMode = MENU_TRACKING_MODE_STOP; //0; - uart1_write_byte(0x55); - uart1_write_byte(0xaa); - uart1_write_byte(0x01); - uart1_write_byte(0x01); + UART1_WRITE_HEADER(1); uart1_write_byte(0x00); Data_40004128.alignmentPause = 1; @@ -4023,10 +4005,7 @@ void ResumeSlewing(void) { Data_40004128.bTrackingRequest = 1; - uart1_write_byte(0x55); - uart1_write_byte(0xaa); - uart1_write_byte(0x01); - uart1_write_byte(0x01); + UART1_WRITE_HEADER(1); uart1_write_byte(0xFF); Data_40004128.alignmentPause = 0; @@ -4186,8 +4165,8 @@ void func_d2cc(void) Data_40004128.dAutoguideRa = 0.0; Data_40004128.dAutoguideDec = 0.0; - Data_40003488 = 0; - Data_4000348c = 0; + g_iAscomGuideValueRa = 0; + g_iAscomGuideValueDec = 0; } /* d784 - todo */ @@ -5513,7 +5492,7 @@ void get_solar_system_object_data(int a, float* pRightAscension, float* pDeclina { switch (a) { - case 0: + case MENU_SOLAR_SYSTEM_MERCURY: //0: //0x220a4 *pRightAscension = dData_400032d0; *pDeclination = dData_400032d8; @@ -5522,7 +5501,7 @@ void get_solar_system_object_data(int a, float* pRightAscension, float* pDeclina //->0x22450 break; - case 1: + case MENU_SOLAR_SYSTEM_VENUS: //1: //0x220e4 *pRightAscension = dData_400032e0; *pDeclination = dData_400032e8; @@ -5531,7 +5510,7 @@ void get_solar_system_object_data(int a, float* pRightAscension, float* pDeclina //->0x22450 break; - case 2: + case MENU_SOLAR_SYSTEM_MARS: //2: //0x22124 *pRightAscension = dData_400032f0; *pDeclination = dData_400032f8; @@ -5540,7 +5519,7 @@ void get_solar_system_object_data(int a, float* pRightAscension, float* pDeclina //->0x22450 break; - case 3: + case MENU_SOLAR_SYSTEM_JUPITER: //3: //0x22164 *pRightAscension = dData_40003300; *pDeclination = dData_40003308; @@ -5549,7 +5528,7 @@ void get_solar_system_object_data(int a, float* pRightAscension, float* pDeclina //->0x22450 break; - case 4: + case MENU_SOLAR_SYSTEM_SATURN: //4: //0x221a4 *pRightAscension = dData_40003310; *pDeclination = dData_40003318; @@ -5558,7 +5537,7 @@ void get_solar_system_object_data(int a, float* pRightAscension, float* pDeclina //->0x22450 break; - case 5: + case MENU_SOLAR_SYSTEM_URANUS: //5: //0x221e4 *pRightAscension = dData_40003320; *pDeclination = dData_40003328; @@ -5567,7 +5546,7 @@ void get_solar_system_object_data(int a, float* pRightAscension, float* pDeclina //->0x22450 break; - case 6: + case MENU_SOLAR_SYSTEM_NEPTUNE: //6: //0x22224 *pRightAscension = dData_40003330; *pDeclination = dData_40003338; @@ -5576,7 +5555,7 @@ void get_solar_system_object_data(int a, float* pRightAscension, float* pDeclina //->0x22450 break; - case 7: + case MENU_SOLAR_SYSTEM_PLUTO: //7: //0x22388 *pRightAscension = dData_40003340; *pDeclination = dData_40003348; @@ -5585,7 +5564,7 @@ void get_solar_system_object_data(int a, float* pRightAscension, float* pDeclina //->0x22450 break; - case 8: + case MENU_SOLAR_SYSTEM_SUN: //8: //0x223c8 *pRightAscension = dData_400032b0_SunRightAscension; *pDeclination = dData_400032b8_SunDeclination; @@ -5594,7 +5573,7 @@ void get_solar_system_object_data(int a, float* pRightAscension, float* pDeclina //->0x22450 break; - case 9: + case MENU_SOLAR_SYSTEM_MOON: //9: //0x22408 *pRightAscension = dData_400032c0_MoonRightAscension; *pDeclination = dData_400032c8_MoonDeclination; diff --git a/applications/v2.3/func_23130.c b/applications/v2.3/func_23130.c index d2d5bde..5676411 100644 --- a/applications/v2.3/func_23130.c +++ b/applications/v2.3/func_23130.c @@ -1,7 +1,7 @@ /* 2245c - todo */ -void func_2245c(int a, int b) +void PrepareEightLineMenuScroll(int a, int b) { switch (a) { @@ -18,7 +18,7 @@ void func_2245c(int a, int b) Data_40003370 = strPoleAxisDev; Data_40003374 = strRaBklashCorr; Data_40003378 = strDecBklashCorr; - Data_4000337c = Data_40002f4c; + Data_4000337c = strAlignmentSpare1; //->0x227ac break; @@ -30,8 +30,8 @@ void func_2245c(int a, int b) Data_4000336c = strPoleAxisDev; Data_40003370 = strRaBklashCorr; Data_40003374 = strDecBklashCorr; - Data_40003378 = Data_40002f4c; - Data_4000337c = Data_40002f50; + Data_40003378 = strAlignmentSpare1; + Data_4000337c = strAlignmentSpare2; //->0x227ac break; @@ -42,9 +42,9 @@ void func_2245c(int a, int b) Data_40003368 = strPoleAxisDev; Data_4000336c = strRaBklashCorr; Data_40003370 = strDecBklashCorr; - Data_40003374 = Data_40002f4c; - Data_40003378 = Data_40002f50; - Data_4000337c = Data_40002f54; + Data_40003374 = strAlignmentSpare1; + Data_40003378 = strAlignmentSpare2; + Data_4000337c = strAlignmentSpare3; //->0x227ac break; @@ -54,10 +54,10 @@ void func_2245c(int a, int b) Data_40003364 = strPoleAxisDev; Data_40003368 = strRaBklashCorr; Data_4000336c = strDecBklashCorr; - Data_40003370 = Data_40002f4c; - Data_40003374 = Data_40002f50; - Data_40003378 = Data_40002f54; - Data_4000337c = Data_40002f58; + Data_40003370 = strAlignmentSpare1; + Data_40003374 = strAlignmentSpare2; + Data_40003378 = strAlignmentSpare3; + Data_4000337c = strAlignmentSpare4; //->0x227ac break; @@ -77,11 +77,11 @@ void func_2245c(int a, int b) Data_40003360 = strSolarSystem; Data_40003364 = strConstellation; Data_40003368 = strFamousStar; - Data_4000336c = Data_40002f68; - Data_40003370 = Data_40002f6c; - Data_40003374 = Data_40002f70; - Data_40003378 = Data_40002f74; - Data_4000337c = Data_40002f78; + Data_4000336c = g_pcstrMessierCatalogue; + Data_40003370 = g_pcstrNGCCatalogue; + Data_40003374 = g_pcstrICCatalogue; + Data_40003378 = g_pcstrSh2Catalogue; + Data_4000337c = g_pcstrBrightStarCatalogue; //->0x22a8c break; @@ -89,51 +89,51 @@ void func_2245c(int a, int b) //0x22864 Data_40003360 = strConstellation; Data_40003364 = strFamousStar; - Data_40003368 = Data_40002f68; - Data_4000336c = Data_40002f6c; - Data_40003370 = Data_40002f70; - Data_40003374 = Data_40002f74; - Data_40003378 = Data_40002f78; - Data_4000337c = Data_40002f7c; + Data_40003368 = g_pcstrMessierCatalogue; + Data_4000336c = g_pcstrNGCCatalogue; + Data_40003370 = g_pcstrICCatalogue; + Data_40003374 = g_pcstrSh2Catalogue; + Data_40003378 = g_pcstrBrightStarCatalogue; + Data_4000337c = g_pcstrSAOStarCatalogue; //->0x22a8c break; case 3: //0x228ec Data_40003360 = strFamousStar; - Data_40003364 = Data_40002f68; - Data_40003368 = Data_40002f6c; - Data_4000336c = Data_40002f70; - Data_40003370 = Data_40002f74; - Data_40003374 = Data_40002f78; - Data_40003378 = Data_40002f7c; - Data_4000337c = Data_40002f80; + Data_40003364 = g_pcstrMessierCatalogue; + Data_40003368 = g_pcstrNGCCatalogue; + Data_4000336c = g_pcstrICCatalogue; + Data_40003370 = g_pcstrSh2Catalogue; + Data_40003374 = g_pcstrBrightStarCatalogue; + Data_40003378 = g_pcstrSAOStarCatalogue; + Data_4000337c = g_pcstrCustomerObjects; //->0x22a8c break; case 4: //0x22974 - Data_40003360 = Data_40002f68; - Data_40003364 = Data_40002f6c; - Data_40003368 = Data_40002f70; - Data_4000336c = Data_40002f74; - Data_40003370 = Data_40002f78; - Data_40003374 = Data_40002f7c; - Data_40003378 = Data_40002f80; - Data_4000337c = Data_40002f84; + Data_40003360 = g_pcstrMessierCatalogue; + Data_40003364 = g_pcstrNGCCatalogue; + Data_40003368 = g_pcstrICCatalogue; + Data_4000336c = g_pcstrSh2Catalogue; + Data_40003370 = g_pcstrBrightStarCatalogue; + Data_40003374 = g_pcstrSAOStarCatalogue; + Data_40003378 = g_pcstrCustomerObjects; + Data_4000337c = g_pcstrInputRAandDEC; //->0x22a8c break; case 5: //0x229fc - Data_40003360 = Data_40002f6c; - Data_40003364 = Data_40002f70; - Data_40003368 = Data_40002f74; - Data_4000336c = Data_40002f78; - Data_40003370 = Data_40002f7c; - Data_40003374 = Data_40002f80; - Data_40003378 = Data_40002f84; - Data_4000337c = Data_40002f88; + Data_40003360 = g_pcstrNGCCatalogue; + Data_40003364 = g_pcstrICCatalogue; + Data_40003368 = g_pcstrSh2Catalogue; + Data_4000336c = g_pcstrBrightStarCatalogue; + Data_40003370 = g_pcstrSAOStarCatalogue; + Data_40003374 = g_pcstrCustomerObjects; + Data_40003378 = g_pcstrInputRAandDEC; + Data_4000337c = g_pcstrCustomLandGoal; //->0x22a8c break; @@ -369,76 +369,76 @@ void AdaptDisplayLinesPerMenuLine(void) } /* 231d0 - todo */ -void func_231d0(int a, int b) +void PrepareFourLineMenuScroll(int a, int b) { switch (a) { case 11: - //0x2320c + //0x2320c: Telescope Align switch (b) { case 1: //0x23240 - Data_400033a8 = strOneStarAlign; - Data_400033ac = strTwoStarAlign; - Data_400033b0 = strThreeStarAlign; - Data_400033b4 = strTargetSync; + g_pcstrFourLineMenu1 = strOneStarAlign; + g_pcstrFourLineMenu2 = strTwoStarAlign; + g_pcstrFourLineMenu3 = strThreeStarAlign; + g_pcstrFourLineMenu4 = strTargetSync; break; case 2: //0x23288 - Data_400033a8 = strTwoStarAlign; - Data_400033ac = strThreeStarAlign; - Data_400033b0 = strTargetSync; - Data_400033b4 = strPoleAxisDev; + g_pcstrFourLineMenu1 = strTwoStarAlign; + g_pcstrFourLineMenu2 = strThreeStarAlign; + g_pcstrFourLineMenu3 = strTargetSync; + g_pcstrFourLineMenu4 = strPoleAxisDev; break; case 3: //0x232d0 - Data_400033a8 = strThreeStarAlign; - Data_400033ac = strTargetSync; - Data_400033b0 = strPoleAxisDev; - Data_400033b4 = strRaBklashCorr; + g_pcstrFourLineMenu1 = strThreeStarAlign; + g_pcstrFourLineMenu2 = strTargetSync; + g_pcstrFourLineMenu3 = strPoleAxisDev; + g_pcstrFourLineMenu4 = strRaBklashCorr; break; case 4: //0x23318 - Data_400033a8 = strTargetSync; - Data_400033ac = strPoleAxisDev; - Data_400033b0 = strRaBklashCorr; - Data_400033b4 = strDecBklashCorr; + g_pcstrFourLineMenu1 = strTargetSync; + g_pcstrFourLineMenu2 = strPoleAxisDev; + g_pcstrFourLineMenu3 = strRaBklashCorr; + g_pcstrFourLineMenu4 = strDecBklashCorr; break; case 5: //0x23360 - Data_400033a8 = strPoleAxisDev; - Data_400033ac = strRaBklashCorr; - Data_400033b0 = strDecBklashCorr; - Data_400033b4 = Data_40002f4c; + g_pcstrFourLineMenu1 = strPoleAxisDev; + g_pcstrFourLineMenu2 = strRaBklashCorr; + g_pcstrFourLineMenu3 = strDecBklashCorr; + g_pcstrFourLineMenu4 = strAlignmentSpare1; break; case 6: //0x233a8 - Data_400033a8 = strRaBklashCorr; - Data_400033ac = strDecBklashCorr; - Data_400033b0 = Data_40002f4c; - Data_400033b4 = Data_40002f50; + g_pcstrFourLineMenu1 = strRaBklashCorr; + g_pcstrFourLineMenu2 = strDecBklashCorr; + g_pcstrFourLineMenu3 = strAlignmentSpare1; + g_pcstrFourLineMenu4 = strAlignmentSpare2; break; case 7: //0x233f0 - Data_400033a8 = strDecBklashCorr; - Data_400033ac = Data_40002f4c; - Data_400033b0 = Data_40002f50; - Data_400033b4 = Data_40002f54; + g_pcstrFourLineMenu1 = strDecBklashCorr; + g_pcstrFourLineMenu2 = strAlignmentSpare1; + g_pcstrFourLineMenu3 = strAlignmentSpare2; + g_pcstrFourLineMenu4 = strAlignmentSpare3; break; case 8: //0x23438 - Data_400033a8 = Data_40002f4c; - Data_400033ac = Data_40002f50; - Data_400033b0 = Data_40002f54; - Data_400033b4 = Data_40002f58; + g_pcstrFourLineMenu1 = strAlignmentSpare1; + g_pcstrFourLineMenu2 = strAlignmentSpare2; + g_pcstrFourLineMenu3 = strAlignmentSpare3; + g_pcstrFourLineMenu4 = strAlignmentSpare4; break; default: @@ -448,79 +448,79 @@ void func_231d0(int a, int b) break; case 12: - //0x23490 + //0x23490: Navigation switch (b) { case 1: //0x234c8 - Data_400033a8 = strSolarSystem; - Data_400033ac = strConstellation; - Data_400033b0 = strFamousStar; - Data_400033b4 = Data_40002f68; + g_pcstrFourLineMenu1 = strSolarSystem; + g_pcstrFourLineMenu2 = strConstellation; + g_pcstrFourLineMenu3 = strFamousStar; + g_pcstrFourLineMenu4 = g_pcstrMessierCatalogue; break; case 2: //0x23510 - Data_400033a8 = strConstellation; - Data_400033ac = strFamousStar; - Data_400033b0 = Data_40002f68; - Data_400033b4 = Data_40002f6c; + g_pcstrFourLineMenu1 = strConstellation; + g_pcstrFourLineMenu2 = strFamousStar; + g_pcstrFourLineMenu3 = g_pcstrMessierCatalogue; + g_pcstrFourLineMenu4 = g_pcstrNGCCatalogue; break; case 3: //0x23558 - Data_400033a8 = strFamousStar; - Data_400033ac = Data_40002f68; - Data_400033b0 = Data_40002f6c; - Data_400033b4 = Data_40002f70; + g_pcstrFourLineMenu1 = strFamousStar; + g_pcstrFourLineMenu2 = g_pcstrMessierCatalogue; + g_pcstrFourLineMenu3 = g_pcstrNGCCatalogue; + g_pcstrFourLineMenu4 = g_pcstrICCatalogue; break; case 4: //0x235a0 - Data_400033a8 = Data_40002f68; - Data_400033ac = Data_40002f6c; - Data_400033b0 = Data_40002f70; - Data_400033b4 = Data_40002f74; + g_pcstrFourLineMenu1 = g_pcstrMessierCatalogue; + g_pcstrFourLineMenu2 = g_pcstrNGCCatalogue; + g_pcstrFourLineMenu3 = g_pcstrICCatalogue; + g_pcstrFourLineMenu4 = g_pcstrSh2Catalogue; break; case 5: //0x235e8 - Data_400033a8 = Data_40002f6c; - Data_400033ac = Data_40002f70; - Data_400033b0 = Data_40002f74; - Data_400033b4 = Data_40002f78; + g_pcstrFourLineMenu1 = g_pcstrNGCCatalogue; + g_pcstrFourLineMenu2 = g_pcstrICCatalogue; + g_pcstrFourLineMenu3 = g_pcstrSh2Catalogue; + g_pcstrFourLineMenu4 = g_pcstrBrightStarCatalogue; break; case 6: //0x23630 - Data_400033a8 = Data_40002f70; - Data_400033ac = Data_40002f74; - Data_400033b0 = Data_40002f78; - Data_400033b4 = Data_40002f7c; + g_pcstrFourLineMenu1 = g_pcstrICCatalogue; + g_pcstrFourLineMenu2 = g_pcstrSh2Catalogue; + g_pcstrFourLineMenu3 = g_pcstrBrightStarCatalogue; + g_pcstrFourLineMenu4 = g_pcstrSAOStarCatalogue; break; case 7: //0x23678 - Data_400033a8 = Data_40002f74; - Data_400033ac = Data_40002f78; - Data_400033b0 = Data_40002f7c; - Data_400033b4 = Data_40002f80; + g_pcstrFourLineMenu1 = g_pcstrSh2Catalogue; + g_pcstrFourLineMenu2 = g_pcstrBrightStarCatalogue; + g_pcstrFourLineMenu3 = g_pcstrSAOStarCatalogue; + g_pcstrFourLineMenu4 = g_pcstrCustomerObjects; break; case 8: //0x237a4 - Data_400033a8 = Data_40002f78; - Data_400033ac = Data_40002f7c; - Data_400033b0 = Data_40002f80; - Data_400033b4 = Data_40002f84; + g_pcstrFourLineMenu1 = g_pcstrBrightStarCatalogue; + g_pcstrFourLineMenu2 = g_pcstrSAOStarCatalogue; + g_pcstrFourLineMenu3 = g_pcstrCustomerObjects; + g_pcstrFourLineMenu4 = g_pcstrInputRAandDEC; break; case 9: //0x237ec - Data_400033a8 = Data_40002f7c; - Data_400033ac = Data_40002f80; - Data_400033b0 = Data_40002f84; - Data_400033b4 = Data_40002f88; + g_pcstrFourLineMenu1 = g_pcstrSAOStarCatalogue; + g_pcstrFourLineMenu2 = g_pcstrCustomerObjects; + g_pcstrFourLineMenu3 = g_pcstrInputRAandDEC; + g_pcstrFourLineMenu4 = g_pcstrCustomLandGoal; break; default: @@ -535,58 +535,58 @@ void func_231d0(int a, int b) { case 1: //0x23874 - Data_400033a8 = strCurrentObjects; - Data_400033ac = Data_40002f90; - Data_400033b0 = Data_40002f94; - Data_400033b4 = Data_40002f98; + g_pcstrFourLineMenu1 = strCurrentObjects; + g_pcstrFourLineMenu2 = Data_40002f90; + g_pcstrFourLineMenu3 = Data_40002f94; + g_pcstrFourLineMenu4 = Data_40002f98; break; case 2: //0x238bc - Data_400033a8 = Data_40002f90; - Data_400033ac = Data_40002f94; - Data_400033b0 = Data_40002f98; - Data_400033b4 = Data_40002f9c; + g_pcstrFourLineMenu1 = Data_40002f90; + g_pcstrFourLineMenu2 = Data_40002f94; + g_pcstrFourLineMenu3 = Data_40002f98; + g_pcstrFourLineMenu4 = Data_40002f9c; break; case 3: //0x23904 - Data_400033a8 = Data_40002f94; - Data_400033ac = Data_40002f98; - Data_400033b0 = Data_40002f9c; - Data_400033b4 = Data_40002fa0; + g_pcstrFourLineMenu1 = Data_40002f94; + g_pcstrFourLineMenu2 = Data_40002f98; + g_pcstrFourLineMenu3 = Data_40002f9c; + g_pcstrFourLineMenu4 = Data_40002fa0; break; case 4: //0x2394c - Data_400033a8 = Data_40002f98; - Data_400033ac = Data_40002f9c; - Data_400033b0 = Data_40002fa0; - Data_400033b4 = Data_40002fa4; + g_pcstrFourLineMenu1 = Data_40002f98; + g_pcstrFourLineMenu2 = Data_40002f9c; + g_pcstrFourLineMenu3 = Data_40002fa0; + g_pcstrFourLineMenu4 = Data_40002fa4; break; case 5: //0x23994 - Data_400033a8 = Data_40002f9c; - Data_400033ac = Data_40002fa0; - Data_400033b0 = Data_40002fa4; - Data_400033b4 = Data_40002fa8; + g_pcstrFourLineMenu1 = Data_40002f9c; + g_pcstrFourLineMenu2 = Data_40002fa0; + g_pcstrFourLineMenu3 = Data_40002fa4; + g_pcstrFourLineMenu4 = Data_40002fa8; break; case 6: //0x239dc - Data_400033a8 = Data_40002fa0; - Data_400033ac = Data_40002fa4; - Data_400033b0 = Data_40002fa8; - Data_400033b4 = strParkposition; + g_pcstrFourLineMenu1 = Data_40002fa0; + g_pcstrFourLineMenu2 = Data_40002fa4; + g_pcstrFourLineMenu3 = Data_40002fa8; + g_pcstrFourLineMenu4 = strParkposition; break; case 7: //0x23a24 - Data_400033a8 = Data_40002fa4; - Data_400033ac = Data_40002fa8; - Data_400033b0 = strParkposition; - Data_400033b4 = Data_40002fb0; + g_pcstrFourLineMenu1 = Data_40002fa4; + g_pcstrFourLineMenu2 = Data_40002fa8; + g_pcstrFourLineMenu3 = strParkposition; + g_pcstrFourLineMenu4 = Data_40002fb0; break; default: @@ -601,58 +601,58 @@ void func_231d0(int a, int b) { case 1: //0x23aac - Data_400033a8 = strTimeAndDate; - Data_400033ac = Data_40002fb8; - Data_400033b0 = Data_40002fbc; - Data_400033b4 = Data_40002fc0; + g_pcstrFourLineMenu1 = strTimeAndDate; + g_pcstrFourLineMenu2 = Data_40002fb8; + g_pcstrFourLineMenu3 = Data_40002fbc; + g_pcstrFourLineMenu4 = Data_40002fc0; break; case 2: //0x23af4 - Data_400033a8 = Data_40002fb8; - Data_400033ac = Data_40002fbc; - Data_400033b0 = Data_40002fc0; - Data_400033b4 = Data_40002fc4; + g_pcstrFourLineMenu1 = Data_40002fb8; + g_pcstrFourLineMenu2 = Data_40002fbc; + g_pcstrFourLineMenu3 = Data_40002fc0; + g_pcstrFourLineMenu4 = Data_40002fc4; break; case 3: //0x23b3c - Data_400033a8 = Data_40002fbc; - Data_400033ac = Data_40002fc0; - Data_400033b0 = Data_40002fc4; - Data_400033b4 = strTelescopeMount; + g_pcstrFourLineMenu1 = Data_40002fbc; + g_pcstrFourLineMenu2 = Data_40002fc0; + g_pcstrFourLineMenu3 = Data_40002fc4; + g_pcstrFourLineMenu4 = strTelescopeMount; break; case 4: //0x23b84 - Data_400033a8 = Data_40002fc0; - Data_400033ac = Data_40002fc4; - Data_400033b0 = strTelescopeMount; - Data_400033b4 = strTrackingRate; + g_pcstrFourLineMenu1 = Data_40002fc0; + g_pcstrFourLineMenu2 = Data_40002fc4; + g_pcstrFourLineMenu3 = strTelescopeMount; + g_pcstrFourLineMenu4 = strTrackingRate; break; case 5: //0x23bcc - Data_400033a8 = Data_40002fc4; - Data_400033ac = strTelescopeMount; - Data_400033b0 = strTrackingRate; - Data_400033b4 = Data_40002fd0; + g_pcstrFourLineMenu1 = Data_40002fc4; + g_pcstrFourLineMenu2 = strTelescopeMount; + g_pcstrFourLineMenu3 = strTrackingRate; + g_pcstrFourLineMenu4 = Data_40002fd0; break; case 6: //0x23c14 - Data_400033a8 = strTelescopeMount; - Data_400033ac = strTrackingRate; - Data_400033b0 = Data_40002fd0; - Data_400033b4 = strReset; + g_pcstrFourLineMenu1 = strTelescopeMount; + g_pcstrFourLineMenu2 = strTrackingRate; + g_pcstrFourLineMenu3 = Data_40002fd0; + g_pcstrFourLineMenu4 = strReset; break; case 7: //0x23c5c - Data_400033a8 = strTrackingRate; - Data_400033ac = Data_40002fd0; - Data_400033b0 = strReset; - Data_400033b4 = Data_40002fd8; + g_pcstrFourLineMenu1 = strTrackingRate; + g_pcstrFourLineMenu2 = Data_40002fd0; + g_pcstrFourLineMenu3 = strReset; + g_pcstrFourLineMenu4 = Data_40002fd8; break; default: @@ -667,66 +667,66 @@ void func_231d0(int a, int b) { case 1: //0x23ce8 - Data_400033a8 = Data_40002fdc; - Data_400033ac = Data_40002fe0; - Data_400033b0 = Data_40002fe4; - Data_400033b4 = Data_40002fe8; + g_pcstrFourLineMenu1 = Data_40002fdc; + g_pcstrFourLineMenu2 = Data_40002fe0; + g_pcstrFourLineMenu3 = Data_40002fe4; + g_pcstrFourLineMenu4 = Data_40002fe8; break; case 2: //0x23d30 - Data_400033a8 = Data_40002fe0; - Data_400033ac = Data_40002fe4; - Data_400033b0 = Data_40002fe8; - Data_400033b4 = Data_40002fec; + g_pcstrFourLineMenu1 = Data_40002fe0; + g_pcstrFourLineMenu2 = Data_40002fe4; + g_pcstrFourLineMenu3 = Data_40002fe8; + g_pcstrFourLineMenu4 = Data_40002fec; break; case 3: //0x23d78 - Data_400033a8 = Data_40002fe4; - Data_400033ac = Data_40002fe8; - Data_400033b0 = Data_40002fec; - Data_400033b4 = Data_40002ff0; + g_pcstrFourLineMenu1 = Data_40002fe4; + g_pcstrFourLineMenu2 = Data_40002fe8; + g_pcstrFourLineMenu3 = Data_40002fec; + g_pcstrFourLineMenu4 = Data_40002ff0; break; case 4: //0x23dc0 - Data_400033a8 = Data_40002fe8; - Data_400033ac = Data_40002fec; - Data_400033b0 = Data_40002ff0; - Data_400033b4 = Data_40002ff4; + g_pcstrFourLineMenu1 = Data_40002fe8; + g_pcstrFourLineMenu2 = Data_40002fec; + g_pcstrFourLineMenu3 = Data_40002ff0; + g_pcstrFourLineMenu4 = Data_40002ff4; break; case 5: //0x23e08 - Data_400033a8 = Data_40002fec; - Data_400033ac = Data_40002ff0; - Data_400033b0 = Data_40002ff4; - Data_400033b4 = Data_40002ff8; + g_pcstrFourLineMenu1 = Data_40002fec; + g_pcstrFourLineMenu2 = Data_40002ff0; + g_pcstrFourLineMenu3 = Data_40002ff4; + g_pcstrFourLineMenu4 = Data_40002ff8; break; case 6: //0x23e50 - Data_400033a8 = Data_40002ff0; - Data_400033ac = Data_40002ff4; - Data_400033b0 = Data_40002ff8; - Data_400033b4 = Data_40002ffc; + g_pcstrFourLineMenu1 = Data_40002ff0; + g_pcstrFourLineMenu2 = Data_40002ff4; + g_pcstrFourLineMenu3 = Data_40002ff8; + g_pcstrFourLineMenu4 = Data_40002ffc; break; case 7: //0x23e98 - Data_400033a8 = Data_40002ff4; - Data_400033ac = Data_40002ff8; - Data_400033b0 = Data_40002ffc; - Data_400033b4 = Data_40003000; + g_pcstrFourLineMenu1 = Data_40002ff4; + g_pcstrFourLineMenu2 = Data_40002ff8; + g_pcstrFourLineMenu3 = Data_40002ffc; + g_pcstrFourLineMenu4 = Data_40003000; break; case 8: //0x23ee0 - Data_400033a8 = Data_40002ff8; - Data_400033ac = Data_40002ffc; - Data_400033b0 = Data_40003000; - Data_400033b4 = Data_40003004; + g_pcstrFourLineMenu1 = Data_40002ff8; + g_pcstrFourLineMenu2 = Data_40002ffc; + g_pcstrFourLineMenu3 = Data_40003000; + g_pcstrFourLineMenu4 = Data_40003004; break; default: @@ -741,42 +741,42 @@ void func_231d0(int a, int b) { case 1: //0x23f60 - Data_400033a8 = Data_40003008; - Data_400033ac = Data_4000300c; - Data_400033b0 = Data_40003010; - Data_400033b4 = Data_40003014; + g_pcstrFourLineMenu1 = Data_40003008; + g_pcstrFourLineMenu2 = Data_4000300c; + g_pcstrFourLineMenu3 = Data_40003010; + g_pcstrFourLineMenu4 = Data_40003014; break; case 2: //0x23fa8 - Data_400033a8 = Data_4000300c; - Data_400033ac = Data_40003010; - Data_400033b0 = Data_40003014; - Data_400033b4 = Data_40003018; + g_pcstrFourLineMenu1 = Data_4000300c; + g_pcstrFourLineMenu2 = Data_40003010; + g_pcstrFourLineMenu3 = Data_40003014; + g_pcstrFourLineMenu4 = Data_40003018; break; case 3: //0x23ff0 - Data_400033a8 = Data_40003010; - Data_400033ac = Data_40003014; - Data_400033b0 = Data_40003018; - Data_400033b4 = Data_4000301c; + g_pcstrFourLineMenu1 = Data_40003010; + g_pcstrFourLineMenu2 = Data_40003014; + g_pcstrFourLineMenu3 = Data_40003018; + g_pcstrFourLineMenu4 = Data_4000301c; break; case 4: //0x24038 - Data_400033a8 = Data_40003014; - Data_400033ac = Data_40003018; - Data_400033b0 = Data_4000301c; - Data_400033b4 = Data_40003020; + g_pcstrFourLineMenu1 = Data_40003014; + g_pcstrFourLineMenu2 = Data_40003018; + g_pcstrFourLineMenu3 = Data_4000301c; + g_pcstrFourLineMenu4 = Data_40003020; break; case 5: //0x24080 - Data_400033a8 = Data_40003018; - Data_400033ac = Data_4000301c; - Data_400033b0 = Data_40003020; - Data_400033b4 = Data_40003024; + g_pcstrFourLineMenu1 = Data_40003018; + g_pcstrFourLineMenu2 = Data_4000301c; + g_pcstrFourLineMenu3 = Data_40003020; + g_pcstrFourLineMenu4 = Data_40003024; break; default: diff --git a/applications/v2.3/func_27844.c b/applications/v2.3/func_27844.c index edb7074..32b590d 100644 --- a/applications/v2.3/func_27844.c +++ b/applications/v2.3/func_27844.c @@ -395,7 +395,7 @@ void PrepareScreenItems(void) //->3d71c break; - case 1: + case MENU_CONTEXT_RECENT_TARGETS: //1: //0x29994: Recent Targets bData_40002f14_RecentTargetCount = flash_get_recent_targets(Data_40002f15_RecentTargetTypeArray, Data_4000359c_RecentTargetIdArray, Data_400035bc); @@ -595,10 +595,10 @@ void PrepareScreenItems(void) bData_4000316e_FocusLineOn8LineDisplay = 1; - Data_400033a8 = strTelescopeAlign; - Data_400033ac = strNavigation; - Data_400033b0 = strUtilities; - Data_400033b4 = strSetup; + g_pcstrFourLineMenu1 = strTelescopeAlign; + g_pcstrFourLineMenu2 = strNavigation; + g_pcstrFourLineMenu3 = strUtilities; + g_pcstrFourLineMenu4 = strSetup; bData_4000316f_FocusLineOn4LineDisplay = 1; @@ -619,10 +619,10 @@ void PrepareScreenItems(void) bData_4000316e_FocusLineOn8LineDisplay = 3; - Data_400033a8 = strTelescopeAlign; - Data_400033ac = strNavigation; - Data_400033b0 = strUtilities; - Data_400033b4 = strSetup; + g_pcstrFourLineMenu1 = strTelescopeAlign; + g_pcstrFourLineMenu2 = strNavigation; + g_pcstrFourLineMenu3 = strUtilities; + g_pcstrFourLineMenu4 = strSetup; bData_4000316f_FocusLineOn4LineDisplay = 2; @@ -643,10 +643,10 @@ void PrepareScreenItems(void) bData_4000316e_FocusLineOn8LineDisplay = 5; - Data_400033a8 = strTelescopeAlign; - Data_400033ac = strNavigation; - Data_400033b0 = strUtilities; - Data_400033b4 = strSetup; + g_pcstrFourLineMenu1 = strTelescopeAlign; + g_pcstrFourLineMenu2 = strNavigation; + g_pcstrFourLineMenu3 = strUtilities; + g_pcstrFourLineMenu4 = strSetup; bData_4000316f_FocusLineOn4LineDisplay = 3; @@ -667,10 +667,10 @@ void PrepareScreenItems(void) bData_4000316e_FocusLineOn8LineDisplay = 7; - Data_400033a8 = strTelescopeAlign; - Data_400033ac = strNavigation; - Data_400033b0 = strUtilities; - Data_400033b4 = strSetup; + g_pcstrFourLineMenu1 = strTelescopeAlign; + g_pcstrFourLineMenu2 = strNavigation; + g_pcstrFourLineMenu3 = strUtilities; + g_pcstrFourLineMenu4 = strSetup; bData_4000316f_FocusLineOn4LineDisplay = 4; @@ -692,13 +692,13 @@ void PrepareScreenItems(void) //0x2a4b4: RA Bklash Corr. case MENU_CONTEXT_DEC_BKLASH_CORR: //1700: //0x2a4b8: DEC Bklash Corr. - func_2245c(11, bData_40003170); + PrepareEightLineMenuScroll(11, g_bAlignmentEightLineMenuTopItem); - bData_4000316e_FocusLineOn8LineDisplay = bData_40003172; + bData_4000316e_FocusLineOn8LineDisplay = g_bAlignmentEightLineMenuFocusItem; - func_231d0(11, bData_40003171); + PrepareFourLineMenuScroll(11, g_bAlignmentFourLineMenuTopItem); - bData_4000316f_FocusLineOn4LineDisplay = bData_40003173; + bData_4000316f_FocusLineOn4LineDisplay = g_bAlignmentFourLineMenuFocusItem; AdaptDisplayLinesPerMenuLine(); //->3d71c @@ -728,11 +728,11 @@ void PrepareScreenItems(void) //0x2a52c: Input RA and DEC case MENU_CONTEXT_NAVIGATION_CUST_LAND: //2130: //0x2a530: Custom Land Goal - func_2245c(12, bData_40003174); + PrepareEightLineMenuScroll(12, bData_40003174); bData_4000316e_FocusLineOn8LineDisplay = bData_40003176; - func_231d0(12, bData_40003175); + PrepareFourLineMenuScroll(12, bData_40003175); bData_4000316f_FocusLineOn4LineDisplay = bData_40003177; @@ -758,11 +758,11 @@ void PrepareScreenItems(void) //0x2a598: Display Illumin. case MENU_CONTEXT_PARK_POSITION: //3900: //0x2a59c: Parkposition - func_2245c(13, bData_40003178); + PrepareEightLineMenuScroll(13, bData_40003178); bData_4000316e_FocusLineOn8LineDisplay = bData_4000317a; - func_231d0(13, bData_40003179); + PrepareFourLineMenuScroll(13, bData_40003179); bData_4000316f_FocusLineOn4LineDisplay = bData_4000317b; @@ -788,11 +788,11 @@ void PrepareScreenItems(void) //0x2a604 case MENU_CONTEXT_RESET: //4900: //0x2a608 - func_2245c(14, bData_4000317c); + PrepareEightLineMenuScroll(14, bData_4000317c); bData_4000316e_FocusLineOn8LineDisplay = bData_4000317e; - func_231d0(14, bData_4000317d); + PrepareFourLineMenuScroll(14, bData_4000317d); bData_4000316f_FocusLineOn4LineDisplay = bData_4000317f; @@ -820,7 +820,7 @@ void PrepareScreenItems(void) //0x2a674 case 0x55FC: //22012 //0x2a678 - func_2245c(22, bData_40003180); + PrepareEightLineMenuScroll(22, bData_40003180); bData_4000316e_FocusLineOn8LineDisplay = bData_40003182; bData_40003197_DisplayLinesPerMenuLine = 1; @@ -843,7 +843,7 @@ void PrepareScreenItems(void) //0x2a6c4 case 2308: //0x2a6c8 - func_2245c(23, bData_40003184); + PrepareEightLineMenuScroll(23, bData_40003184); bData_4000316e_FocusLineOn8LineDisplay = bData_40003186; bData_40003197_DisplayLinesPerMenuLine = 1; @@ -964,11 +964,11 @@ void PrepareScreenItems(void) case 0x526D: //21101 //0x2ab4c - Data_40003360 = Data_40003044; + Data_40003360 = Data_40003044; //"Select" Data_40003364 = ""; - Data_40003368 = Data_40003048; + Data_40003368 = Data_40003048; //"Add" Data_4000336c = ""; - Data_40003370 = Data_4000304c; + Data_40003370 = Data_4000304c; //"Delete" Data_40003374 = ""; Data_40003378 = ""; Data_4000337c = ""; @@ -1108,10 +1108,10 @@ void PrepareScreenItems(void) case 0xA80D: //43021 //0x2b010 - Data_40003360 = Data_40003068; + Data_40003360 = Data_40003068; //"Select" Data_40003368 = Data_4000306c; Data_40003370 = Data_40003070; - Data_40003378 = Data_40003074; + Data_40003378 = Data_40003074; //"Modify" Data_40003364 = ""; Data_4000336c = ""; Data_40003374 = ""; @@ -1657,12 +1657,12 @@ void PrepareScreenItems(void) if (bRaBacklashCorrectionDirection == 2) { - Data_40003368 = Data_400030fc; + Data_40003368 = Data_400030fc; //"Positive backlash is:" } //0x2cce4 if (bRaBacklashCorrectionDirection == 1) { - Data_40003368 = Data_40003100; + Data_40003368 = Data_40003100; //"Negative backlash is: " } //0x2cd04 Data_4000336c = " "; @@ -1751,12 +1751,12 @@ void PrepareScreenItems(void) if (bDecBacklashCorrectionDirection == 2) { - Data_40003368 = Data_400030fc; + Data_40003368 = Data_400030fc; //"Positive backlash is:" } //0x2d084 if (bDecBacklashCorrectionDirection == 1) { - Data_40003368 = Data_40003100; + Data_40003368 = Data_40003100; //"Negative backlash is: " } //0x2d0a4 Data_4000336c = " "; diff --git a/applications/v2.3/func_3d72c.c b/applications/v2.3/func_3d72c.c index 2fa0c96..84032c4 100644 --- a/applications/v2.3/func_3d72c.c +++ b/applications/v2.3/func_3d72c.c @@ -3107,55 +3107,55 @@ void DisplayScreenItems(void) { case 0: //0x4ea88 - func_91c(0, 1, 1, 136, Data_400033a8); - func_91c(0, 2, 1, 136, Data_400033ac); - func_91c(0, 3, 1, 136, Data_400033b0); - func_91c(0, 4, 1, 136, Data_400033b4); + func_91c(0, 1, 1, 136, g_pcstrFourLineMenu1); + func_91c(0, 2, 1, 136, g_pcstrFourLineMenu2); + func_91c(0, 3, 1, 136, g_pcstrFourLineMenu3); + func_91c(0, 4, 1, 136, g_pcstrFourLineMenu4); //->0x4edc0 break; case 1: //0x4eb10 - func_91c(1, 1, 1, 136, Data_400033a8); - func_91c(0, 2, 1, 136, Data_400033ac); - func_91c(0, 3, 1, 136, Data_400033b0); - func_91c(0, 4, 1, 136, Data_400033b4); + func_91c(1, 1, 1, 136, g_pcstrFourLineMenu1); + func_91c(0, 2, 1, 136, g_pcstrFourLineMenu2); + func_91c(0, 3, 1, 136, g_pcstrFourLineMenu3); + func_91c(0, 4, 1, 136, g_pcstrFourLineMenu4); //->0x4edc0 break; case 2: //0x4eb98 - func_91c(0, 1, 1, 136, Data_400033a8); - func_91c(1, 2, 1, 136, Data_400033ac); - func_91c(0, 3, 1, 136, Data_400033b0); - func_91c(0, 4, 1, 136, Data_400033b4); + func_91c(0, 1, 1, 136, g_pcstrFourLineMenu1); + func_91c(1, 2, 1, 136, g_pcstrFourLineMenu2); + func_91c(0, 3, 1, 136, g_pcstrFourLineMenu3); + func_91c(0, 4, 1, 136, g_pcstrFourLineMenu4); //->0x4edc0 break; case 3: //0x4ec20 - func_91c(0, 1, 1, 136, Data_400033a8); - func_91c(0, 2, 1, 136, Data_400033ac); - func_91c(1, 3, 1, 136, Data_400033b0); - func_91c(0, 4, 1, 136, Data_400033b4); + func_91c(0, 1, 1, 136, g_pcstrFourLineMenu1); + func_91c(0, 2, 1, 136, g_pcstrFourLineMenu2); + func_91c(1, 3, 1, 136, g_pcstrFourLineMenu3); + func_91c(0, 4, 1, 136, g_pcstrFourLineMenu4); //->0x4edc0 break; case 4: //0x4eca8 - func_91c(0, 1, 1, 136, Data_400033a8); - func_91c(0, 2, 1, 136, Data_400033ac); - func_91c(0, 3, 1, 136, Data_400033b0); - func_91c(1, 4, 1, 136, Data_400033b4); + func_91c(0, 1, 1, 136, g_pcstrFourLineMenu1); + func_91c(0, 2, 1, 136, g_pcstrFourLineMenu2); + func_91c(0, 3, 1, 136, g_pcstrFourLineMenu3); + func_91c(1, 4, 1, 136, g_pcstrFourLineMenu4); //->0x4edc0 break; case 5: //0x4ed30 - func_91c(1, 1, 1, 136, Data_400033a8); - func_91c(1, 2, 1, 136, Data_400033ac); - func_91c(1, 3, 1, 136, Data_400033b0); - func_91c(1, 4, 1, 136, Data_400033b4); + func_91c(1, 1, 1, 136, g_pcstrFourLineMenu1); + func_91c(1, 2, 1, 136, g_pcstrFourLineMenu2); + func_91c(1, 3, 1, 136, g_pcstrFourLineMenu3); + func_91c(1, 4, 1, 136, g_pcstrFourLineMenu4); //->0x4edc0 break; diff --git a/applications/v2.3/language.c b/applications/v2.3/language.c index f97af1f..b702664 100644 --- a/applications/v2.3/language.c +++ b/applications/v2.3/language.c @@ -410,20 +410,20 @@ void SwapLanguageStrings(void) strPoleAxisDev = strEngPoleAxisDev; strRaBklashCorr = strEngRaBklashCorr; strDecBklashCorr = strEngDecBklashCorr; - Data_40002f4c = " "; + strAlignmentSpare1 = " "; strSolarSystem = strEngSolarSystem; strConstellation = strEngConstellation; strFamousStar = strEngFamousStar; - Data_40002f68 = strEngMessierCatal; - Data_40002f6c = strEngNGCCatalog; - Data_40002f70 = strEngICCatalogue; - Data_40002f74 = strEngSh2Catalog; - Data_40002f78 = strEngBrightStarCat; - Data_40002f7c = strEngSAOStarCatal; - Data_40002f80 = strEngCustomerObjects; - Data_40002f84 = strEngInputRAandDEC; - Data_40002f88 = strEngCustomLandGoal; + g_pcstrMessierCatalogue = strEngMessierCatal; + g_pcstrNGCCatalogue = strEngNGCCatalog; + g_pcstrICCatalogue = strEngICCatalogue; + g_pcstrSh2Catalogue = strEngSh2Catalog; + g_pcstrBrightStarCatalogue = strEngBrightStarCat; + g_pcstrSAOStarCatalogue = strEngSAOStarCatal; + g_pcstrCustomerObjects = strEngCustomerObjects; + g_pcstrInputRAandDEC = strEngInputRAandDEC; + g_pcstrCustomLandGoal = strEngCustomLandGoal; strCurrentObjects = strEngCurrentObjects; Data_40002f90 = strEngObjectRiseSet; @@ -527,15 +527,15 @@ void SwapLanguageStrings(void) strSolarSystem = Data_40000fc2; strConstellation = Data_40000fe2; strFamousStar = Data_40001002; - Data_40002f68 = Data_40001022; - Data_40002f6c = Data_40001042; - Data_40002f70 = Data_40001062; - Data_40002f74 = Data_40001082; - Data_40002f78 = Data_400010a2; - Data_40002f7c = Data_400010c2; - Data_40002f80 = Data_400010e2; - Data_40002f84 = Data_40001102; - Data_40002f88 = Data_40001122; + g_pcstrMessierCatalogue = Data_40001022; + g_pcstrNGCCatalogue = Data_40001042; + g_pcstrICCatalogue = Data_40001062; + g_pcstrSh2Catalogue = Data_40001082; + g_pcstrBrightStarCatalogue = Data_400010a2; + g_pcstrSAOStarCatalogue = Data_400010c2; + g_pcstrCustomerObjects = Data_400010e2; + g_pcstrInputRAandDEC = Data_40001102; + g_pcstrCustomLandGoal = Data_40001122; strCurrentObjects = Data_40001142; Data_40002f90 = Data_40001162; Data_40002f94 = Data_40001182; @@ -638,15 +638,15 @@ void SwapLanguageStrings(void) strSolarSystem = strFreSolarSystem; strConstellation = strFreConstellation; strFamousStar = Data_40001522; - Data_40002f68 = Data_40001542; - Data_40002f6c = Data_40001562; - Data_40002f70 = Data_40001582; - Data_40002f74 = Data_400015a2; - Data_40002f78 = Data_400015c2; - Data_40002f7c = Data_400015e2; - Data_40002f80 = Data_40001602; - Data_40002f84 = Data_40001622; - Data_40002f88 = Data_40001642; + g_pcstrMessierCatalogue = Data_40001542; + g_pcstrNGCCatalogue = Data_40001562; + g_pcstrICCatalogue = Data_40001582; + g_pcstrSh2Catalogue = Data_400015a2; + g_pcstrBrightStarCatalogue = Data_400015c2; + g_pcstrSAOStarCatalogue = Data_400015e2; + g_pcstrCustomerObjects = Data_40001602; + g_pcstrInputRAandDEC = Data_40001622; + g_pcstrCustomLandGoal = Data_40001642; strCurrentObjects = Data_40001662; Data_40002f90 = Data_40001682; Data_40002f94 = Data_400016a2; @@ -748,15 +748,15 @@ void SwapLanguageStrings(void) strSolarSystem = Data_40001a02; strConstellation = Data_40001a22; strFamousStar = Data_40001a42; - Data_40002f68 = Data_40001a62; - Data_40002f6c = Data_40001a82; - Data_40002f70 = Data_40001aa2; - Data_40002f74 = Data_40001ac2; - Data_40002f78 = Data_40001ae2; - Data_40002f7c = Data_40001b02; - Data_40002f80 = Data_40001b22; - Data_40002f84 = Data_40001b42; - Data_40002f88 = Data_40001b62; + g_pcstrMessierCatalogue = Data_40001a62; + g_pcstrNGCCatalogue = Data_40001a82; + g_pcstrICCatalogue = Data_40001aa2; + g_pcstrSh2Catalogue = Data_40001ac2; + g_pcstrBrightStarCatalogue = Data_40001ae2; + g_pcstrSAOStarCatalogue = Data_40001b02; + g_pcstrCustomerObjects = Data_40001b22; + g_pcstrInputRAandDEC = Data_40001b42; + g_pcstrCustomLandGoal = Data_40001b62; strCurrentObjects = Data_40001b82; Data_40002f90 = Data_40001ba2; Data_40002f94 = Data_40001bc2; @@ -858,15 +858,16 @@ void SwapLanguageStrings(void) strSolarSystem = Data_40001f22; strConstellation = Data_40001f42; strFamousStar = Data_40001f62; - Data_40002f68 = Data_40001f82; - Data_40002f6c = Data_40001fa2; - Data_40002f70 = Data_40001fc2; - Data_40002f74 = Data_40001fe2; - Data_40002f78 = Data_40002002; - Data_40002f7c = Data_40002022; - Data_40002f80 = Data_40002042; - Data_40002f84 = Data_40002062; - Data_40002f88 = Data_40002082; + g_pcstrMessierCatalogue = Data_40001f82; + g_pcstrNGCCatalogue = Data_40001fa2; + g_pcstrICCatalogue = Data_40001fc2; + g_pcstrSh2Catalogue = Data_40001fe2; + g_pcstrBrightStarCatalogue = Data_40002002; + g_pcstrSAOStarCatalogue = Data_40002022; + g_pcstrCustomerObjects = Data_40002042; + g_pcstrInputRAandDEC = Data_40002062; + g_pcstrCustomLandGoal = Data_40002082; + strCurrentObjects = Data_400020a2; Data_40002f90 = Data_400020c2; Data_40002f94 = Data_400020e2; diff --git a/applications/v2.3/macros.h b/applications/v2.3/macros.h index 02d3215..06b872e 100644 --- a/applications/v2.3/macros.h +++ b/applications/v2.3/macros.h @@ -8,3 +8,9 @@ ((int)a), ((int)((a - (int)a) * 60)) +#define UART1_WRITE_HEADER(len) \ + uart1_write_byte(0x55); \ + uart1_write_byte(0xaa); \ + uart1_write_byte(0x01); \ + uart1_write_byte(len); + diff --git a/applications/v2.3/main.c b/applications/v2.3/main.c index 5c62c3a..6c7a3d8 100644 --- a/applications/v2.3/main.c +++ b/applications/v2.3/main.c @@ -252,28 +252,16 @@ void HandleReset(void) func_d2cc(); func_5099c(); - uart1_write_byte(0x55); - uart1_write_byte(0xaa); - uart1_write_byte(0x01); - uart1_write_byte(0x01); + UART1_WRITE_HEADER(1); uart1_write_byte(0x44); - uart1_write_byte(0x55); - uart1_write_byte(0xaa); - uart1_write_byte(0x01); - uart1_write_byte(0x01); + UART1_WRITE_HEADER(1); uart1_write_byte(0x64); - uart1_write_byte(0x55); - uart1_write_byte(0xaa); - uart1_write_byte(0x01); - uart1_write_byte(0x01); + UART1_WRITE_HEADER(1); uart1_write_byte(0x04); - uart1_write_byte(0x55); - uart1_write_byte(0xaa); - uart1_write_byte(0x01); - uart1_write_byte(0x01); + UART1_WRITE_HEADER(1); uart1_write_byte(0x24); func_659c(10); @@ -867,10 +855,7 @@ double func_52720(int a) char b[4]; } sp8; - uart1_write_byte(0x55); - uart1_write_byte(0xaa); - uart1_write_byte(0x01); - uart1_write_byte(0x03); + UART1_WRITE_HEADER(3); switch (a) { @@ -1278,26 +1263,26 @@ void HandleLongListScroll(int upDown, int b) { case 11: //0x5a5d0 - if (bData_40003173 > 1) + if (g_bAlignmentFourLineMenuFocusItem > 1) { //5a5e4 - bData_40003173--; + g_bAlignmentFourLineMenuFocusItem--; } else { //0x5a5fc - bData_40003171--; + g_bAlignmentFourLineMenuTopItem--; } //0x5a610 - if (bData_40003172 > 1) + if (g_bAlignmentEightLineMenuFocusItem > 1) { //5a620 - bData_40003172--; + g_bAlignmentEightLineMenuFocusItem--; } else { //0x5a638 - bData_40003170--; + g_bAlignmentEightLineMenuTopItem--; } //0x5a64c -> 0x5a860 break; @@ -1402,22 +1387,22 @@ void HandleLongListScroll(int upDown, int b) { case 11: //0x5a8a8: Alignment items - if (bData_40003173 < 4) + if (g_bAlignmentFourLineMenuFocusItem < 4) { - bData_40003173++; + g_bAlignmentFourLineMenuFocusItem++; } else { - bData_40003171++; + g_bAlignmentFourLineMenuTopItem++; } - if (bData_40003172 < 8) + if (g_bAlignmentEightLineMenuFocusItem < 8) { - bData_40003172++; + g_bAlignmentEightLineMenuFocusItem++; } else { - bData_40003170++; + g_bAlignmentEightLineMenuTopItem++; } break; @@ -1535,10 +1520,7 @@ void SlewStop(void) //0x5f0e4 if (g_bCombinedSlewActive == 1) { - uart1_write_byte(0x55); - uart1_write_byte(0xaa); - uart1_write_byte(1); - uart1_write_byte(1); + UART1_WRITE_HEADER(1); uart1_write_byte(0); bTrackingMode = MENU_TRACKING_MODE_STOP; //0; @@ -1548,10 +1530,7 @@ void SlewStop(void) { if (bData_40002c1a == 2) { - uart1_write_byte(0x55); - uart1_write_byte(0xaa); - uart1_write_byte(1); - uart1_write_byte(1); + UART1_WRITE_HEADER(1); uart1_write_byte(0); bTrackingMode = MENU_TRACKING_MODE_STOP; //0; @@ -1561,10 +1540,7 @@ void SlewStop(void) //0x5f180 if (g_eSlewRateIndex != SLEW_RATE_MAX) //9) { - uart1_write_byte(0x55); - uart1_write_byte(0xaa); - uart1_write_byte(1); - uart1_write_byte(1); + UART1_WRITE_HEADER(1); uart1_write_byte(0); bTrackingMode = MENU_TRACKING_MODE_STOP; //0; @@ -3051,10 +3027,7 @@ double func_6ab74(int a) bData_40002c13_uart1ReceiveComplete = 0; - uart1_write_byte(0x55); - uart1_write_byte(0xaa); - uart1_write_byte(0x01); - uart1_write_byte(0x01); + UART1_WRITE_HEADER(1); switch (a) { @@ -3135,10 +3108,7 @@ double InquireMotorData(int a) bData_40002c13_uart1ReceiveComplete = 0; - uart1_write_byte(0x55); - uart1_write_byte(0xaa); - uart1_write_byte(0x01); - uart1_write_byte(1); + UART1_WRITE_HEADER(1); switch (a) { @@ -3271,11 +3241,8 @@ void ReceiveMountAutoguideValues(void) iMountAutoguideRa = 0; iMountAutoguideDec = 0; bData_40002c13_uart1ReceiveComplete = 0; - - uart1_write_byte(0x55); - uart1_write_byte(0xaa); - uart1_write_byte(0x01); - uart1_write_byte(0x01); + + UART1_WRITE_HEADER(1); uart1_write_byte(0x81); bData_40002c13_uart1ReceiveComplete = 0; @@ -3380,41 +3347,41 @@ void func_6b3a4(void) } /* 6b3a8 - todo */ -int func_6b3a8(double a, double b, double c, double d) +int CheckObjectVisibility(double dRA, double dDec, double dLatitude, double dLST) { float r6; float r7; float r4; float r5; - if ((d >= 4) || (d <= 20)) + if ((dLST >= 4) || (dLST <= 20)) { //0x6b3e0 - r6 = d - 4; - r7 = d + 4; + r6 = dLST - 4; + r7 = dLST + 4; } else { //0x6b42c - if (d < 4) + if (dLST < 4) { //6b444 - r6 = d + 24 - 4; - r7 = d + 4; + r6 = dLST + 24 - 4; + r7 = dLST + 4; } else { //0x6b4a4 - r6 = d - 4; - r7 = d - 24 + 4; + r6 = dLST - 4; + r7 = dLST - 24 + 4; } } //0x6b500 - if (c >= 0) + if (dLatitude >= 0) { //6b518 - r4 = c - 60; - r5 = c + 60; + r4 = dLatitude - 60; + r5 = dLatitude + 60; if (r5 > 90) { @@ -3424,8 +3391,8 @@ int func_6b3a8(double a, double b, double c, double d) else { //0x6b578 - r4 = c - 60; - r5 = c + 60; + r4 = dLatitude - 60; + r5 = dLatitude + 60; if (r4 < -90) { @@ -3433,12 +3400,12 @@ int func_6b3a8(double a, double b, double c, double d) } } //0x6b5d4 - if ((d >= 4) || (d <= 20)) + if ((dLST >= 4) || (dLST <= 20)) { //0x6b604 - if ((a >= r6) && (a <= r7)) + if ((dRA >= r6) && (dRA <= r7)) { - if ((b >= r4) && (b <= r5)) + if ((dDec >= r4) && (dDec <= r5)) { return 1; } @@ -3448,12 +3415,12 @@ int func_6b3a8(double a, double b, double c, double d) else { //0x6b68c - if ((d <= 4) || (d >= 20)) + if ((dLST <= 4) || (dLST >= 20)) { //0x6b6bc - if (((a >= r6) && (a <= 24)) || ((a >= 0) && (a <= r7))) + if (((dRA >= r6) && (dRA <= 24)) || ((dRA >= 0) && (dRA <= r7))) { - if ((b >= r4) && (b <= r5)) + if ((dDec >= r4) && (dDec <= r5)) { return 1; } @@ -3471,12 +3438,12 @@ int func_6b3a8(double a, double b, double c, double d) /* 6b778 - todo */ void func_6b778(void) { - double sp456; - float sp452; - float sp448; + double dLST; //sp456; + float fRA; //sp452; + float fDec; //sp448; unsigned char strStarNames[10][10]; //sp348 unsigned char sp128[10][22]; - unsigned char sp36[9][10] = + unsigned char strSolarObjNames[9][10] = //sp36 { "Moon ", "Mercury ", @@ -3492,147 +3459,147 @@ void func_6b778(void) unsigned char r4 = 0; unsigned char r5; - sp456 = get_local_sidereal_time(1, 0, Data_40004128.geographicLongitude); + dLST = get_local_sidereal_time(1, 0, Data_40004128.geographicLongitude); - bData_40003161 = GetCurrentAlignStars(sp456, + bData_40003161 = GetCurrentAlignStars(dLST, Data_40004128.geographicLatitude, Data_40004a68_CurrentAlignStarEquatorialCoord, strStarNames, sp128); - get_solar_system_object_data(8, &sp452, &sp448); + get_solar_system_object_data(MENU_SOLAR_SYSTEM_SUN/*8*/, &fRA, &fDec); - if (1 == func_6b3a8(sp452, sp448, Data_40004128.geographicLatitude, sp456)) + if (1 == CheckObjectVisibility(fRA, fDec, Data_40004128.geographicLatitude, dLST)) { r4++; - Data_400037f8[2*(r4 - 1)] = sp452; - Data_400037f8[2*(r4 - 1) + 1] = sp448; + Data_400037f8[2*(r4 - 1)] = fRA; + Data_400037f8[2*(r4 - 1) + 1] = fDec; for (r5 = 0; r5 < 10; r5++) { //0x6b894 - Data_400038e8[r4 - 1][r5] = sp36[0][r5]; + Data_400038e8[r4 - 1][r5] = strSolarObjNames[0][r5]; } } //0x6b8c0 - get_solar_system_object_data(0, &sp452, &sp448); + get_solar_system_object_data(MENU_SOLAR_SYSTEM_MERCURY/*0*/, &fRA, &fDec); - if (1 == func_6b3a8(sp452, sp448, Data_40004128.geographicLatitude, sp456)) + if (1 == CheckObjectVisibility(fRA, fDec, Data_40004128.geographicLatitude, dLST)) { r4++; - Data_400037f8[2*(r4 - 1)] = sp452; - Data_400037f8[2*(r4 - 1) + 1] = sp448; + Data_400037f8[2*(r4 - 1)] = fRA; + Data_400037f8[2*(r4 - 1) + 1] = fDec; for (r5 = 0; r5 < 10; r5++) { //0x6b95c - Data_400038e8[r4 - 1][r5] = sp36[1][r5]; + Data_400038e8[r4 - 1][r5] = strSolarObjNames[1][r5]; } } //6b988 - get_solar_system_object_data(1, &sp452, &sp448); + get_solar_system_object_data(MENU_SOLAR_SYSTEM_VENUS/*1*/, &fRA, &fDec); - if (1 == func_6b3a8(sp452, sp448, Data_40004128.geographicLatitude, sp456)) + if (1 == CheckObjectVisibility(fRA, fDec, Data_40004128.geographicLatitude, dLST)) { r4++; - Data_400037f8[2*(r4 - 1)] = sp452; - Data_400037f8[2*(r4 - 1) + 1] = sp448; + Data_400037f8[2*(r4 - 1)] = fRA; + Data_400037f8[2*(r4 - 1) + 1] = fDec; for (r5 = 0; r5 < 10; r5++) { - Data_400038e8[r4 - 1][r5] = sp36[2][r5]; + Data_400038e8[r4 - 1][r5] = strSolarObjNames[2][r5]; } } //6ba50 - get_solar_system_object_data(2, &sp452, &sp448); + get_solar_system_object_data(MENU_SOLAR_SYSTEM_MARS/*2*/, &fRA, &fDec); - if (1 == func_6b3a8(sp452, sp448, Data_40004128.geographicLatitude, sp456)) + if (1 == CheckObjectVisibility(fRA, fDec, Data_40004128.geographicLatitude, dLST)) { r4++; - Data_400037f8[2*(r4 - 1)] = sp452; - Data_400037f8[2*(r4 - 1) + 1] = sp448; + Data_400037f8[2*(r4 - 1)] = fRA; + Data_400037f8[2*(r4 - 1) + 1] = fDec; for (r5 = 0; r5 < 10; r5++) { - Data_400038e8[r4 - 1][r5] = sp36[3][r5]; + Data_400038e8[r4 - 1][r5] = strSolarObjNames[3][r5]; } } //6bb18 - get_solar_system_object_data(3, &sp452, &sp448); + get_solar_system_object_data(MENU_SOLAR_SYSTEM_JUPITER/*3*/, &fRA, &fDec); - if (1 == func_6b3a8(sp452, sp448, Data_40004128.geographicLatitude, sp456)) + if (1 == CheckObjectVisibility(fRA, fDec, Data_40004128.geographicLatitude, dLST)) { r4++; - Data_400037f8[2*(r4 - 1)] = sp452; - Data_400037f8[2*(r4 - 1) + 1] = sp448; + Data_400037f8[2*(r4 - 1)] = fRA; + Data_400037f8[2*(r4 - 1) + 1] = fDec; for (r5 = 0; r5 < 10; r5++) { - Data_400038e8[r4 - 1][r5] = sp36[4][r5]; + Data_400038e8[r4 - 1][r5] = strSolarObjNames[4][r5]; } } //6bbe0 - get_solar_system_object_data(4, &sp452, &sp448); + get_solar_system_object_data(MENU_SOLAR_SYSTEM_SATURN/*4*/, &fRA, &fDec); - if (1 == func_6b3a8(sp452, sp448, Data_40004128.geographicLatitude, sp456)) + if (1 == CheckObjectVisibility(fRA, fDec, Data_40004128.geographicLatitude, dLST)) { r4++; - Data_400037f8[2*(r4 - 1)] = sp452; - Data_400037f8[2*(r4 - 1) + 1] = sp448; + Data_400037f8[2*(r4 - 1)] = fRA; + Data_400037f8[2*(r4 - 1) + 1] = fDec; for (r5 = 0; r5 < 10; r5++) { - Data_400038e8[r4 - 1][r5] = sp36[5][r5]; + Data_400038e8[r4 - 1][r5] = strSolarObjNames[5][r5]; } } //6bca8 - get_solar_system_object_data(5, &sp452, &sp448); + get_solar_system_object_data(MENU_SOLAR_SYSTEM_URANUS/*5*/, &fRA, &fDec); - if (1 == func_6b3a8(sp452, sp448, Data_40004128.geographicLatitude, sp456)) + if (1 == CheckObjectVisibility(fRA, fDec, Data_40004128.geographicLatitude, dLST)) { r4++; - Data_400037f8[2*(r4 - 1)] = sp452; - Data_400037f8[2*(r4 - 1) + 1] = sp448; + Data_400037f8[2*(r4 - 1)] = fRA; + Data_400037f8[2*(r4 - 1) + 1] = fDec; for (r5 = 0; r5 < 10; r5++) { - Data_400038e8[r4 - 1][r5] = sp36[6][r5]; + Data_400038e8[r4 - 1][r5] = strSolarObjNames[6][r5]; } } //6bd70 - get_solar_system_object_data(6, &sp452, &sp448); + get_solar_system_object_data(MENU_SOLAR_SYSTEM_NEPTUNE/*6*/, &fRA, &fDec); - if (1 == func_6b3a8(sp452, sp448, Data_40004128.geographicLatitude, sp456)) + if (1 == CheckObjectVisibility(fRA, fDec, Data_40004128.geographicLatitude, dLST)) { r4++; - Data_400037f8[2*(r4 - 1)] = sp452; - Data_400037f8[2*(r4 - 1) + 1] = sp448; + Data_400037f8[2*(r4 - 1)] = fRA; + Data_400037f8[2*(r4 - 1) + 1] = fDec; for (r5 = 0; r5 < 10; r5++) { - Data_400038e8[r4 - 1][r5] = sp36[7][r5]; + Data_400038e8[r4 - 1][r5] = strSolarObjNames[7][r5]; } } //6be38 - get_solar_system_object_data(7, &sp452, &sp448); + get_solar_system_object_data(MENU_SOLAR_SYSTEM_PLUTO/*7*/, &fRA, &fDec); - if (1 == func_6b3a8(sp452, sp448, Data_40004128.geographicLatitude, sp456)) + if (1 == CheckObjectVisibility(fRA, fDec, Data_40004128.geographicLatitude, dLST)) { r4++; - Data_400037f8[2*(r4 - 1)] = sp452; - Data_400037f8[2*(r4 - 1) + 1] = sp448; + Data_400037f8[2*(r4 - 1)] = fRA; + Data_400037f8[2*(r4 - 1) + 1] = fDec; for (r5 = 0; r5 < 10; r5++) { - Data_400038e8[r4 - 1][r5] = sp36[8][r5]; + Data_400038e8[r4 - 1][r5] = strSolarObjNames[8][r5]; } } //6bf00 @@ -3856,7 +3823,7 @@ void func_6c5e8(void) { case 1: //6c7cc - func_3230(Data_4000327f, &fData_40003288, &fData_4000328c); + func_3230(Data_4000327f, &fData_40003288, &fData_4000328c); //Not implemented Data_40002c64_MenuContextId = 21102; break; @@ -3897,28 +3864,16 @@ int main(void) ShowStartupScreen(); - uart1_write_byte(0x55); - uart1_write_byte(0xaa); - uart1_write_byte(1); - uart1_write_byte(1); + UART1_WRITE_HEADER(1); uart1_write_byte(0x44); - uart1_write_byte(0x55); - uart1_write_byte(0xaa); - uart1_write_byte(1); - uart1_write_byte(1); + UART1_WRITE_HEADER(1); uart1_write_byte(0x64); - uart1_write_byte(0x55); - uart1_write_byte(0xaa); - uart1_write_byte(1); - uart1_write_byte(1); + UART1_WRITE_HEADER(1); uart1_write_byte(0x04); - uart1_write_byte(0x55); - uart1_write_byte(0xaa); - uart1_write_byte(1); - uart1_write_byte(1); + UART1_WRITE_HEADER(1); uart1_write_byte(0x24); func_659c(10); @@ -4049,8 +4004,8 @@ int main(void) Data_40002c64_MenuContextId = MENU_CONTEXT_MAIN; //0; } //6d880 - Data_40002c1c = 0; - Data_40002c20 = 0; + g_iUart0GuideValueRa = 0; + g_iUart0GuideValueDec = 0; //6d894 -> 729ec //########################################################################## @@ -4218,18 +4173,10 @@ int main(void) } //0x6dfc4 dData_40002d78 /= 15.0; - #if 0 - sp64 = dData_400031f0 / 15.0; - sp56 = dData_40003420 / 15.0; - sp48 = dData_40002d78 - sp56; - sp40 = sp48 - sp64; - sp32 = fData_400034c8; - sp24 = sp32 - sp40; - fData_40003508 = sp24; - #else + fData_40003508 = fData_400034c8 - ((dData_40002d78 - dData_40003420 / 15.0) - dData_400031f0 / 15.0); - #endif + if (fData_40003508 < 0) { //6e08c @@ -4242,46 +4189,15 @@ int main(void) fData_40003508 -= 24; } //0x6e0d0 - #if 0 - sp64 = dData_40003420 / 15.0; - sp56 = dData_40002d78 - sp64; - sp48 = sp56 + dData_400033e8; - Data_40002d68_OTARightAscensionHours = sp48; - #else Data_40002d68_OTARightAscensionHours = dData_40002d78 - dData_40003420 / 15.0 + dData_400033e8; - #endif - - #if 0 - sp64 = Data_40002d68_OTARightAscensionHours; - sp56 = dData_40003420 / 15.0; - sp48 = dData_40002d78 - sp56; - sp40 = sp48 + dData_400033e8; - sp32 = sp40 - sp64; - sp24 = sp32 * 60.0; - 40002d6c = sp24; - #else Data_40002d6c_OTARightAscensionMinutes = 60 * (dData_40002d78 - dData_40003420 / 15.0 + dData_400033e8 - Data_40002d68_OTARightAscensionHours); - #endif - - #if 0 - sp64 = Data_40002d6c_OTARightAscensionMinutes; - sp56 = sp64 / 60.0; - sp48 = Data_40002d68_OTARightAscensionHours; - sp40 = dData_40003420 / 15.0; - sp32 = dData_40002d78 - sp40; - sp24 = sp32 + dData_400033e8; - sp16 = sp24 - sp48; - sp8 = sp16 - sp56; - sp = sp8 * 3600.0; - #else fData_40002d70_OTARightAscensionSeconds = 3600.0 * ((dData_40002d78 - dData_40003420 / 15.0 + dData_400033e8 - Data_40002d68_OTARightAscensionHours) - Data_40002d6c_OTARightAscensionMinutes / 60.0); - #endif if ((bData_40003200 == 1) && (Data_40004128.dData_304 == 2.0)) { @@ -4292,58 +4208,19 @@ int main(void) fData_40002d70_OTARightAscensionSeconds = fData_40002ce0_ObjectRightAscensionSeconds; } //0x6e30c - #if 0 - sp64 = dData_40002d98 - dData_40003428; - sp56 = sp64 - dData_400031f8; - fData_4000350c = sp56; - #else fData_4000350c = dData_40002d98 - dData_40003428 - dData_400031f8; - #endif - #if 0 - sp64 = dData_40002d98 - dData_40003428; - sp56 = sp64 + dData_400033f0; - Data_40002d8c_OTADeclinationDegrees = sp56; - #else Data_40002d8c_OTADeclinationDegrees = dData_40002d98 - dData_40003428 + dData_400033f0; - #endif - - #if 0 - sp64 = Data_40002d8c_OTADeclinationDegrees; - sp56 = dData_40002d98 - dData_40003428; - sp48 = sp56 + dData_400033f0; - sp40 = sp48 - sp64; - sp32 = sp40 * 60.0; - Data_40002d90_OTADeclinationMinutes = sp32; - #else Data_40002d90_OTADeclinationMinutes = 60.0 * (dData_40002d98 - dData_40003428 + dData_400033f0 - Data_40002d8c_OTADeclinationDegrees); - #endif - - #if 0 - sp64 = Data_40002d90_OTADeclinationMinutes; - sp56 = sp64 / 60.0; - sp48 = Data_40002d8c_OTADeclinationDegrees; - sp40 = dData_40002d98 - dData_40003428; - sp32 = sp40 + dData_400033f0; - sp24 = sp32 - sp48; - sp16 = sp24 - sp56; - sp8 = sp16 * 3600.0; - #else fData_40002d94_OTADeclinationSeconds = 3600.0 * (dData_40002d98 - dData_40003428 + dData_400033f0 - Data_40002d8c_OTADeclinationDegrees - Data_40002d90_OTADeclinationMinutes / 60.0); - #endif if ((bData_40003201 == 1) && (Data_40004128.dData_312 == 2.0)) { //6e4f8 - #if 0 - sp64 = fData_40002d18_ObjectDeclination; - dData_400033f0 = sp64 - dData_40002d98; - #else dData_400033f0 = fData_40002d18_ObjectDeclination - dData_40002d98; - #endif Data_40002d8c_OTADeclinationDegrees = Data_40002d00_ObjectDeclinationDegrees; Data_40002d90_OTADeclinationMinutes = Data_40002d04_ObjectDeclinationMinutes; @@ -4644,10 +4521,7 @@ int main(void) if (g_bCombinedSlewActive != 1) { //6fa58 - uart1_write_byte(0x55); - uart1_write_byte(0xaa); - uart1_write_byte(0x01); - uart1_write_byte(1 + 2 + 3); + UART1_WRITE_HEADER(1 + 2 + 3); if (bData_400031ba == 0x01) { @@ -4672,35 +4546,36 @@ int main(void) else { //0x6fae8 - uart1_write_byte(0x55); - uart1_write_byte(0xaa); - uart1_write_byte(0x01); - uart1_write_byte(1); + UART1_WRITE_HEADER(1); uart1_write_byte(0x00); bTrackingMode = MENU_TRACKING_MODE_STOP; //0; g_bMaxSlewRampActive = 0; } } //if ((g_bMaxSlewRampActive != 0) && (g_stCurrentSlewRampValue.Data <= 4800)) - //6fb24 + + //6fb24: Handle Autoguide values from Ascom/Mount ST4 port during object tracking + if (bTrackingMode == MENU_TRACKING_MODE_TRACKING/*2*/) { //6fb34 ReceiveMountAutoguideValues(); - Data_40003488 = Data_40002c1c; - Data_4000348c = Data_40002c20; + g_iAscomGuideValueRa = g_iUart0GuideValueRa; + g_iAscomGuideValueDec = g_iUart0GuideValueDec; - Data_40004128.dAutoguideRa += (2 * Data_40003488 + iMountAutoguideRa) * + Data_40004128.dAutoguideRa += (2 * g_iAscomGuideValueRa + iMountAutoguideRa) * dGuidingSpeed * 0.00153; - Data_40004128.dAutoguideDec += (4 * Data_4000348c + iMountAutoguideDec) * + Data_40004128.dAutoguideDec += (4 * g_iAscomGuideValueDec + iMountAutoguideDec) * dGuidingSpeed * 0.00153; - Data_40002c1c = 0; - Data_40002c20 = 0; + g_iUart0GuideValueRa = 0; + g_iUart0GuideValueDec = 0; } - //6fd3c + + //6fd3c: Handle Meridian Flip + if ((bData_40003211 == 0) && (bTrackingMode == MENU_TRACKING_MODE_TRACKING/*2*/) && (g_dObjectRightAcension < 23.99999)) diff --git a/applications/v2.3/menu.h b/applications/v2.3/menu.h index 2f7aced..904c64b 100644 --- a/applications/v2.3/menu.h +++ b/applications/v2.3/menu.h @@ -192,3 +192,20 @@ typedef enum MENU_LANGUAGE_SPANISH = 5, } MENU_LANGUAGE_TYPE; + +typedef enum +{ + MENU_SOLAR_SYSTEM_MERCURY = 0, + MENU_SOLAR_SYSTEM_VENUS = 1, + MENU_SOLAR_SYSTEM_MARS = 2, + MENU_SOLAR_SYSTEM_JUPITER = 3, + MENU_SOLAR_SYSTEM_SATURN = 4, + MENU_SOLAR_SYSTEM_URANUS = 5, + MENU_SOLAR_SYSTEM_NEPTUNE = 6, + MENU_SOLAR_SYSTEM_PLUTO = 7, + MENU_SOLAR_SYSTEM_SUN = 8, + MENU_SOLAR_SYSTEM_MOON = 9, + +} MENU_SOLAR_SYSTEM_OBJECT; + + diff --git a/applications/v2.3/slew2.c b/applications/v2.3/slew2.c index ce64fca..7502639 100644 --- a/applications/v2.3/slew2.c +++ b/applications/v2.3/slew2.c @@ -421,10 +421,7 @@ void SlewBothAxes(int a, int b, int speed1, int d, int e, int speed2) if (g_bSingleSlewActive == 0) { - uart1_write_byte(0x55); - uart1_write_byte(0xaa); - uart1_write_byte(0x01); - uart1_write_byte(0x01); + UART1_WRITE_HEADER(1); uart1_write_byte(0xff); } } diff --git a/applications/v2.3/uart.c b/applications/v2.3/uart.c index 740924b..053df00 100644 --- a/applications/v2.3/uart.c +++ b/applications/v2.3/uart.c @@ -179,23 +179,23 @@ void uart0_isr(void) __irq switch (uart0ReceiveDataBuffer[0]) { - case 1: - Data_40002c1c = -1; + case 1: //Move east + g_iUart0GuideValueRa = -1; uart0ReceiveFlag = 0; break; - case 2: - Data_40002c1c = 1; + case 2: //Move west + g_iUart0GuideValueRa = 1; uart0ReceiveFlag = 0; break; - case 4: - Data_40002c20 = -1; + case 4: //Move north + g_iUart0GuideValueDec = -1; uart0ReceiveFlag = 0; break; - case 8: - Data_40002c20 = 1; + case 8: //Move south + g_iUart0GuideValueDec = 1; uart0ReceiveFlag = 0; break;