API Documentation v0.0.1
All Classes Files Functions Variables Macros Pages
OHSketchTemplate.ino
Go to the documentation of this file.
1/**************************************************************************************
2 * ____ _ _ _
3 * / __ \ | | | | | |
4 * | | | |_ __ ___ _ __ | |__| | ___ _ __ _ __ ___| |_
5 * | | | | '_ \ / _ \ '_ \| __ |/ _ \| '__| '_ \ / _ \ __|
6 * | |__| | |_) | __/ | | | | | | (_) | | | | | | __/ |_
7 * \____/| .__/ \___|_| |_|_| |_|\___/|_| |_| |_|\___|\__|
8 * | |
9 * |_|
10 * ----------------------------------------------------------------------------------
11 * Copyright 2016-2024 OpenHornet
12 *
13 * Licensed under the Apache License, Version 2.0 (the "License");
14 * you may not use this file except in compliance with the License.
15 * You may obtain a copy of the License at
16 *
17 * http://www.apache.org/licenses/LICENSE-2.0
18 *
19 * Unless required by applicable law or agreed to in writing, software
20 * distributed under the License is distributed on an "AS IS" BASIS,
21 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
22 * See the License for the specific language governing permissions and
23 * limitations under the License.
24 * ----------------------------------------------------------------------------------
25 * Note: All other portions of OpenHornet not within the 'OpenHornet-Software'
26 * GitHub repository is released under the Creative Commons Attribution -
27 * Non-Commercial - Share Alike License. (CC BY-NC-SA 4.0)
28 * ----------------------------------------------------------------------------------
29 * This Project uses Doxygen as a documentation generator.
30 * Please use Doxygen capable comments.
31 **************************************************************************************/
32
70#if defined(__AVR_ATmega328P__) || defined(__AVR_ATmega2560__)
71#define DCSBIOS_IRQ_SERIAL
72#else
73#define DCSBIOS_DEFAULT_SERIAL
74#endif
75
76#ifdef __AVR__
77#include <avr/power.h>
78#endif
79
84#define TXENABLE_PIN 5
85#define UART1_SELECT
86
87#include "DcsBios.h"
88
89// Define pins for DCS-BIOS per interconnect diagram.
90#define PIN_NAME1 A1
91#define PIN_NAME2 A2
92
93//Declare variables for custom non-DCS logic <update comment as needed>
94bool wowLeft = true;
95bool wowRight = true;
96
97// Connect switches to DCS-BIOS
98DcsBios::Switch2Pos emergencyGearRotate("EMERGENCY_GEAR_ROTATE", PIN_NAME1); //delete example and this comment.
99
100// DCSBios reads to save airplane state information. <update comment as needed>
101void onExtWowLeftChange(unsigned int newValue) {
102 wowLeft = newValue;
103} DcsBios::IntegerBuffer extWowLeftBuffer(0x74d8, 0x0100, 8, onExtWowLeftChange);
104
105
112void setup() {
113
114 // Run DCS Bios setup function
115 DcsBios::setup();
116}
117
124void loop() {
125
126 //Run DCS Bios loop function
127 DcsBios::loop();
128}
129
163int sampleFunction(int myParam1, int myParam2) {
164 int myReturn;
165 return myReturn;
166}
bool wowLeft
Update variables as needed and update this Doxygen comment, or remove line/section if not needed.
int sampleFunction(int myParam1, int myParam2)
#define PIN_NAME1
function 1
void setup()
bool wowRight
Update variables as needed and update this Doxygen comment, or remove line/section if not needed.
void loop()