Subversion Repositories FlightCtrl

Compare Revisions

Ignore whitespace Rev 1500 → Rev 1501

/trunk/capacity.c
56,6 → 56,7
#include "timer0.h"
 
#define CAPACITY_UPDATE_INTERVAL 10 // 10 ms
#define OFFSET_CURRENT 4 // always calculate with a Current of 0,4A
 
// global varialbles
unsigned short update_timer = 0;
103,6 → 104,7
// update used capacity
SubCounter += Capacity.ActualCurrent;
 
/*
// 100mA * 1ms * CAPACITY_UPDATE_INTERVAL = 1 mA * 100 ms * CAPACITY_UPDATE_INTERVAL
// = 1mA * 0.1s * CAPACITY_UPDATE_INTERVAL = 1mA * 1min / (600 / CAPACITY_UPDATE_INTERVAL)
// = 1mAh / (36000 / CAPACITY_UPDATE_INTERVAL)
112,6 → 114,7
Capacity.UsedCapacity++; // we have one mAh more
SubCounter -= SUB_COUNTER_LIMIT; // keep the remaining sub part
}
*/
}
else // motors are stopped
{ // determine offsets of motor currents
121,6 → 124,16
SumCurrentOffset -= CurrentOffset;
SumCurrentOffset += Current;
}
SubCounter += OFFSET_CURRENT;
// 100mA * 1ms * CAPACITY_UPDATE_INTERVAL = 1 mA * 100 ms * CAPACITY_UPDATE_INTERVAL
// = 1mA * 0.1s * CAPACITY_UPDATE_INTERVAL = 1mA * 1min / (600 / CAPACITY_UPDATE_INTERVAL)
// = 1mAh / (36000 / CAPACITY_UPDATE_INTERVAL)
#define SUB_COUNTER_LIMIT (36000 / CAPACITY_UPDATE_INTERVAL)
if(SubCounter > SUB_COUNTER_LIMIT)
{
Capacity.UsedCapacity++; // we have one mAh more
SubCounter -= SUB_COUNTER_LIMIT; // keep the remaining sub part
}
} // EOF check delay update timer
}
 
/trunk/libfc.a
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/trunk/main.c
241,7 → 241,6
motorread = 0; UpdateMotor = 0; SendMotorData(); while(!UpdateMotor); motorread = 0; // read the first I2C-Data
timer = SetDelay(2000);
 
 
for(i=0; i < MAX_MOTORS; i++)
{
UpdateMotor = 0;
/trunk/menu.c
10,7 → 10,7
char DisplayBuff[80] = "Hallo Welt";
unsigned char DispPtr = 0;
 
unsigned char MaxMenue = 16;
unsigned char MaxMenue = 17;
unsigned char MenuePunkt = 0;
unsigned char RemoteKeys = 0;
 
33,9 → 33,6
 
void Menu(void)
{
 
if(MenuePunkt > MaxMenue) MenuePunkt = MaxMenue;
 
if(RemoteKeys & KEY1) { if(MenuePunkt) MenuePunkt--; else MenuePunkt = MaxMenue;}
if(RemoteKeys & KEY2) { if(MenuePunkt == MaxMenue) MenuePunkt = 0; else MenuePunkt++;}
if((RemoteKeys & KEY1) && (RemoteKeys & KEY2)) MenuePunkt = 0;
186,9 → 183,7
eeprom_write_byte(&EEPromArray[EEPROM_ADR_MINUTES2+1],FlugMinuten % 256);
}
break;
 
default: MaxMenue = MenuePunkt - 1;
MenuePunkt = 0;
default: MenuePunkt = 0;
break;
}
RemoteKeys = 0;
/trunk/uart.c
62,7 → 62,7
"AccZ ",
"Gas ",
"Compass Value ",
"Voltage ",
"Voltage [0,1V] ",
"Empfang ", //10
"Gyro Kompass ",
"Motor Front ",
75,8 → 75,8
"MK3Mag CalState ",
"Servo ", //20
"Hoovergas ",
"Current ",
"Capacity ",
"Strom [0,1A] ",
"Capacity [mAh] ",
" ",
" ", //25
" ",
/trunk/version.txt
354,7 → 354,9
0.77c H.Buss 07.01.2010
- zwei weitere Spektrum-Varianten implementiert
 
0.77d H.Buss 25.01.2010
- Strom-Messung eingebaut