From 7c591fa2d711b91eaa74b88a2c5ab0eb11a25dc0 Mon Sep 17 00:00:00 2001 From: vassilis Date: Sat, 13 Feb 2010 20:36:14 +0000 Subject: [PATCH] Delete moved files (moved to OpenPilot/System) git-svn-id: svn://svn.openpilot.org/OpenPilot/trunk@192 ebee16cc-31ac-478f-84a7-5cbb03baadba --- flight/OpenPilot/inc/op_config.h | 37 ----------- flight/OpenPilot/inc/op_logging.h | 45 ------------- flight/OpenPilot/inc/openpilot.h | 47 -------------- flight/OpenPilot/op_logging.c | 103 ------------------------------ flight/OpenPilot/openpilot.c | 72 --------------------- 5 files changed, 304 deletions(-) delete mode 100644 flight/OpenPilot/inc/op_config.h delete mode 100644 flight/OpenPilot/inc/op_logging.h delete mode 100644 flight/OpenPilot/inc/openpilot.h delete mode 100644 flight/OpenPilot/op_logging.c delete mode 100644 flight/OpenPilot/openpilot.c diff --git a/flight/OpenPilot/inc/op_config.h b/flight/OpenPilot/inc/op_config.h deleted file mode 100644 index af3b40afa..000000000 --- a/flight/OpenPilot/inc/op_config.h +++ /dev/null @@ -1,37 +0,0 @@ -/** - ****************************************************************************** - * - * @file op_config.h - * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. - * @brief OpenPilot configuration header. - * - Compile time config for OpenPilot Application - * @see The GNU Public License (GPL) Version 3 - * - *****************************************************************************/ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - - -#ifndef OP_CONFIG_H -#define OP_CONFIG_H - -/* Compile Time Macros */ - - -/* Defaults for MinIni */ - - -#endif /* OP_CONFIG_H */ diff --git a/flight/OpenPilot/inc/op_logging.h b/flight/OpenPilot/inc/op_logging.h deleted file mode 100644 index 270f1000c..000000000 --- a/flight/OpenPilot/inc/op_logging.h +++ /dev/null @@ -1,45 +0,0 @@ -/** - ****************************************************************************** - * - * @file op_logging.h - * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. - * @brief OpenPilot Logging Functions header. - * @see The GNU Public License (GPL) Version 3 - * - *****************************************************************************/ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - - -#ifndef OP_LOGGING_H -#define OP_LOGGING_H - -/* Defines */ -#define OP_LOGGING_TASK_PRI ( tskIDLE_PRIORITY + 4 ) - -/* Type Definitions */ -typedef enum {FLIGHT_LOG, RC_LOG} LogTypeTypeDef; -typedef struct { - LogTypeTypeDef Type; - char *Message; -} LogTypeDef; - - -/* Function Prototypes */ -extern void OP_Logging_Init(void); - - -#endif /* OP_LOGGING_H */ diff --git a/flight/OpenPilot/inc/openpilot.h b/flight/OpenPilot/inc/openpilot.h deleted file mode 100644 index d0d5dfb40..000000000 --- a/flight/OpenPilot/inc/openpilot.h +++ /dev/null @@ -1,47 +0,0 @@ -/** - ****************************************************************************** - * - * @file openpilot.h - * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. - * @brief Main OpenPilot header. - * @see The GNU Public License (GPL) Version 3 - * - *****************************************************************************/ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - - -#ifndef OPENPILOT_H -#define OPENPILOT_H - - -/* PIOS Includes */ -#include - -/* OpenPilot Includes */ -#include -#include - - -/* FreeRTOS Includes */ -#include -#include -#include - -/* Global Functions */ -extern void OpenPilotInit(void); - -#endif /* OPENPILOT_H */ diff --git a/flight/OpenPilot/op_logging.c b/flight/OpenPilot/op_logging.c deleted file mode 100644 index 6ead8245a..000000000 --- a/flight/OpenPilot/op_logging.c +++ /dev/null @@ -1,103 +0,0 @@ -/** - ****************************************************************************** - * - * @file op_logging.c - * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. - * @brief OpenPilot Logging Functions - * @see The GNU Public License (GPL) Version 3 - * @defgroup OP_LOGGING Logging Functions - * @{ - * - *****************************************************************************/ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - - -/* OpenPilot Includes */ -#include "openpilot.h" - -/* Global Variables */ -xQueueHandle xLoggingQueue; - -/* Local Variables */ -static uint8_t FlightLogFilename[128]; - -/* Local Functions */ -static void OP_Logging_MicroSDGateKeeperTask(void *pvParameters); - - -/** -* Main function -*/ -void OP_Logging_Init(void) -{ -// uint16_t FileCount; -// FILINFO DummyFileInfo; -// -// /* Create the logging queue */ -// xLoggingQueue = xQueueCreate(15, sizeof(LogTypeDef)); -// -// /* This is a crude way to file the next avaiable number avaiable */ -// /* The proper way would be to use folders with dates, we will get to that later */ -// for(FileCount = 0; FileCount < 65536; FileCount++) { -// sprintf((char *)FlightLogFilename, "Flight_Log_%d.txt", FileCount); -// if(f_stat((char *)FlightLogFilename, &DummyFileInfo) != FR_OK) { -// /* We have come to a file that doesn't extist */ -// break; -// } -// } -// -// /* Start the gatekeeper task */ -// xTaskCreate(OP_Logging_MicroSDGateKeeperTask, (signed portCHAR *) "Logging_MicroSDGateKeeperTask", configMINIMAL_STACK_SIZE, NULL, OP_LOGGING_TASK_PRI, NULL); -} - -/** -* Task to handle the MicroSD log que -*/ -void OP_Logging_MicroSDGateKeeperTask(void *pvParameters) -{ -// FIL File; -// LogTypeDef pcMessageToLog; -// -// for(;;) { -// xQueueReceive(xLoggingQueue, &pcMessageToLog, portMAX_DELAY); -// -// /* We don't want this take to get pre-empted, so enter critical state */ -// /* If we do get pre-empted we face corrupting the MicroSD filesystem */ -// taskENTER_CRITICAL(); -// -// /* Open the correct log file */ -// switch(pcMessageToLog.Type) { -// case FLIGHT_LOG: -// f_open(&File, (char *)FlightLogFilename, FA_OPEN_EXISTING); -// break; -// case RC_LOG: -// break; -// } -// -// /* Write the stuff */ -// f_puts(pcMessageToLog.Message, &File); -// -// /* Sync the MicroSD Card */ -// f_sync(&File); -// -// /* Close the file */ -// f_close(&File); -// -// /* Exit the critical stage */ -// taskEXIT_CRITICAL(); -// } -} diff --git a/flight/OpenPilot/openpilot.c b/flight/OpenPilot/openpilot.c deleted file mode 100644 index d54545a3c..000000000 --- a/flight/OpenPilot/openpilot.c +++ /dev/null @@ -1,72 +0,0 @@ -/** - ****************************************************************************** - * - * @file openpilot.c - * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. - * @brief Sets up ans runs main OpenPilot tasks. - * @see The GNU Public License (GPL) Version 3 - * - *****************************************************************************/ -/* - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY - * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License - * for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - - -/* OpenPilot Includes */ -#include "openpilot.h" - - -/* Local Variables */ - - -/* Local Functions */ - - -/** -* OpenPilot Main function -*/ -void OpenPilotInit(void) -{ - /* Initialise Logging */ - OP_Logging_Init(); - - - /* Possible task setup: - -> Supervisor: Monitors mainly which state the system should be in, starts/stops Manual/ARC/HARC tasks - -> Manual: Simply passes servo inputs to servo outputs, maybe some logging too - -> ARC: Assisted RC, fancy name for stabilisation only (aka. Auto1) - -> HARC: Higly Assisted RC, fancy name for full autonomous (aka. Auto2) - -> GPS: Simply parses incomming GPS data and puts it into the GPS struct, also set states of FIX/NOFIX etc. - -> Gatekeepers: Tasks which use queue's to access shared resources - -> MicroSD: Simply logs data to the MicroSD card - -> Telemetry: Sends telemetry using a queue - - - Supervisor should have highest possibly priority (Idle + 14) We only have 5 task levels, as long as it yeilds that is fine. - - Supervisor should also act as the warnings system, low batter etc) - - Supervisor should handle all telemetry inputs (not outputs), and act accordingly - - ARC and HARC tasks should be split into two parts, gathering sensor data and acting on sensor data. - - Sub tasks of the supervisor should have a priority just lower than the supervisor (Idle + 12?) - - Sub tasks of the supervisor shoud ONLY be pre-empted by system interrupts such as UART, I2C etc - - Gatekeepers should sit in a blocked state while there is nothing on the que, with a low priority - - With the low priority of gatekeepers, they should only be running while the supervisor tasks are not working - - - I2C module sending and receiving needs to be included in here somwhere. Inputs would be interrupt triggered. - - - Task to check inbuilt preasure sensor every second and update GCS - - Task to write to a .klm for google earth to the SDCard every interval (interval is config parameter as is turning on this this logging feature. Check to see if SDCard is ok before writing, i.e. check it has not fallen out, check it is not full as well. - - */ - -}