This commit changes the way libraries headers are included in source files:
- If the header is in the same directory the source belongs to, so the
notation '#include ""' is used with the path relative to the directory
containing the source.
- If the header is outside the directory containing the source, then we use
the notation '#include <>' with the path relative to libraries folder.
Some of the advantages of such approach:
- Only one search path for libraries headers.
- OSs like Windows may have a better lookup time.
- Disabled fail-safe output when signal is missing in PPM pass-trough (PPMSUM) mode (feature depreciated by addition of missing signal detection in APM code)
- ppm_encoder_init() will now make sure PPM output always starts with fail-safe (900us) value on throttle after a brown-out reset
- New interrupt system that handles certain Futaba receivers better (simultaneous changes on groups of R/C channels in fast intervals)
- Improved active channel detection requering 100 valid pulses before channel is marked active
- Removed forced throttle fail-safe after channel loss
- Lost channel detection signal for APM by setting channel output to 800us (not activated yet, need APM code to handle signals)
---------------------------------------------
- New improved fail-safe detection and handeling for single or multible signal loss and receiver malfuntion
- Improved LED status for APM 2.x
- Improved jitter performance (PPM output using nested interrupts)
-------------------------------------------------------------
ARDUPPM OPERATIONAL DESCRIPTION
-------------------------------------------------------------
APM 2.x LED STATUS:
-------------------
RX - OFF = No input signal detected
RX - SLOW TOGGLE = Input signal OK
RX - FAST TOGGLE = Invalid input signal(s) detected
RX - ON = Input signal(s) lost during flight and fail-safe activated
TX - OFF = PPM output disabled
TX - FAST TOGGLE = PPM output enabled
TX - SLOW TOGGLE = PPM pass-trough mode
SERVO INPUT (PWM) MODE:
-----------------------
- PPM output will not be enabled unless a input signal has been detected and verified
- Verified inputs are lost during operaton (lose servo wire or receiver malfunction):
+ The PPM output channel for the lost input will be set to the default fail-safe value
+ PPM throttle output (ch3) will be permanently set to fail-safe (900us)
- Lost channel signal is restored:
+ PPM output for the restored channel will be updated with the valid signal
+ PPM throttle output (ch3) will not be restored, and will continue to output fail-safe (900us)
PPM PASS-THROUGH MODE (signal pin 2&3 shorted):
-----------------------------------------------
- PPM output will not be enabled unless a input signal has been detected
- Active signal on input channel 1 has been detected:
+ Any input level changes will be passed directly to the PPM output (PPM pass-trough)
+ If no input level changes are detected withing 250ms:
+ PPM output is enabled and default fail-safe values for all eight channels transmitted
+ Input level change detected again, PPM fail-safe output is terminated and normal PPM pass-through operation is restored
PPM polarity reversing was not working when changing the Output PPM pin level before timer 1 / output compare init. The compare generator initialization was reverting the pin to low level. Instead of that a force match compare is used after timer / compare generator init to set the PPM output to high level.
Reworked the PPM decoder (i did forget the sync symbol pre-pulse)
Splitted pre-pulse and pulse width variable for better reliability and easier processing
Base algorithm added for channel count auto detection in the decoder himself.
Replaced the #define for PPM_CHx_CHANNELS by PPM_CHx_MAX_CHANNELS.
Channel count #define was not needed anymore thanks to the channel count auto detection.
Channel detection post processing to do.
Work in progress on a new Redundancy dual PPM sum mode for PPM encoder.
- New library PPM_Encoder_v3.h and new manual manual_v3.txt
- New format conversion capability between input and output PPM frame timings and channel count.
This will be experimental until heavily tested. The main goal is to allow the use of low cost satellite receivers in a high safety setup, and allow a new teacher / student RC mode without link between the two pilot transmitters.
- Added APM2 (ATmega32U2) support for using TX and RX status leds to indicate PWM and PPM traffic
<RX><OFF> no pwm input detected
<RX><TOGGLE> speed of toggle indicate how many channels are active
<RX><ON> input lost (failsafe)
<TX><OFF> ppm output not started
<TX><FAST TOGGLE> normal PWM->PPM output or PPM passtrough failsafe
<TX><SLOW TOGGLE> PPM passtrough