Skip to content

Commit

Permalink
更改
Browse files Browse the repository at this point in the history
  • Loading branch information
losehu committed Feb 6, 2025
1 parent cde16d3 commit bf67e04
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ ENABLE_4732SSB =0
ENABLE_DOPPLER =1
ENABLE_TLE = 1
#############################################################
PACKED_FILE_SUFFIX = LOSEHU132K
PACKED_FILE_SUFFIX = LOSEHU01D
ifeq ($(ENABLE_PINYIN),1)
ENABLE_CHINESE_FULL=4
endif
Expand Down
2 changes: 1 addition & 1 deletion settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ void SETTINGS_LoadCalibration(void)

//EEPROM_ReadBuffer(0x1F80 + gEeprom.MIC_SENSITIVITY, &Mic, 1);
//gEeprom.MIC_SENSITIVITY_TUNING = (Mic < 32) ? Mic : 15;
gEeprom.MIC_SENSITIVITY_TUNING = gMicGain_dB2[gEeprom.MIC_SENSITIVITY];
gEeprom.MIC_SENSITIVITY_TUNING = 31;//gMicGain_dB2[gEeprom.MIC_SENSITIVITY];

{
struct
Expand Down
20 changes: 9 additions & 11 deletions tle/tle.c
Original file line number Diff line number Diff line change
Expand Up @@ -642,10 +642,8 @@ void Read_TLE(uint8_t num,sat_parm *now_sat)
{
uint32_t base_add =0x1E200+num*160;
char c[160];
int www=32;
for(int i=0; i<160; i+=www) {
EEPROM_ReadBuffer(base_add+i,c+i,www) ;
}
EEPROM_ReadBuffer(base_add,c,160) ;


memcpy(now_sat->name,c,9);//卫星名字9B不包含结束0
memcpy( now_sat->line1,c+9,69);//卫星TLE第一行 69B不包含结束0
Expand Down Expand Up @@ -911,17 +909,17 @@ int countIntegerDigits(int num) {
void Write_LOCAL()
{

if(observer.lat>=-90&&observer.lat<=90) EEPROM_WriteBuffer(0x2c00, (uint8_t *)&observer.lat,8);
if(observer.lon>=-180&&observer.lon<=180) EEPROM_WriteBuffer(0x2c00+8,(uint8_t *)&observer.lon,8);
if(observer.height>=-999999&& observer.height<=999999) EEPROM_WriteBuffer(0x2c00+16,(uint8_t *)&observer.height,8);
if(observer.lat>=-90&&observer.lat<=90) EEPROM_WriteBuffer(0x2BB0, (uint8_t *)&observer.lat,8);
if(observer.lon>=-180&&observer.lon<=180) EEPROM_WriteBuffer(0x2BB0+8,(uint8_t *)&observer.lon,8);
if(observer.height>=-999999&& observer.height<=999999) EEPROM_WriteBuffer(0x2BB0+16,(uint8_t *)&observer.height,8);
}
void Read_LOCAL()
{
uint8_t byte_array[24];
EEPROM_ReadBuffer(0x2BB0, (uint8_t *)&observer,24);

EEPROM_ReadBuffer(0x2c00, (uint8_t *)&observer.lat,8);
EEPROM_ReadBuffer(0x2c00+8,(uint8_t *)&observer.lon,8);
EEPROM_ReadBuffer(0x2c00+16,(uint8_t *)&observer.height,8);
// EEPROM_ReadBuffer(0x2BB0, (uint8_t *)&observer.lat,8);
// EEPROM_ReadBuffer(0x2BB0+8,(uint8_t *)&observer.lon,8);
// EEPROM_ReadBuffer(0x2BB0+16,(uint8_t *)&observer.height,8);

if(!(observer.lat>=-90&&observer.lat<=90)) observer.lat=85;
if(!(observer.lon>=-180&&observer.lon<=180))observer.lon=130;
Expand Down

0 comments on commit bf67e04

Please sign in to comment.