From c396279a37b6fa8cc386cccf4eb012fb79011bc0 Mon Sep 17 00:00:00 2001 From: andrew Date: Tue, 28 Dec 2010 05:46:14 +0000 Subject: [PATCH] Preparing Battery module for Power Sensor version 2 git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@2304 ebee16cc-31ac-478f-84a7-5cbb03baadba --- flight/OpenPilot/Modules/Battery/battery.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/flight/OpenPilot/Modules/Battery/battery.c b/flight/OpenPilot/Modules/Battery/battery.c index 468293e36..b18bb64f0 100644 --- a/flight/OpenPilot/Modules/Battery/battery.c +++ b/flight/OpenPilot/Modules/Battery/battery.c @@ -56,6 +56,9 @@ #define STACK_SIZE 1024 #define TASK_PRIORITY (tskIDLE_PRIORITY + 3) #define SAMPLE_PERIOD_MS 500 +#define POWER_SENSOR_VERSION 1 + + //#define ENABLE_DEBUG_MSG #ifdef ENABLE_DEBUG_MSG @@ -100,6 +103,7 @@ static void task(void *parameters) lastSysTime = xTaskGetTickCount(); while (1) { +#if (POWER_SENSOR_VERSION == 1) // TODO: Compare with floating point calculations uint32_t mV, mA; @@ -117,6 +121,10 @@ static void task(void *parameters) FlightBatteryStateSet(&flightBatteryData); vTaskDelayUntil(&lastSysTime, SAMPLE_PERIOD_MS / portTICK_RATE_MS); +#endif +#if (POWER_SENSOR_VERSION == 2) + +#endif } }