Skip to content

Commit

Permalink
ESP32 core 3.x support
Browse files Browse the repository at this point in the history
  • Loading branch information
ArminJo committed Oct 21, 2024
1 parent 2c23c53 commit 8506dd9
Show file tree
Hide file tree
Showing 59 changed files with 482 additions and 264 deletions.
30 changes: 12 additions & 18 deletions .github/workflows/LibraryBuild.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# LibraryBuild.yml
# Github workflow script to test compile all examples of an Arduino library repository.
#
# Copyright (C) 2020 Armin Joachimsmeyer
# Copyright (C) 2020-2024 Armin Joachimsmeyer
# https://github.com/ArminJo/Github-Actions
#

Expand All @@ -27,7 +27,7 @@ jobs:

env:
# Comma separated list without double quotes around the list.
REQUIRED_LIBRARIES: Servo,ServoEasing,Adafruit Motor Shield V2 Library,PlayRtttl,BlueDisplay
REQUIRED_LIBRARIES: Servo,ServoEasing,Adafruit Motor Shield V2 Library,PlayRtttl # ,BlueDisplay

strategy:
matrix:
Expand All @@ -44,7 +44,7 @@ jobs:
arduino-boards-fqbn:
- arduino:avr:uno
- arduino:avr:uno|full
- esp32:esp32:featheresp32:FlashFreq=80
- esp32:esp32:esp32cam

# Specify parameters for each board.
# With sketches-exclude you may exclude specific examples for a board. Use a comma separated list.
Expand All @@ -68,21 +68,15 @@ jobs:
-DBREADBOARD_4WD_FULL_CONFIGURATION
-DUS_SENSOR_SUPPORTS_1_PIN_MODE

- arduino-boards-fqbn: esp32:esp32:featheresp32:FlashFreq=80
- arduino-boards-fqbn: esp32:esp32:esp32cam
platform-url: https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
required-libraries: ESP32Servo@0.13.0 # contains analogWrite.h
sketches-exclude: PrintMotorDiagram,PrintCarValuesWithIMU,RobotCarBasic,RobotCarBlueDisplay,SmartCarFollower,LineFollower # no Encoder support yet
required-libraries: ESP32Servo
sketches-exclude: PrintMotorDiagram,PrintCarValuesWithIMU,RobotCarBlueDisplay,LineFollower # no Encoder support yet, no sensor input
build-properties: # the flags were put in compiler.cpp.extra_flags
All: -DCAR_IS_ESP32_CAM_BASED
MecanumWheelCar: -DDUMMY # undefine CAR_IS_ESP32_CAM_BASED
RobotCarBlueDisplay:
-DCAR_IS_ESP32_CAM_BASED
-DBLUETOOTH_BAUD_RATE=BAUD_115200
-DBREADBOARD_4WD_FULL_CONFIGURATION
-DUS_SENSOR_SUPPORTS_1_PIN_MODE
All: -DCAR_IS_ESP32_CAM_BASED -MMD -c # see https://github.com/espressif/arduino-esp32/issues/8815
MecanumWheelCar: -DDUMMY -MMD -c # this undefines CAR_IS_ESP32_CAM_BASED

# Do not cancel all jobs / architectures if one job fails
fail-fast: false
# fail-fast: false # false -> do not cancel all jobs / architectures if one job fails

# This is the list of steps this job will run.
steps:
Expand All @@ -99,14 +93,14 @@ jobs:
path: CustomBlueDisplay # must contain string "Custom"
# No need to put "Custom" library in the required-libraries list


