Subversion Repositories Projects

Compare Revisions

Ignore whitespace Rev 302 → Rev 303

/FollowMe/main.c
17,6 → 17,10
 
#ifdef USE_FOLLOWME
int16_t UBat = 120;
int16_t Zellenzahl = 0;
int16_t PowerOn = 0;
int16_t i = 0;
int16_t delay = 0;
#endif
 
#define GPS_RX_TIMEOUT 0x0001
67,7 → 71,7
 
 
#ifdef USE_FOLLOWME
BeepTime = 2000;
//BeepTime = 2000;
#endif
 
LCD_Clear();
78,7 → 82,7
// check for button action
if(GetButton())
{
//BeepTime = 200;
BeepTime = 200;
Fat16_Init();
 
}
103,6 → 107,28
// UAdc4 = R3/(R3+R2)*UBat= 3.9/(3.9+10)*UBat = UBat/3.564
UBat = (3 * UBat + (64 * Adc4) / 368) / 4;
DebugOut.Analog[8] = UBat;
// check for zellenzahl
if(PowerOn < 100)
{
if(UBat<=84) Zellenzahl = 2;
else Zellenzahl = 3;
PowerOn++;
}
DebugOut.Analog[16] = Zellenzahl;
DebugOut.Analog[17] = PowerOn;
//show recognised Zellenzahl to user
if(i < Zellenzahl && PowerOn >= 100 && BeepTime == 0 && delay > 1000)
{
BeepTime = 100;
i++;
delay = 0;
}
if(delay < 1500) delay++;
// monitor battery undervoltage
if(UBat < Zellenzahl * 31 && PowerOn >= 100) BeepTime = 200;
#endif
ADReady = 0;
ADC_Enable(); // restart ad conversion sequence
/FollowMe/uart0.c
67,15 → 67,15
"Analog Ch6 ",
"Analog Ch7 ",
"UBat ",
"Debug9 ",
"Debug10 ", //10
"Debug11 ",
"Debug12 ",
"Debug13 ",
"Debug14 ",
"Debug15 ", //15
"Debug16 ",
"Debug17 ",
"Speed_North ",
"Speed_East ", //10
"Speed_Top ",
"NumOfSats ",
"Pos.Longitude ",
"Pos.Latitude ",
"Pos.Altitude ", //15
"Zellenzahl ",
"PowerOn ",
"Debug18 ",
"Debug19 ",
"Debug20 ", //20
/FollowMe/ubx.c
1,6 → 1,7
#include <inttypes.h>
#include "ubx.h"
#include "timer0.h"
#include "uart0.h"
 
 
// ------------------------------------------------------------------------------------------------
402,4 → 403,11
break;
 
}
DebugOut.Analog[9] = GPSData.Speed_North;
DebugOut.Analog[10] = GPSData.Speed_East;
DebugOut.Analog[11] = GPSData.Speed_Top;
DebugOut.Analog[12] = GPSData.NumOfSats;
DebugOut.Analog[13] = GPSData.Position.Longitude;
DebugOut.Analog[14] = GPSData.Position.Latitude;
DebugOut.Analog[15] = GPSData.Position.Altitude;
}