minor fixes and cleanups
- new delay concept for aprsis to rf / kiss to rf / serial tnc to rf -> prevents flooding rf channel - work on code handling variable nextTX (fix cleanup). - Course-change.detection ignored on high speed: During review of my code I saw if nextTX was set to 1 due to course change, it was re-set in the next tests below to sb_min_intervali. if current speed was >= sb_max_speed. - if we TXed in the last round and have in this round detected a course change, we don't TX this round; we now remember that condition for the next rounds until 5-20s time has passed): if (tmp_t_since_last_sb_tx >= (6000000L / lora_speed) && (lastPositionTX + nextTX) < millis()) .. Signed-off-by: Thomas Osterried <dl9sau@darc.de>master
rodzic
599870ae0c
commit
fa60f15ea7
|
@ -7389,9 +7389,9 @@ invalid_packet:
|
|||
|
||||
boolean display_was_updated = false;
|
||||
ulong tmp_t_since_last_sb_tx = millis() - lastPositionTX;
|
||||
static boolean reason_course_change = 0; // used as hint for sendpacket. static, because
|
||||
// we may not be sure (if we are not TXing now but in one of the next rounds)
|
||||
// when looking at nextTX == 0: was the reason a course change
|
||||
static boolean reason_course_change = false; // used as hint for sendpacket. static, because
|
||||
// we may not be sure (if we are not TXing now but in one of the next rounds)
|
||||
// when looking at nextTX == 0: was the reason a course change
|
||||
|
||||
// Send position, if not requested to do not ;) But enter this part if user likes our LA/LON/SPD/CRS to be displayed on his screen ('!gps_allow_sleep_while_kiss' caused 'gps_state false')
|
||||
if (!gps_state && (!dont_send_own_position_packets || !(lora_tx_enabled || aprsis_enabled)))
|
||||
|
@ -7507,7 +7507,7 @@ invalid_packet:
|
|||
writedisplaytext(" ((TX))","",OledLine2,OledLine3,OledLine4,OledLine5);
|
||||
}
|
||||
sendpacket(SP_POS_GPS | (reason_course_change ? SP_ENFORCE_COURSE : 0 ));
|
||||
reason_course_change = 0;
|
||||
reason_course_change = false;
|
||||
// for fixed beacon (if we loose gps fix, we'll send our last position in fix_beacon_interval)
|
||||
// We just transmitted. We transmitted due to turn (nextTX == 1)? Also Don't TX again in next round, sendpacket() adjustet nextTX
|
||||
} else {
|
||||
|
|
Ładowanie…
Reference in New Issue