- name: Compile all examples using the arduino-test-compile action
uses: ArminJo/arduino-test-compile@master
with:
arduino-board-fqbn: ${{ matrix.arduino-boards-fqbn }}
arduino-platform: ${{ matrix.arduino-platform }}
platform-url: ${{ matrix.platform-url }}
required-libraries: ${{ env.REQUIRED_LIBRARIES }},${{ matrix.required-libraries }}
sketches-exclude: ${{ matrix.sketches-exclude }}
build-properties: ${{ toJson(matrix.build-properties) }}
extra-arduino-lib-install-args: "--no-deps"
extra-arduino-lib-install-args: "--no-deps" # suppress dependency resolving for libraries, here the "Adafruit Motor Shield V2 Library"
# debug-install: true
debug-compile: true
6 changes: 3 additions & 3 deletions examples/Basic/Basic.ino
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*
* Basic.cpp
*
* Implements basic car movements.
* Implements forward and backward movement for each 300 ms.
*
* Copyright (C) 2023 Armin Joachimsmeyer
* Copyright (C) 2023-2024 Armin Joachimsmeyer
* armin.joachimsmeyer@gmail.com
*
* This file is part of PWMMotorControl https://github.com/ArminJo/PWMMotorControl.
Expand Down Expand Up @@ -42,7 +42,7 @@
//#define L298_2WD_2LI_ION_VIN_IR_CONFIGURATION // L298_2WD_2LI_ION_BASIC + VIN voltage divider + IR distance
//#define L298_2WD_2LI_ION_VIN_IR_IMU_CONFIGURATION // L298_2WD_2LI_ION_BASIC + VIN voltage divider + IR distance + MPU6050
#include "RobotCarConfigurations.h" // sets e.g. CAR_HAS_ENCODERS, USE_ADAFRUIT_MOTOR_SHIELD
#include "RobotCarPinDefinitionsAndMore.h"
#include "RobotCarPinDefinitionsAndMore.h" // Pinout depends on settings like CAR_HAS_ENCODERS etc.
#include "PWMDcMotor.hpp"

PWMDcMotor rightCarMotor;
Expand Down
3 changes: 3 additions & 0 deletions examples/Basic/RobotCarConfigurations.h
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,9 @@
* BASIC CONFIGURATION for ESP32-Cam car
* Car controlled by an ESP32-Cam module
*/
#if defined(ESP32) // a temporarily hack
#define CAR_IS_ESP32_CAM_BASED
#endif
#if defined(CAR_IS_ESP32_CAM_BASED)
#define CAR_HAS_US_DISTANCE_SENSOR // A HC-SR04 ultrasonic distance sensor is mounted (default for most China smart cars)
#define CAR_HAS_DISTANCE_SERVO // Distance sensor is mounted on a pan servo (default for most China smart cars)
Expand Down
6 changes: 1 addition & 5 deletions examples/Basic/RobotCarPinDefinitionsAndMore.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@
#define LEFT_MOTOR_FORWARD_PIN 14 // IN1
#define LEFT_MOTOR_BACKWARD_PIN 15 // IN2
#define LEFT_MOTOR_PWM_PIN 13 // ENA - Must be PWM capable
#define ESP32_LEDC_MOTOR_CHANNEL 4 // leave first 4 channel for other purposes e.g. Servo and Light (channel 2)

// Not tested :-(
#define RIGHT_MOTOR_INTERRUPT 12
Expand All @@ -231,11 +232,6 @@
#define BUZZER_PIN 23
#endif

// for ESP32 LED_BUILTIN is defined as: static const uint8_t LED_BUILTIN 2
# if !defined(LED_BUILTIN) && !defined(CAR_IS_ESP32_CAM_BASED)
#define LED_BUILTIN PB1
# endif

