Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variometer not worked without LCD #13

Open
wants to merge 2 commits into
base: upstream_shared
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Alarms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -692,13 +692,17 @@ void vario_output(uint16_t d, uint8_t up) {
uint8_t d1 = d/2;
#endif
if (d1<1) d1 = 1;
#if defined (LCD_CONF) || defined(LCD_TELEMETRY) || defined(HAS_LCD)
for (uint8_t i=0; i<d1; i++) LCDprint(s1);
#endif
#ifndef VARIOMETER_SINGLE_TONE
uint8_t s2 = (up ? 0x07 : 0x05);
uint8_t d2 = d-d1;
if (d2<1) d2 = 1;
#if defined (LCD_CONF) || defined(LCD_TELEMETRY) || defined(HAS_LCD)
for (uint8_t i=0; i<d2; i++) LCDprint(s2);
#endif
#endif
}

#endif
Expand Down
26 changes: 26 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Multiwii 2.4 with autoland on battery fail

This is based on official Multiwii 2.4 code.

This feature allow to setup a warning level.After the battery reach this level copter autoland safely and smoothly.
If you try to take off with bad battery, system will disable arming and give you alarm "take off is not safe"

How it works:
-
- You need a GPS (mandatory): before land , copter must be leveled and stopped to land verticaly so gps is needed to know copter velocity)
- Need a buzzer (optional): before start landing you can choose at how many buzzing warning autoland start (between 3 and 6 buzz, 3 to disable false alarm like on heavy climb, and 6 max to be safe)
- If battery level is under "Warning level 2" you are not allowed to arm your copter
- If battery level reach "Warning level 2" during flight and reach your alarm thershold number, copter stop what's is doing (mission, manual flight, hold , return to home ect) and automaticly goes in "GPS hold"
- When copter stop moving, slowly decrease throttle and land.
- After landed, motors shutdown

How to use it:
-
in "config.h" file:

- you need to enable "vbat" : #define VBAT
- you need to enable "vbat autoland feature" : #define VBAT_ALAND
- you need to chosse "alarm counting" (the value is how many warning before start autoland process) : #define VBAT_ALAND_CNT 3
- that's all...

Olivier