From 2e65449dcc572d74b75553971f91a2e0e7d37a2a Mon Sep 17 00:00:00 2001 From: Cliff Geerdes Date: Sat, 21 May 2016 11:54:41 -0400 Subject: [PATCH] LP-72 rename revolution.cpp rename revo defines rename revo comments --- flight/pios/inc/pios_usb_defs.h | 8 +++++--- flight/targets/boards/sparky2/board-info.mk | 2 +- flight/targets/boards/sparky2/board_hw_defs.c | 10 +++++----- .../sparky2/bootloader/inc/pios_usb_board_data.h | 11 ++++++----- flight/targets/boards/sparky2/bootloader/main.c | 13 +++++++------ flight/targets/boards/sparky2/firmware/Makefile | 4 ++-- .../sparky2/firmware/inc/pios_usb_board_data.h | 12 ++++++------ .../firmware/{revolution.cpp => sparky2.cpp} | 14 +++++++------- .../gcs/src/plugins/config/configoplinkwidget.cpp | 6 +++--- 9 files changed, 42 insertions(+), 38 deletions(-) rename flight/targets/boards/sparky2/firmware/{revolution.cpp => sparky2.cpp} (89%) diff --git a/flight/pios/inc/pios_usb_defs.h b/flight/pios/inc/pios_usb_defs.h index 289a96439..39849c0d2 100644 --- a/flight/pios/inc/pios_usb_defs.h +++ b/flight/pios/inc/pios_usb_defs.h @@ -1,5 +1,5 @@ /** - ****************************************************************************** + **************************************************************************************** * @addtogroup PIOS PIOS Core hardware abstraction layer * @{ * @addtogroup PIOS_USB_DEFS USB standard types and definitions @@ -7,12 +7,12 @@ * @{ * * @file pios_usb_defs.h - * @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2015. + * @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2015-2016. * The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. * @brief USB Standard types and definitions * @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 @@ -358,6 +358,7 @@ enum usb_product_ids { USB_PRODUCT_ID_OPLINK = 0x415C, USB_PRODUCT_ID_CC3D = 0x415D, USB_PRODUCT_ID_REVOLUTION = 0x415E, + USB_PRODUCT_ID_SPARKY2 = 0x415E, USB_PRODUCT_ID_OSD = 0x4194, USB_PRODUCT_ID_SPARE = 0x4195, } __attribute__((packed)); @@ -368,6 +369,7 @@ enum usb_op_board_ids { USB_OP_BOARD_ID_OPLINK = 3, USB_OP_BOARD_ID_COPTERCONTROL = 4, USB_OP_BOARD_ID_REVOLUTION = 5, + USB_OP_BOARD_ID_SPARKY2 = 5, USB_OP_BOARD_ID_OSD = 6, } __attribute__((packed)); diff --git a/flight/targets/boards/sparky2/board-info.mk b/flight/targets/boards/sparky2/board-info.mk index 2cddd539b..413f5d739 100644 --- a/flight/targets/boards/sparky2/board-info.mk +++ b/flight/targets/boards/sparky2/board-info.mk @@ -12,7 +12,7 @@ MODEL_SUFFIX := OPENOCD_JTAG_CONFIG := stlink-v2.cfg OPENOCD_CONFIG := stm32f4xx.stlink.cfg -# Flash memory map for Revolution: +# Flash memory map for Sparky2: # Sector start size use # 0 0x0800 0000 16k BL # 1 0x0800 4000 16k BL diff --git a/flight/targets/boards/sparky2/board_hw_defs.c b/flight/targets/boards/sparky2/board_hw_defs.c index f64051222..8e221c786 100644 --- a/flight/targets/boards/sparky2/board_hw_defs.c +++ b/flight/targets/boards/sparky2/board_hw_defs.c @@ -1,15 +1,15 @@ /** - ****************************************************************************** + **************************************************************************************** * @file board_hw_defs.c - * @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2015-2016 . + * @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2015-2016. * The OpenPilot Team, http://www.openpilot.org Copyright (C) 2012. * PhoenixPilot, http://github.com/PhoenixPilot, Copyright (C) 2012 * @addtogroup OpenPilotSystem OpenPilot System * @{ * @addtogroup OpenPilotCore OpenPilot Core * @{ - * @brief Defines board specific static initializers for hardware for the Revolution board. - *****************************************************************************/ + * @brief Defines board specific static initializers for hardware for the Sparky2 board. + ***************************************************************************************/ /* * 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 @@ -760,7 +760,7 @@ static const struct pios_usart_cfg pios_usart_srxl_flexi_cfg = { #endif /* PIOS_INCLUDE_SRXL */ // these were copied from Revo support -// they probably need to be modified for sparky2 support +// they might need to be further modified for Sparky2 support #if defined(PIOS_INCLUDE_HOTT) /* * HOTT USART diff --git a/flight/targets/boards/sparky2/bootloader/inc/pios_usb_board_data.h b/flight/targets/boards/sparky2/bootloader/inc/pios_usb_board_data.h index 8aa5d2f9d..d3deddfde 100644 --- a/flight/targets/boards/sparky2/bootloader/inc/pios_usb_board_data.h +++ b/flight/targets/boards/sparky2/bootloader/inc/pios_usb_board_data.h @@ -1,5 +1,5 @@ /** - ****************************************************************************** + *********************************************************************************** * @addtogroup PIOS PIOS Core hardware abstraction layer * @{ * @addtogroup PIOS_USB_BOARD Board specific USB definitions @@ -7,11 +7,12 @@ * @{ * * @file pios_usb_board_data.h - * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. + * @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2016. + * The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. * @brief Board specific USB definitions * @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 @@ -38,8 +39,8 @@ #include /* struct usb_* */ -#define PIOS_USB_BOARD_PRODUCT_ID USB_PRODUCT_ID_REVOLUTION -#define PIOS_USB_BOARD_DEVICE_VER USB_OP_DEVICE_VER(USB_OP_BOARD_ID_REVOLUTION, USB_OP_BOARD_MODE_BL) +#define PIOS_USB_BOARD_PRODUCT_ID USB_PRODUCT_ID_SPARKY2 +#define PIOS_USB_BOARD_DEVICE_VER USB_OP_DEVICE_VER(USB_OP_BOARD_ID_SPARKY2, USB_OP_BOARD_MODE_BL) #define PIOS_USB_BOARD_SN_SUFFIX "+BL" /* diff --git a/flight/targets/boards/sparky2/bootloader/main.c b/flight/targets/boards/sparky2/bootloader/main.c index 09a54a094..70b18409e 100644 --- a/flight/targets/boards/sparky2/bootloader/main.c +++ b/flight/targets/boards/sparky2/bootloader/main.c @@ -1,15 +1,16 @@ /** - ****************************************************************************** - * @addtogroup RevolutionBL Revolution BootLoader - * @brief These files contain the code to the Revolution Bootloader. + *********************************************************************************** + * @addtogroup Sparky2BL Sparky2 BootLoader + * @brief These files contain the code to the Sparky2 Bootloader. * * @{ * @file main.c - * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. - * @brief This is the file with the main function of the Revolution BootLoader + * @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2016. + * The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. + * @brief This is the file with the main function of the Sparky2 BootLoader * @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 diff --git a/flight/targets/boards/sparky2/firmware/Makefile b/flight/targets/boards/sparky2/firmware/Makefile index 1c73f4845..1790c484b 100644 --- a/flight/targets/boards/sparky2/firmware/Makefile +++ b/flight/targets/boards/sparky2/firmware/Makefile @@ -25,7 +25,7 @@ endif include ../board-info.mk include $(FLIGHT_ROOT_DIR)/make/firmware-defs.mk -# REVO C++ support +# Sparky2 C++ support USE_CXX = YES # ARM DSP library @@ -71,7 +71,7 @@ ifndef TESTAPP ## Application Core SRC += ../pios_usb_board_data.c SRC += $(OPMODULEDIR)/System/systemmod.c - CPPSRC += $(OPSYSTEM)/revolution.cpp + CPPSRC += $(OPSYSTEM)/sparky2.cpp SRC += $(OPSYSTEM)/pios_board.c SRC += $(FLIGHTLIB)/alarms.c SRC += $(FLIGHTLIB)/instrumentation.c diff --git a/flight/targets/boards/sparky2/firmware/inc/pios_usb_board_data.h b/flight/targets/boards/sparky2/firmware/inc/pios_usb_board_data.h index 351eaf5e2..87c2cd905 100644 --- a/flight/targets/boards/sparky2/firmware/inc/pios_usb_board_data.h +++ b/flight/targets/boards/sparky2/firmware/inc/pios_usb_board_data.h @@ -1,5 +1,5 @@ /** - ****************************************************************************** + *********************************************************************************** * @addtogroup PIOS PIOS Core hardware abstraction layer * @{ * @addtogroup PIOS_USB_BOARD Board specific USB definitions @@ -7,11 +7,11 @@ * @{ * * @file pios_usb_board_data.h - * @author The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. - * @brief Board specific USB definitions + * @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2016. + * The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010. * @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 @@ -40,8 +40,8 @@ #include /* USB_* macros */ -#define PIOS_USB_BOARD_PRODUCT_ID USB_PRODUCT_ID_REVOLUTION -#define PIOS_USB_BOARD_DEVICE_VER USB_OP_DEVICE_VER(USB_OP_BOARD_ID_REVOLUTION, USB_OP_BOARD_MODE_FW) +#define PIOS_USB_BOARD_PRODUCT_ID USB_PRODUCT_ID_SPARKY2 +#define PIOS_USB_BOARD_DEVICE_VER USB_OP_DEVICE_VER(USB_OP_BOARD_ID_SPARKY2, USB_OP_BOARD_MODE_FW) #define PIOS_USB_BOARD_SN_SUFFIX "+FW" #endif /* PIOS_USB_BOARD_DATA_H */ diff --git a/flight/targets/boards/sparky2/firmware/revolution.cpp b/flight/targets/boards/sparky2/firmware/sparky2.cpp similarity index 89% rename from flight/targets/boards/sparky2/firmware/revolution.cpp rename to flight/targets/boards/sparky2/firmware/sparky2.cpp index 8c5bbf28c..5f0a20885 100644 --- a/flight/targets/boards/sparky2/firmware/revolution.cpp +++ b/flight/targets/boards/sparky2/firmware/sparky2.cpp @@ -1,21 +1,21 @@ /** - ****************************************************************************** + **************************************************************************************** * @addtogroup LibrePilotSystem LibrePilot System - * @brief These files are the core system files for Revolution. - * They are the ground layer just above PiOS. In practice, Revolution actually starts - * in the main() function of revolution.cpp + * @brief These files are the core system files for Sparky2. + * They are the ground layer just above PiOS. In practice, Sparky2 actually starts + * in the main() function of sparky2.cpp * @{ * @addtogroup LibrePilotCore LibrePilot Core * @brief This is where the LP firmware starts. Those files also define the compile-time * options of the firmware. * @{ - * @file revolution.cpp - * @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2015. + * @file sparky2.cpp + * @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2015-2016. * The OpenPilot Team, http://www.openpilot.org Copyright (C) 2010-2015 * @brief Sets up and runs main 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 diff --git a/ground/gcs/src/plugins/config/configoplinkwidget.cpp b/ground/gcs/src/plugins/config/configoplinkwidget.cpp index 45bc5a6de..9ccd73f6d 100644 --- a/ground/gcs/src/plugins/config/configoplinkwidget.cpp +++ b/ground/gcs/src/plugins/config/configoplinkwidget.cpp @@ -1,5 +1,5 @@ /** - ****************************************************************************** + **************************************************************************************** * * @file configoplinkwidget.cpp * @author The LibrePilot Project, http://www.librepilot.org Copyright (C) 2015-2016. @@ -9,7 +9,7 @@ * @addtogroup ConfigPlugin Config Plugin * @{ * @brief The Configuration Gadget used to configure the OPLink and Revo modem - *****************************************************************************/ + ***************************************************************************************/ /* * 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 @@ -232,7 +232,7 @@ void ConfigOPLinkWidget::updateSettings(UAVObject *object) connect(m_oplink->MainPort, SIGNAL(currentIndexChanged(int)), this, SLOT(updatePPMOptions())); connect(m_oplink->FlexiPort, SIGNAL(currentIndexChanged(int)), this, SLOT(updatePPMOptions())); break; - case 0x0A: // OPLink? (No. 0x0A is gpsplatinum. This is wrong.) + case 0x0A: // OPLink? (No. This is wrong. 0x0A is gpsplatinum.) m_oplink->MainPort->setVisible(true); m_oplink->MainPortLabel->setVisible(true); m_oplink->FlexiPort->setVisible(true);