#else // NANO_BASED
// Uno based
// Pin A0 for VCC monitoring - ADC channel 2
Expand Down
2 changes: 2 additions & 0 deletions examples/BasicDistance/ADCUtils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,8 @@ uint16_t getVoltageMillivoltWith_1_1VoltReference(uint8_t aADCChannelForVoltageM

/*
* Return true if sVCCVoltageMillivolt is > 4.3 V and < 4.95 V
* This does not really work for the UNO board, because it has no series Diode in the USB VCC
* and therefore a very low voltage drop.
*/
bool isVCCUSBPowered() {
readVCCVoltageMillivolt();
Expand Down
3 changes: 3 additions & 0 deletions examples/BasicDistance/RobotCarConfigurations.h
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,9 @@
* BASIC CONFIGURATION for ESP32-Cam car
* Car controlled by an ESP32-Cam module
*/
#if defined(ESP32) && !defined(CAR_IS_ESP32_CAM_BASED) // a temporarily hack
#define CAR_IS_ESP32_CAM_BASED
#endif
#if defined(CAR_IS_ESP32_CAM_BASED)
#define CAR_HAS_US_DISTANCE_SENSOR // A HC-SR04 ultrasonic distance sensor is mounted (default for most China smart cars)
#define CAR_HAS_DISTANCE_SERVO // Distance sensor is mounted on a pan servo (default for most China smart cars)
Expand Down
6 changes: 1 addition & 5 deletions examples/BasicDistance/RobotCarPinDefinitionsAndMore.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@
#define LEFT_MOTOR_FORWARD_PIN 14 // IN1
#define LEFT_MOTOR_BACKWARD_PIN 15 // IN2
#define LEFT_MOTOR_PWM_PIN 13 // ENA - Must be PWM capable
#define ESP32_LEDC_MOTOR_CHANNEL 4 // leave first 4 channel for other purposes e.g. Servo and Light (channel 2)

// Not tested :-(
#define RIGHT_MOTOR_INTERRUPT 12
Expand All @@ -231,11 +232,6 @@
#define BUZZER_PIN 23
#endif

// for ESP32 LED_BUILTIN is defined as: static const uint8_t LED_BUILTIN 2
# if !defined(LED_BUILTIN) && !defined(CAR_IS_ESP32_CAM_BASED)
#define LED_BUILTIN PB1
# endif

#else // NANO_BASED
// Uno based
// Pin A0 for VCC monitoring - ADC channel 2
Expand Down
3 changes: 3 additions & 0 deletions examples/BasicIRControl/RobotCarConfigurations.h
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,9 @@
* BASIC CONFIGURATION for ESP32-Cam car
* Car controlled by an ESP32-Cam module
*/
#if defined(ESP32) && !defined(CAR_IS_ESP32_CAM_BASED) // a temporarily hack
#define CAR_IS_ESP32_CAM_BASED
#endif
#if defined(CAR_IS_ESP32_CAM_BASED)
#define CAR_HAS_US_DISTANCE_SENSOR // A HC-SR04 ultrasonic distance sensor is mounted (default for most China smart cars)
#define CAR_HAS_DISTANCE_SERVO // Distance sensor is mounted on a pan servo (default for most China smart cars)
Expand Down
6 changes: 1 addition & 5 deletions examples/BasicIRControl/RobotCarPinDefinitionsAndMore.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@
#define LEFT_MOTOR_FORWARD_PIN 14 // IN1
#define LEFT_MOTOR_BACKWARD_PIN 15 // IN2
#define LEFT_MOTOR_PWM_PIN 13 // ENA - Must be PWM capable
#define ESP32_LEDC_MOTOR_CHANNEL 4 // leave first 4 channel for other purposes e.g. Servo and Light (channel 2)

// Not tested :-(
#define RIGHT_MOTOR_INTERRUPT 12
Expand All @@ -231,11 +232,6 @@
#define BUZZER_PIN 23
#endif

// for ESP32 LED_BUILTIN is defined as: static const uint8_t LED_BUILTIN 2
# if !defined(LED_BUILTIN) && !defined(CAR_IS_ESP32_CAM_BASED)
#define LED_BUILTIN PB1
# endif

#else // NANO_BASED
// Uno based
// Pin A0 for VCC monitoring - ADC channel 2
Expand Down
13 changes: 7 additions & 6 deletions examples/BasicIRControl/TinyIRReceiver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,17 +114,18 @@ volatile TinyIRReceiverCallbackDataStruct TinyIRReceiverData;
#warning "IR_INPUT_PIN is deprecated, use IR_RECEIVE_PIN"
#define IR_RECEIVE_PIN IR_INPUT_PIN
#endif

#if !defined(IR_RECEIVE_PIN)
#if defined(__AVR_ATtiny1616__) || defined(__AVR_ATtiny3216__) || defined(__AVR_ATtiny3217__)
# if defined(__AVR_ATtiny1616__) || defined(__AVR_ATtiny3216__) || defined(__AVR_ATtiny3217__)
#warning "IR_RECEIVE_PIN is not defined, so it is set to 10"
#define IR_RECEIVE_PIN 10
#elif defined(__AVR_ATtiny816__)
# elif defined(__AVR_ATtiny816__)
#warning "IR_RECEIVE_PIN is not defined, so it is set to 14"
#define IR_RECEIVE_PIN 14
#else
# else
#warning "IR_RECEIVE_PIN is not defined, so it is set to 2"
#define IR_RECEIVE_PIN 2
#endif
# endif
#endif

#if !defined(IR_FEEDBACK_LED_PIN) && defined(LED_BUILTIN)
Expand Down Expand Up @@ -323,7 +324,7 @@ void IRPinChangeInterruptHandler(void) {
* Check address parity
* Address is sent first and contained in the lower word
*/
if (TinyIRReceiverControl.IRRawData.UBytes[0] != (uint8_t) (~TinyIRReceiverControl.IRRawData.UBytes[1])) {
if (TinyIRReceiverControl.IRRawData.UBytes[0] != (uint8_t)(~TinyIRReceiverControl.IRRawData.UBytes[1])) {
#if defined(ENABLE_NEC2_REPEATS)
TinyIRReceiverControl.Flags |= IRDATA_FLAGS_PARITY_FAILED; // here we can have the repeat flag already set
#else
Expand All @@ -336,7 +337,7 @@ void IRPinChangeInterruptHandler(void) {
* Check command parity
*/
#if (TINY_RECEIVER_ADDRESS_BITS > 0)
if (TinyIRReceiverControl.IRRawData.UBytes[2] != (uint8_t) (~TinyIRReceiverControl.IRRawData.UBytes[3])) {
if (TinyIRReceiverControl.IRRawData.UBytes[2] != (uint8_t)(~TinyIRReceiverControl.IRRawData.UBytes[3])) {
#if defined(ENABLE_NEC2_REPEATS)
TinyIRReceiverControl.Flags |= IRDATA_FLAGS_PARITY_FAILED;
#else
Expand Down
3 changes: 3 additions & 0 deletions examples/BasicMecanum/RobotCarConfigurations.h
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,9 @@
* BASIC CONFIGURATION for ESP32-Cam car
* Car controlled by an ESP32-Cam module
*/
#if defined(ESP32) && !defined(CAR_IS_ESP32_CAM_BASED) // a temporarily hack
#define CAR_IS_ESP32_CAM_BASED
#endif
#if defined(CAR_IS_ESP32_CAM_BASED)
#define CAR_HAS_US_DISTANCE_SENSOR // A HC-SR04 ultrasonic distance sensor is mounted (default for most China smart cars)
#define CAR_HAS_DISTANCE_SERVO // Distance sensor is mounted on a pan servo (default for most China smart cars)
Expand Down
6 changes: 1 addition & 5 deletions examples/BasicMecanum/RobotCarPinDefinitionsAndMore.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@
#define LEFT_MOTOR_FORWARD_PIN 14 // IN1
#define LEFT_MOTOR_BACKWARD_PIN 15 // IN2
#define LEFT_MOTOR_PWM_PIN 13 // ENA - Must be PWM capable
#define ESP32_LEDC_MOTOR_CHANNEL 4 // leave first 4 channel for other purposes e.g. Servo and Light (channel 2)

// Not tested :-(
#define RIGHT_MOTOR_INTERRUPT 12
Expand All @@ -231,11 +232,6 @@
#define BUZZER_PIN 23
#endif

// for ESP32 LED_BUILTIN is defined as: static const uint8_t LED_BUILTIN 2
# if !defined(LED_BUILTIN) && !defined(CAR_IS_ESP32_CAM_BASED)
#define LED_BUILTIN PB1
# endif

#else // NANO_BASED
// Uno based
// Pin A0 for VCC monitoring - ADC channel 2
Expand Down
3 changes: 3 additions & 0 deletions examples/IRDispatcherControl/RobotCarConfigurations.h
Original file line number Diff line number Diff line change
Expand Up @@ -317,6 +317,9 @@
* BASIC CONFIGURATION for ESP32-Cam car
* Car controlled by an ESP32-Cam module
*/
#if defined(ESP32) && !defined(CAR_IS_ESP32_CAM_BASED) // a temporarily hack
#define CAR_IS_ESP32_CAM_BASED
#endif
#if defined(CAR_IS_ESP32_CAM_BASED)
#define CAR_HAS_US_DISTANCE_SENSOR // A HC-SR04 ultrasonic distance sensor is mounted (default for most China smart cars)
#define CAR_HAS_DISTANCE_SERVO // Distance sensor is mounted on a pan servo (default for most China smart cars)
Expand Down
6 changes: 1 addition & 5 deletions examples/IRDispatcherControl/RobotCarPinDefinitionsAndMore.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@
#define LEFT_MOTOR_FORWARD_PIN 14 // IN1
#define LEFT_MOTOR_BACKWARD_PIN 15 // IN2
#define LEFT_MOTOR_PWM_PIN 13 // ENA - Must be PWM capable
#define ESP32_LEDC_MOTOR_CHANNEL 4 // leave first 4 channel for other purposes e.g. Servo and Light (channel 2)

// Not tested :-(
#define RIGHT_MOTOR_INTERRUPT 12
Expand All @@ -231,11 +232,6 @@
#define BUZZER_PIN 23
#endif

// for ESP32 LED_BUILTIN is defined as: static const uint8_t LED_BUILTIN 2
# if !defined(LED_BUILTIN) && !defined(CAR_IS_ESP32_CAM_BASED)
#define LED_BUILTIN PB1
# endif

#else // NANO_BASED
// Uno based
// Pin A0 for VCC monitoring - ADC channel 2
Expand Down
20 changes: 10 additions & 10 deletions examples/IRDispatcherControl/RobotCarUtils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
* ENABLE_RTTTL_FOR_CAR
* VIN_VOLTAGE_CORRECTION
* ADC_INTERNAL_REFERENCE_MILLIVOLT
* TIMOUT_BEFORE_DEMO_MODE_STARTS_MILLIS
* TIMEOUT_BEFORE_DEMO_MODE_STARTS_MILLIS
* FOLLOWER_DISTANCE_MINIMUM_CENTIMETER
* FOLLOWER_DISTANCE_MAXIMUM_CENTIMETER
* US_DISTANCE_SENSOR_ENABLE_PIN
Expand Down Expand Up @@ -149,7 +149,11 @@ void printProgramOptions(Print *aSerial) {
aSerial->println();

#if defined(USE_BLUE_DISPLAY_GUI)
aSerial->println(F("If not powered by USB, run follower demo after " STR(TIMOUT_BEFORE_DEMO_MODE_STARTS_MILLIS) " ms"));
# if defined(ADC_UTILS_ARE_AVAILABLE)
aSerial->print(
F("If not powered by USB, run follower demo after " STR(TIMEOUT_BEFORE_DEMO_MODE_STARTS_MILLIS) " ms. USBpowered="));
aSerial->println(isVCCUSBPowered());
# endif
#endif

aSerial->println(
Expand Down Expand Up @@ -178,7 +182,7 @@ void initRobotCarPWMMotorControl() {
BACK_LEFT_MOTOR_FORWARD_PIN, BACK_LEFT_MOTOR_BACKWARD_PIN);
#else
RobotCar.init(RIGHT_MOTOR_FORWARD_PIN, RIGHT_MOTOR_BACKWARD_PIN, RIGHT_MOTOR_PWM_PIN, LEFT_MOTOR_FORWARD_PIN,
LEFT_MOTOR_BACKWARD_PIN, LEFT_MOTOR_PWM_PIN);
LEFT_MOTOR_BACKWARD_PIN, LEFT_MOTOR_PWM_PIN);
#endif
}

Expand Down Expand Up @@ -346,7 +350,7 @@ void calibrateDriveSpeedPWMAndPrint() {
RobotCar.stop();

#if defined(USE_BLUE_DISPLAY_GUI)
isPWMCalibrated = true;
isPWMCalibrated = true;
#endif
}
#endif // #if defined(VIN_ATTENUATED_INPUT_PIN)
Expand Down Expand Up @@ -477,9 +481,7 @@ bool calibrateRotation(turn_direction_t aTurnDirection) {
void testDriveTwoTurnsBothDirections() {
#define NUMBER_OF_TEST_DRIVES 2
#if defined(ENABLE_SERIAL_OUTPUT) // requires 1504 bytes program space
Serial.print(F("Move the wheels 2x a full turn i.e. "));
Serial.print(DEFAULT_CIRCUMFERENCE_MILLIMETER);
Serial.println(F(" mm, both directions"));
Serial.print(F("Move the wheels 2x a full turn i.e. " STR(DEFAULT_CIRCUMFERENCE_MILLIMETER) " mm, both directions"));
#endif
for (int i = 0; i < NUMBER_OF_TEST_DRIVES; ++i) {
RobotCar.goDistanceMillimeter(DEFAULT_CIRCUMFERENCE_MILLIMETER);
Expand All @@ -500,9 +502,7 @@ void testDriveTwoTurnsBothDirections() {
void testDriveTwoTurnsIn5PartsBothDirections() {
uint8_t tDirection = DIRECTION_FORWARD;
#if defined(ENABLE_SERIAL_OUTPUT) // requires 1504 bytes program space
Serial.print(F("Move the wheels 2x 1/8 + 1/4 + 1/2 + 1 turn i.e. "));
Serial.print(2 * DEFAULT_CIRCUMFERENCE_MILLIMETER);
Serial.println(F(" mm, both directions"));
Serial.print(F("Move the wheels 2x 1/8 + 1/4 + 1/2 + 1 turn i.e. " STR(2 * DEFAULT_CIRCUMFERENCE_MILLIMETER)" mm, both directions"));
#endif
for (int i = 0; i < 2; ++i) {
RobotCar.goDistanceMillimeter(DEFAULT_CIRCUMFERENCE_MILLIMETER / 8, tDirection);
Expand Down
13 changes: 7 additions & 6 deletions examples/IRDispatcherControl/TinyIRReceiver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,17 +114,18 @@ volatile TinyIRReceiverCallbackDataStruct TinyIRReceiverData;
#warning "IR_INPUT_PIN is deprecated, use IR_RECEIVE_PIN"
#define IR_RECEIVE_PIN IR_INPUT_PIN
#endif

#if !defined(IR_RECEIVE_PIN)
#if defined(__AVR_ATtiny1616__) || defined(__AVR_ATtiny3216__) || defined(__AVR_ATtiny3217__)
# if defined(__AVR_ATtiny1616__) || defined(__AVR_ATtiny3216__) || defined(__AVR_ATtiny3217__)
#warning "IR_RECEIVE_PIN is not defined, so it is set to 10"
#define IR_RECEIVE_PIN 10
#elif defined(__AVR_ATtiny816__)
# elif defined(__AVR_ATtiny816__)
#warning "IR_RECEIVE_PIN is not defined, so it is set to 14"
#define IR_RECEIVE_PIN 14
#else
# else
#warning "IR_RECEIVE_PIN is not defined, so it is set to 2"
#define IR_RECEIVE_PIN 2
#endif
# endif
#endif

#if !defined(IR_FEEDBACK_LED_PIN) && defined(LED_BUILTIN)
Expand Down Expand Up @@ -323,7 +324,7 @@ void IRPinChangeInterruptHandler(void) {
* Check address parity
* Address is sent first and contained in the lower word
*/
if (TinyIRReceiverControl.IRRawData.UBytes[0] != (uint8_t) (~TinyIRReceiverControl.IRRawData.UBytes[1])) {
if (TinyIRReceiverControl.IRRawData.UBytes[0] != (uint8_t)(~TinyIRReceiverControl.IRRawData.UBytes[1])) {
#if defined(ENABLE_NEC2_REPEATS)
TinyIRReceiverControl.Flags |= IRDATA_FLAGS_PARITY_FAILED; // here we can have the repeat flag already set
#else
Expand All @@ -336,7 +337,7 @@ void IRPinChangeInterruptHandler(void) {
* Check command parity
*/
#if (TINY_RECEIVER_ADDRESS_BITS > 0)
if (TinyIRReceiverControl.IRRawData.UBytes[2] != (uint8_t) (~TinyIRReceiverControl.IRRawData.UBytes[3])) {
if (TinyIRReceiverControl.IRRawData.UBytes[2] != (uint8_t)(~TinyIRReceiverControl.IRRawData.UBytes[3])) {
#if defined(ENABLE_NEC2_REPEATS)
TinyIRReceiverControl.Flags |= IRDATA_FLAGS_PARITY_FAILED;
#else
Expand Down
Loading

0 comments on commit 8506dd9

Please sign in to comment.