This commit is contained in:
Pawel Spychalski (DzikuVx)
2017-10-23 12:45:25 +02:00
parent 0a1b5feecd
commit 471e532c5a
3 changed files with 9 additions and 8 deletions

View File

@@ -1,6 +1,6 @@
{ {
"board": "bsfrance:avr:lora32u4", "board": "bsfrance:avr:lora32u4",
"sketch": "crossbow.ino", "sketch": "crossbow.ino",
"port": "COM15", "port": "COM17",
"output": "./build" "output": "./build"
} }

View File

@@ -9,6 +9,7 @@
// #define WAIT_FOR_SERIAL // #define WAIT_FOR_SERIAL
#include <LoRa.h> #include <LoRa.h>
// #include <PinChangeInterrupt.h>
#include "variables.h" #include "variables.h"
#include "qsp.h" #include "qsp.h"
@@ -24,12 +25,13 @@ int ppm[PPM_CHANNEL_COUNT] = {0};
*/ */
#ifdef DEVICE_MODE_TX #ifdef DEVICE_MODE_TX
#define OLED_RESET -1 // #define OLED_RESET -1
#include <PPMReader.h> #include <PPMReader.h>
#include <Adafruit_SSD1306.h> // #include <Adafruit_SSD1306.h>
PPMReader ppmReader(PPM_INPUT_PIN, PPM_INPUT_INTERRUPT); PPMReader ppmReader(PPM_INPUT_PIN, PPM_INPUT_INTERRUPT);
Adafruit_SSD1306 display(OLED_RESET); // PPMReader ppmReader(11, 2, MODE_PIN_CHANGE_INTERRUPT);
// Adafruit_SSD1306 display(OLED_RESET);
#endif #endif
@@ -243,7 +245,6 @@ void setup(void)
#ifdef DEBUG_LED #ifdef DEBUG_LED
qsp.debugConfig |= DEBUG_FLAG_LED; qsp.debugConfig |= DEBUG_FLAG_LED;
#endif #endif
} }
#ifdef DEVICE_MODE_RX #ifdef DEVICE_MODE_RX

View File

@@ -4,7 +4,7 @@
#define UART_SPEED 57600 #define UART_SPEED 57600
#define E45_TTL_100_UART_DOWNTIME 30 #define E45_TTL_100_UART_DOWNTIME 30
#define PPM_CHANNEL_COUNT 10 #define PPM_CHANNEL_COUNT 11
#define RX_RX_HEALTH_FRAME_RATE 5000 #define RX_RX_HEALTH_FRAME_RATE 5000
#define TX_RC_FRAME_RATE 1000 //ms #define TX_RC_FRAME_RATE 1000 //ms
@@ -51,8 +51,8 @@ enum debugConfigFlags {
DEBUG_FLAG_LED = 0b00000010 DEBUG_FLAG_LED = 0b00000010
}; };
#define PPM_INPUT_PIN 2 #define PPM_INPUT_PIN 0 // Has to be one of Interrupt pins
#define PPM_INPUT_INTERRUPT 1 //For Pro Micro 1, For Pro Mini 0 #define PPM_INPUT_INTERRUPT 2 // For Pro Micro 1, For Pro Mini 0
#define PPM_CHANNEL_DEFAULT_VALUE 1500 //set the default servo value #define PPM_CHANNEL_DEFAULT_VALUE 1500 //set the default servo value
#define PPM_FRAME_LENGTH 22500 //set the PPM frame length in microseconds (1ms = 1000µs) #define PPM_FRAME_LENGTH 22500 //set the PPM frame length in microseconds (1ms = 1000µs)