Jan 06, 2012, 12:06 AM Registered User Florida Joined Mar 2007 1,047 Posts also in text.h, I added this to only print rssi level if that sensor is enabled. #ifdef SENSOR_RSSI_ENABLED return printNumberWithUnit(str, pos, rssiLevel, "%"); #endif //SENSOR_RSSI_ENABLED return pos;
Jan 06, 2012, 12:33 AM
Registered User
Florida
Joined Mar 2007
1,047 Posts
I got the LOS angle thing and low angle alarm working!! (well I think anyway, I have tried driving around, but not flying yet)

in alarms.h
Quote:
 static uint16_t gAlarmLOSRatioLow = 0;
and set variable:
Quote:
 #ifdef ALARM_LOS_RATIO_LOW gAlarmLOSRatioLow = gGpsLastValidData.losRatio < ALARM_LOS_RATIO_LOW; #endif
Quote:
 gGpsLastValidData.losAngle = 0; gGpsLastValidData.losRatio = 0; #ifdef GPS_MIN_LOS_ANGLE_DISTANCE ////only try to calculate the angle if greater than a preset distance from home if (gHomeDistance > GPS_MIN_LOS_ANGLE_DISTANCE) { gGpsLastValidData.losRatio = ((gGpsLastValidData.pos.altitude - gHomePos.altitude)*1000)/gHomeDistance; gGpsLastValidData.losAngle = getLOSAngle(gGpsLastValidData.losRatio); } #endif
in Config.h add definition for minimum home distance to calculate angle:
Quote:
 #define GPS_MIN_LOS_ANGLE_DISTANCE 300 // min distance the los angle and alarm are calculated
also add minimum LOS angle ratio (basically a ratio will equate to an angle)
Quote:
 #define ALARM_LOS_RATIO_LOW 268 //This number is (height * 1000)/distance, select the number that equates the angle you want to alarm on //176 = 10 degrees, 268 = 15 degrees, 364 = 20 degrees, 466 = 25 degrees //this is more accurate than using just the displayed angle.
in gpsutils.h, added losAngle and losRatio to TGpsData structure
Quote:
 typedef struct { TGpsPos pos; uint32_t gTime; uint8_t fix; uint8_t sats; uint16_t speed; uint16_t angle; uint32_t date; uint8_t checksumValid; uint16_t losAngle; uint16_t losRatio; } TGpsData;
