Rev 728 | Rev 735 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 728 | Rev 734 | ||
---|---|---|---|
Line 54... | Line 54... | ||
54 | 54 | ||
55 | /* ########################################################################## |
55 | /* ########################################################################## |
56 | * global definitions and global vars |
56 | * global definitions and global vars |
Line 57... | Line -... | ||
57 | * ##########################################################################*/ |
- | |
58 | - | ||
59 | volatile uint16_t setsReceived = 0; |
57 | * ##########################################################################*/ |
60 | 58 | ||
Line 61... | Line 59... | ||
61 | volatile NaviData_t naviData; |
59 | volatile NaviData_t naviData; |
62 | volatile DebugOut_t debugData; |
60 | volatile DebugOut_t debugData; |
Line 380... | Line 378... | ||
380 | Decode64(); |
378 | Decode64(); |
381 | debugData = *((DebugOut_t*) pRxData); |
379 | debugData = *((DebugOut_t*) pRxData); |
Line 382... | Line 380... | ||
382 | 380 | ||
383 | // init on first data retrival, distinguished by last battery :) |
381 | // init on first data retrival, distinguished by last battery :) |
- | 382 | if (last_UBat == 255) { |
|
384 | if (last_UBat == 255) { |
383 | if (debugData.Analog[9] > 40) |
385 | // fix for min_UBat |
384 | // fix for min_UBat |
386 | min_UBat = debugData.Analog[9]; |
385 | min_UBat = debugData.Analog[9]; |
387 | last_UBat = debugData.Analog[9]; |
386 | last_UBat = debugData.Analog[9]; |
- | 387 | init_cosd(last_UBat); |
|
388 | init_cosd(last_UBat); |
388 | } |
389 | } else { |
389 | } else { |
390 | osd_fcmode(); |
390 | osd_fcmode(); |
391 | } |
391 | } |
392 | } |
392 | } |
Line 395... | Line 395... | ||
395 | Decode64(); |
395 | Decode64(); |
396 | naviData = *((NaviData_t*) pRxData); |
396 | naviData = *((NaviData_t*) pRxData); |
Line 397... | Line 397... | ||
397 | 397 | ||
398 | // init on first data retrival, distinguished by last battery :) |
398 | // init on first data retrival, distinguished by last battery :) |
- | 399 | if (last_UBat == 255) { |
|
399 | if (last_UBat == 255) { |
400 | if (naviData.UBat > 40) { |
400 | // fix for min_UBat |
401 | // fix for min_UBat |
401 | min_UBat = naviData.UBat; |
402 | min_UBat = naviData.UBat; |
402 | last_UBat = naviData.UBat; |
403 | last_UBat = naviData.UBat; |
- | 404 | init_cosd(last_UBat); |
|
403 | init_cosd(last_UBat); |
405 | } |
404 | } else { |
406 | } else { |
405 | osd_ncmode(); |
407 | osd_ncmode(); |
406 | } |
408 | } |
407 | } |
409 | } |