Skip to content

Commit

Permalink
General updates for repo standup.
Browse files Browse the repository at this point in the history
Updated repo templates
Updated repo readme
Moved contributing to wiki
Updated sketch template
Integrated Sandra's Master Arm panel code into the example one.

Co-Authored-By: Calvin Morrow <[email protected]>
Co-Authored-By: Sandra Carroll <[email protected]>
  • Loading branch information
3 people committed Feb 26, 2024
1 parent f4ddac2 commit 728eb2e
Show file tree
Hide file tree
Showing 8 changed files with 263 additions and 63 deletions.
5 changes: 3 additions & 2 deletions .github/ISSUE_TEMPLATE/bug.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,9 @@ body:
label: Release Version
description: What release are you working with?
options:
- 1.0.0-beta.2
- pre-1.0.0-beta.2 (Early Development/Alpha)
- v0.3.0
- v0.2.0
- pre-v0.2.0 (Early Development/Alpha)
validations:
required: true
- type: dropdown
Expand Down
5 changes: 3 additions & 2 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ body:
label: Release Version
description: What release are you working with?
options:
- 1.0.0-beta.2
- pre-1.0.0-beta.2 (Early Development/Alpha)
- v0.3.0
- v0.2.0
- pre-v0.2.0 (Early Development/Alpha)
validations:
required: true
- type: dropdown
Expand Down
2 changes: 0 additions & 2 deletions ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
*Add an "X" in the square brackets to check the applicable checkboxs.*
### Category:
*Check one or more items.*
- [ ] MCAD (SolidWorks)
- [ ] ECAD (PCB Design or other electrical hardware)
- [ ] Software - Sketch
- [ ] Software - DCS-BIOS
- [ ] Software - Library
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# README
![OH logo](https://raw.githubusercontent.com/jrsteensen/OpenHornet/master/images/Logo/open_hornet_horizontal_500x79.png)


![Docs](https://github.com/jrsteensen/OpenHornet-Software/actions/workflows/pages/pages-build-deployment/badge.svg?branch=gh-pages)

OpenHornet is a F/A-18C OFP 13C Lot 20 1:1 Replica Simulator, consisting of a physical structure and electrical/software interfaces to a PC to be driven by Digital Combat Simulator (DCS).
Expand All @@ -17,7 +16,10 @@ This is the API documentation of the OpenHornet Software. You will find a docume
* [OpenHornet Discord](https://discord.gg/G5PA5ju)
* [Donate to OpenHornet](https://www.openhornet.com/campaigns/donate/)

* [OpenHornet Software Docs](https://jrsteensen.github.io/OpenHornet-Software/index.html)
* [OpenHornet Software Wiki](https://github.com/jrsteensen/OpenHornet-Software/wiki)

## Licensing
Copyright © 2016-2023 OpenHornet
Copyright © 2016-2024 OpenHornet

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
96 changes: 45 additions & 51 deletions docs/SoftwareManual.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,17 @@ This manual is about writing software for the OpenHornet project. It shows how t

- Arduino 1.8.10
- GNU Make 3.81+
- DCS-BIOS 0.7.49
- DCS-BIOS v2.8.7+
- Doxygen 1.8.13

### Arduino Libraries

- dcs-bios-arduino-library 0.3.9
- dcs-bios-arduino-library-0.3.9+

### Suggested debug tools

- Bort v0.2.4+
- Dcs-Insight v1.8.3+

## Preparation

Expand Down Expand Up @@ -72,53 +76,27 @@ The following is an example of how to document code:
* \____/| .__/ \___|_| |_|_| |_|\___/|_| |_| |_|\___|\__|
* | |
* |_|
* ----------------------------------------------------------------------------------
* Copyright 2016-2024 OpenHornet
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* Project OpenHornet
*
* The OpenHornet Project is a F/A-18C OFP 13C Lot 20 1:1 Replica Simulator,
* consisting of a physical structure and electrical/software interfaces to a PC
* to be driven by Digital Combat Simulator (DCS).
*
* ---------------------------------------------------------------------------------
*
* This Project is released under the Creative Commons
* Atribution - Non Comercal - Share Alike License.
*
* CC BY-NC-SA 3.0
*
* You are free to:
* - Share — copy and redistribute the material in any medium or format
* - Adapt — remix, transform, and build upon the material
* The licensor cannot revoke these freedoms as long as you follow the license terms.
*
* Under the following terms:
* - Attribution — You must give appropriate credit, provide a link to the license,
* and indicate if changes were made. You may do so in any reasonable manner,
* but not in any way that suggests the licensor endorses you or your use.
* - NonCommercial — You may not use the material for commercial purposes.
* - ShareAlike — If you remix, transform, or build upon the material,
* you must distribute your contributions under the same license as the original.
*
* No additional restrictions — You may not apply legal terms or technological
* measures that legally restrict others from doing anything the license permits.
*
* More Information about the license can be found under:
* https://creativecommons.org/licenses/by-nc-sa/3.0/
*
* ---------------------------------------------------------------------------------
*
* The OpenHornet Software is based on DCS-BIOS
* You can find more information here: http://dcs-bios.a10c.de
*
* DCS-BIOS is released under the following terms:
* https://github.com/dcs-bios/dcs-bios/blob/develop/DCS-BIOS-License.txt
*
* ---------------------------------------------------------------------------------
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ----------------------------------------------------------------------------------
* Note: All other portions of OpenHornet not within the 'OpenHornet-Software'
* GitHub repository is released under the Creative Commons Atribution -
* Non-Commercial - Share Alike License. (CC BY-NC-SA 4.0)
* ----------------------------------------------------------------------------------
* This Project uses Doxygen as a documentation generator.
* Please use Doxigen capable comments.
*
* Please use Doxygen capable comments.
**************************************************************************************/
```
Expand All @@ -132,13 +110,24 @@ The Sketch summary comments should be on top of the file, right after the Header
/**
* @file OHSketchTemplate.ino
* @author Balz Reber
* @date 22.11.2019
* @version 0.0.1 (untested)
* @warning This sketch is not yet tested on hardware
* @brief This is the OpenHornet Sketch Template
* @date 02.26.2024
* @version u.0.0.1 (untested)
* @warning This sketch is based on a wiring diagram, and was not yet tested on hardware
* @brief This is the OpenHornet Sketch Template.
*
* @details This is the Open Hornet Sketch Template. It should be used as a starting point for every new sketch.
* Please copy the whole OHSketchTemplate folder to start. As it also contains some test skip files needed for travis.
* @details This is the OpenHornet Sketch Template. It should be used as a starting point for every new sketch.
* Please copy the whole OHSketchTemplate folder to start, and ensure the correct line in the Makefile is uncommented.
*
* * **Intended Board:**
* <Replace with hardware type such as ABSIS ALE, or ABSIS ALE w/ABSIS Relay Module, etc.>
*
* **Wiring diagram:**
* PIN | Function
* --- | ---
* 1 | function 1
* 2 | function 2
* 3 | function 3
*
*/
```
The elements in the summary are the following:
Expand All @@ -165,6 +154,11 @@ A brief description of the sketch.
#### Detail
A more detailed description of the sketch

#### Intended board
This is the hardware that this sketch is intended to run on.

#### Wiring diagram
A quick reference showing connections to this PCB, for ease of reference when reading this code.

### Functions

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,197 @@
/**************************************************************************************
* ____ _ _ _
* / __ \ | | | | | |
* | | | |_ __ ___ _ __ | |__| | ___ _ __ _ __ ___| |_
* | | | | '_ \ / _ \ '_ \| __ |/ _ \| '__| '_ \ / _ \ __|
* | |__| | |_) | __/ | | | | | | (_) | | | | | | __/ |_
* \____/| .__/ \___|_| |_|_| |_|\___/|_| |_| |_|\___|\__|
* | |
* |_|
* ----------------------------------------------------------------------------------
* Copyright 2016-2024 OpenHornet
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
* ----------------------------------------------------------------------------------
* Note: All other portions of OpenHornet not within the 'OpenHornet-Software'
* GitHub repository is released under the Creative Commons Atribution -
* Non-Commercial - Share Alike License. (CC BY-NC-SA 4.0)
* ----------------------------------------------------------------------------------
* This Project uses Doxygen as a documentation generator.
* Please use Doxygen capable comments.
**************************************************************************************/

/**
* @file OH_1A2_ABSIS_ALE_BA1.ino
* @author Sandra Carroll@[email protected]
* @date 27.12.2022
* @version u.0.0.1 (untested)
* @warning This sketch is based on a wiring diagram, and was not yet tested on hardware.
* @brief ABSIS ALE MASTER ARM, RS485 BUS ADDRESS 1
*
* @details
*
*
* * **Intended Board:**
* ABSIS ALE
*
* **Wiring diagram:**
*
* PIN | Function
* --- | ---
* A1 | Emergency Jettison Switch
* A2 | Air to Ground Select
* A3 | Ready/Disch Switch
* D2 | Air to Air Select
* D3 | Master Arm Switch
* D5 | TXENABLE_PIN for RS485 Communitions
*/

/**
* Check if we're on a Mega328 or Mega2560 and define the correct
* serial interface
*
*/
#if defined(__AVR_ATmega328P__) || defined(__AVR_ATmega2560__)
#define DCSBIOS_IRQ_SERIAL
#else
#define DCSBIOS_DEFAULT_SERIAL
#endif

#ifdef __AVR__
#include <avr/power.h>
#endif

/**
* @brief following #define tells DCS-BIOS that this is a RS-485 slave device.
* It also sets the address of this slave device. The slave address should be
* between 1 and 126 and must be unique among all devices on the same bus.
*
* @bug Currently does not work with the Pro Micro (32U4), Fails to compile
*/
//#define DCSBIOS_RS485_SLAVE 1

/**
* The Arduino pin that is connected to the
* RE and DE pins on the RS-485 transceiver.
*/
#define TXENABLE_PIN 5
#define UART1_SELECT

/**
* @brief DCS Bios library include
*/
#include "DcsBios.h"

/**
* @brief Define Control I/O for DCS-BIOS
*
*/
#define e_jett_sw A1
#define ag_sw A2
#define ready_sw A3
#define aa_sw 2
#define mstr_arm_sw 3


/**
* @brief Connect switches to DCS-BIOS
*
*/
DcsBios::Switch2Pos masterArmSw("MASTER_ARM_SW", mstr_arm_sw);
DcsBios::Switch2Pos masterModeAa("MASTER_MODE_AA", aa_sw);
DcsBios::Switch2Pos masterModeAg("MASTER_MODE_AG", ag_sw);
DcsBios::Switch2Pos emerJettBtn("EMER_JETT_BTN", e_jett_sw);
DcsBios::Switch2Pos fireExtBtn("FIRE_EXT_BTN", ready_sw);

/**
* @brief The following is for Notes for Backlight/Switch Lighting and will not be called in this code
* PIXEL ORDER D29-D32,D7-D27,D4-D6,D28
*
* READY D29-D30
* DISCH D31-D32
* AA D6,D28
* AA_BL D15
* AG D4,D5
* AG_BL D16
* FIRE_EXGTH D7-D14
* MSTR_ARM_BL D17-D22
* EMERG_JETT_BL D23-D27
*/

/**
* @brief When ready_sw is Depressed D31/D32 are lit
*
* @param newValue
*/
void onMcDischChange(unsigned int newValue) {
/* your code here */
}
DcsBios::IntegerBuffer mcDischBuffer(0x740c, 0x4000, 14, onMcDischChange);

/**
* @brief When aa_sw is Depressed D6/D28 are lit
*
* @param newValue
*/
void onMasterModeAaLtChange(unsigned int newValue) {
/* your code here */
}
DcsBios::IntegerBuffer masterModeAaLtBuffer(0x740c, 0x0200, 9, onMasterModeAaLtChange);

/**
* @brief When ag_sw is Despressed D4/D5 are lit
*
* @param newValue
*/
void onMasterModeAgLtChange(unsigned int newValue) {
/* your code here */
}
DcsBios::IntegerBuffer masterModeAgLtBuffer(0x740c, 0x0400, 10, onMasterModeAgLtChange);

/**
* @brief When APU_FIRE_BUTTON is Depressed
*
* @param newValue
*/
void onFireApuLtChange(unsigned int newValue) {
/* your code here */
}
DcsBios::IntegerBuffer fireApuLtBuffer(0x740c, 0x0004, 2, onFireApuLtChange);


/**
* @brief
* Arduino Setup Function
*
* Arduino standard Setup Function. Code who should be executed
* only once at the programm start, belongs in this function.
*/
void setup() {

// Run DCS Bios setup function
DcsBios::setup();

}

/**
* @brief Arduino Loop Function
*
* Arduino standard Loop Function. Code who should be executed
* over and over in a loop, belongs in this function.
*/
void loop() {

//Run DCS Bios loop function
DcsBios::loop();

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Any extra libraries included by this sketch (space separated)
LIBRARIES = Adafruit_NeoPixel Servo dcs-bios-arduino-library

# Uncomment one of the following to choose the target board
# include ../../include/mega2560.mk
include ../../include/promicro.mk
# include ../../include/promini.mk
# include ../../include/s2mini.mk
Loading

0 comments on commit 728eb2e

Please sign in to comment.