Quote:
 static uint16_t getLOSAngle( uint8_t losRatio) { uint16_t retval = 1; //this should also handle negative angles, maybe for someone flying from a cliff?? if (losRatio < 0) { losRatio = -losRatio; retval = -1; } if(losRatio < 44) retval = 0; else if (losRatio >= 44 && losRatio < 132) retval = retval * 5; else if (losRatio >= 132 && losRatio < 222) retval = retval * 10; else if (losRatio >= 222 && losRatio < 315) retval = retval * 15; else if (losRatio >= 315 && losRatio < 414) retval = retval * 20; else if (losRatio >= 414 && losRatio < 521) retval = retval * 25; else if (losRatio >= 521 && losRatio < 637) retval = retval * 30; else if (losRatio >= 637 && losRatio < 767) retval = retval * 35; else if (losRatio >= 767 && losRatio < 916) retval = retval * 40; else if (losRatio >= 916 && losRatio < 1091) retval = retval * 45; else if (losRatio >= 1091 && losRatio < 1303) retval = retval * 50; else if (losRatio >= 1303 && losRatio < 1570) retval = retval * 55; else if (losRatio >= 1570 && losRatio < 1921) retval = retval * 60; else if (losRatio >= 1921 && losRatio < 2414) retval = retval * 65; else if (losRatio >= 2414 && losRatio < 3172) retval = retval * 70; else if (losRatio >= 3172 && losRatio < 4511) retval = retval * 75; else if (losRatio >= 4511 && losRatio < 7596) retval = retval * 80; else if (losRatio >= 7596 && losRatio < 22904) retval = retval * 85; else retval = retval * 90; return retval; }
in layout.h, after printing the home distance add:
Quote:
 if (gHomePosSet && gGpsLastValidData.losRatio != 0) { if (!gAlarmLOSRatioLow || gBlink1Hz) pos = printNumber(gText[textId], 10, gGpsLastValidData.losAngle); }
then add label for the angle (and I also changed the lable from LOS to DIS)
Quote:
 pos = printText(gText[textId], 0, "SPD"); pos = printText(gText[textId], 5, "DIS"); pos = printText(gText[textId], 10, "ANG");
 Jan 08, 2012, 04:44 AM Suspended Account United States, FL, Maitland Joined Apr 2011 2,109 Posts I have firmware from code compiled on december 6th. Is there a reason to flash to newer revision? So far it has been working fine, so that's why I ask.
 Jan 08, 2012, 02:27 PM CL-OSD developer Sverige, Östergötlands Län, Linköping Joined Apr 2011 279 Posts Have a look here for the latest commits: http://code.google.com/p/cl-osd/source/list All wiki changes will show in that list as well, don't know why...
 Jan 08, 2012, 03:03 PM Registered User Joined Dec 2011 30 Posts @callelj - Is it possible to print black letters or white letters with a black border or is the hardware the limiting factor? Regards Joern
 Jan 08, 2012, 03:05 PM CL-OSD developer Sverige, Östergötlands Län, Linköping Joined Apr 2011 279 Posts Joern: No it's not possible. At least not without significantly changing the hardware.
Jan 08, 2012, 03:15 PM
Registered User
Joined Dec 2011
30 Posts
Quote:
 Originally Posted by callelj Joern: No it's not possible. At least not without significantly changing the hardware.
Thanks for your quick answers. Is it possible to heighten the darkness of the grey field under the white letters and numbers? I read something about to change the value of one resistor. Is this also possible due to a software change?

Regards
Joern
Jan 08, 2012, 03:39 PM
Registered User
Joined Sep 2011
45 Posts
Quote:
 Is this also possible due to a software change?
No it's not.
Jan 09, 2012, 12:46 AM
Expert
Joined Mar 2007
95 Posts
all real
but speed in statistics is wrong

# Images

Jan 09, 2012, 02:10 AM
Suspended Account
United States, FL, Maitland
Joined Apr 2011
2,109 Posts
Quote:
 Originally Posted by redsonic all real but speed in statistics is wrong
yes thats from gps glitch. sometimes it will get a location that isnt accurate, making a fake speed
Jan 09, 2012, 02:12 AM
Suspended Account
United States, FL, Maitland
Joined Apr 2011
2,109 Posts
 Ponce Inlet FPV compilation (7 min 27 sec)
 Jan 09, 2012, 02:34 AM Registered User New Zealand, Auckland Joined Oct 2010 553 Posts Thats looking and working well, what release/version is that? im still on r72, working well but the faster upate speed you have is motivation to reflash
 Jan 09, 2012, 02:38 AM Suspended Account United States, FL, Maitland Joined Apr 2011 2,109 Posts december 6th not sure what build but my config.h is from 12/6/2011 7:38pm. i lost all my files so my osd folder went bye bye but i did have a backup of my config.h because i really really didn't want to remeasure 100% and 0% rssi voltages from my receiver again. actually just so i dont lose it i'll type it here so I can go to this post if needed haha #define SENSOR_RSSI_MAX_VOLTAGE 2.0 //(Max two digits after the dot) #define SENSOR_RSSI_MIN_VOLTAGE 0.20 //use 100-result for grssivalue
Jan 09, 2012, 11:11 AM
Suspended Account
Joined Jan 2011
255 Posts
Just followed the Compiling and Programming, and i thought it was easier than i thought but when i tested it i just found out that i didnt touch anything on the board and theres no changes on the display, here are the pictures of the connections and a video of what i did.

 CL-OSD compling and programming (2 min 44 sec)

Jan 09, 2012, 12:51 PM
Registered User
Joined Dec 2011
30 Posts
Quote:
 Originally Posted by Zombee Just followed the Compiling and Programming, and i thought it was easier than i thought but when i tested it i just found out that i didnt touch anything on the board and theres no changes on the display, here are the pictures of the connections and a video of what i did. http://www.youtube.com/watch?v=Rej45Y9LIAQ
Use this command line:

avrdude.exe -p m88p -c usbasp -U flash:w:"cl-osd.hex" -U eeprom:w:"cl-osd.eep

The "m88p" make the difference...

Regards
Joern