Now with axp1201 support (T-BEAM V1.2)

- Support for T-BEAM V1.2 (axp1201 power chip),
  T-BEAM V1.1 and V.0 used the axp192.
  Unfortunately, this new chip is not able to read current load.
  In the case of telemetry, we do not drop the current readings (but set it
  to 0). This notation may change in future.

- Feature for needed in SP:
  enable TX on main and secondary frequency as user.
  (new commit, had a bug)

Signed-off-by: Thomas Osterried <dl9sau@darc.de>
pull/12/head
Thomas Osterried 2023-07-15 13:23:04 +02:00
rodzic 5a1a6d7d5a
commit 02dedd3517
3 zmienionych plików z 6 dodań i 6 usunięć

Wyświetl plik

@ -464,7 +464,7 @@ III: Values above are referring to latitude; distance between two latitudes is a
<option value="1">TX on main frequency</option>
<option value="2">TX on secondary frequency</option>
<option value="3">TX on both frequencies</option>
<option value="4">(TX on both frequencies as USER - not recommended, needed in SP)</option>
<option value="5">(TX on both frequencies as USER - not recommended, needed in SP)</option>
<option value="0">Don't send our beacon on RF (but only to kiss and to APRS-IS)</option>
</select>
</div>

Wyświetl plik

@ -440,7 +440,7 @@ uint8_t lora_cross_digipeating_mode = 0; // 0: disable cross freq digipeating. 1
#define FLAG_ADD_SNR_RSSI_FOR_APRSIS__ONLY_IF_HEARD_DIRECT 32
uint8_t lora_add_snr_rssi_to_path = (FLAG_ADD_SNR_RSSI_FOR_KISS | FLAG_ADD_SNR_RSSI_FOR_APRSIS__ONLY_IF_HEARD_DIRECT); // Add snr+rssi to path. May become default, after it proves it behaves good to our network
boolean kiss_add_snr_rssi_to_path_at_position_without_digippeated_flag = 1; // Add snr+rssi at last digipeater, without digipeated flag, at last position in path. Set to 1, if you pass data to aprs-is. Set to 0 if you pass data to your favourite digipeater software. We need this hack because our rssi-encoded data should not be interpreted as "(last ==) direct heard station" in the aprs-is net.
int tx_own_beacon_from_this_device_or_fromKiss__to_frequencies = 1; // TX own beacon generated from this device or our beacon from from-kiss on following frequencies. Only if lora_digipeating_mode > 1 (we are a WIDE1 or WIDE2 digi). 1: main freq. 2: cross_digi_freq. 3: both frequencies. 4: special case for SP (allow sending on both frequencies, even if wie are not a WIDE digi; not recommended)
int tx_own_beacon_from_this_device_or_fromKiss__to_frequencies = 1; // TX own beacon generated from this device or our beacon from from-kiss on following frequencies. Only if lora_digipeating_mode > 1 (we are a WIDE1 or WIDE2 digi). 1: main freq. 2: cross_digi_freq. 3: both frequencies. 5: special case for SP (allow sending on both frequencies, even if wie are not a WIDE digi; not recommended)
boolean tx_own_beacon_from_this_device_or_fromKiss__to_aprsis = true; // TX own beacon generated from this device or our beacon from from-kiss to aprs-is.
int rx_on_frequencies = 1; // RX freq. Only if lora_digipeating_mode < 2 (we are a user) 1: main freq. 2: cross_digi_freq. 3: both frequencies
@ -921,7 +921,7 @@ void sendpacket(uint8_t sp_flags){
if (lora_tx_enabled && tx_own_beacon_from_this_device_or_fromKiss__to_frequencies) {
if (tx_own_beacon_from_this_device_or_fromKiss__to_frequencies % 2)
loraSend(txPower, lora_freq, lora_speed, (sp_flags & SP_ENFORCE_COURSE) ? LORA_FLAGS_NODELAY : 0, outString); //send the packet, data is in TXbuff from lora_TXStart to lora_TXEnd
if (((tx_own_beacon_from_this_device_or_fromKiss__to_frequencies > 1 && lora_digipeating_mode > 1) || tx_own_beacon_from_this_device_or_fromKiss__to_frequencies == 4) && lora_freq_cross_digi > 1.0 && lora_freq_cross_digi != lora_freq)
if (((tx_own_beacon_from_this_device_or_fromKiss__to_frequencies > 1 && lora_digipeating_mode > 1) || tx_own_beacon_from_this_device_or_fromKiss__to_frequencies == 5) && lora_freq_cross_digi > 1.0 && lora_freq_cross_digi != lora_freq)
loraSend(txPower_cross_digi, lora_freq_cross_digi, lora_speed_cross_digi, (sp_flags & SP_ENFORCE_COURSE) ? LORA_FLAGS_NODELAY : 0, outString); //send the packet, data is in TXbuff from lora_TXStart to lora_TXEnd
}
lastTX = millis();
@ -4805,7 +4805,7 @@ void handle_usb_serial_input(void) {
loraSend(txPower, lora_freq, lora_speed, 0, inputBuf); //send the packet, data is in TXbuff from lora_TXStart to lora_TXEnd
esp_task_wdt_reset();
}
if (((tx_own_beacon_from_this_device_or_fromKiss__to_frequencies > 1 && lora_digipeating_mode > 1) || tx_own_beacon_from_this_device_or_fromKiss__to_frequencies == 4) && lora_freq_cross_digi > 1.0 && lora_freq_cross_digi != lora_freq) {
if (((tx_own_beacon_from_this_device_or_fromKiss__to_frequencies > 1 && lora_digipeating_mode > 1) || tx_own_beacon_from_this_device_or_fromKiss__to_frequencies == 5) && lora_freq_cross_digi > 1.0 && lora_freq_cross_digi != lora_freq) {
loraSend(txPower_cross_digi, lora_freq_cross_digi, lora_speed_cross_digi, 0, inputBuf); //send the packet, data is in TXbuff from lora_TXStart to lora_TXEnd
esp_task_wdt_reset();
}
@ -5348,7 +5348,7 @@ debug_bestHdop = bestHdop;
if (lora_tx_enabled) {
if (tx_own_beacon_from_this_device_or_fromKiss__to_frequencies % 2)
loraSend(txPower, lora_freq, lora_speed, 0, String(data)); //send the packet, data is in TXbuff from lora_TXStart to lora_TXEnd
if (((tx_own_beacon_from_this_device_or_fromKiss__to_frequencies > 1 && lora_digipeating_mode > 1) || tx_own_beacon_from_this_device_or_fromKiss__to_frequencies == 4) && lora_freq_cross_digi > 1.0 && lora_freq_cross_digi != lora_freq)
if (((tx_own_beacon_from_this_device_or_fromKiss__to_frequencies > 1 && lora_digipeating_mode > 1) || tx_own_beacon_from_this_device_or_fromKiss__to_frequencies == 5) && lora_freq_cross_digi > 1.0 && lora_freq_cross_digi != lora_freq)
loraSend(txPower_cross_digi, lora_freq_cross_digi, lora_speed_cross_digi, 0, String(data)); //send the packet, data is in TXbuff from lora_TXStart to lora_TXEnd
enableOled(); // enable OLED
writedisplaytext("((KISSTX))","",String(data),"","","");

Wyświetl plik

@ -1498,7 +1498,7 @@ void do_send_status_message_about_connect_to_aprsis(void) {
esp_task_wdt_reset();
loraSend(txPower, lora_freq, lora_speed, 0, outString); //send the packet, data is in TXbuff from lora_TXStart to lora_TXEnd
}
if (((tx_own_beacon_from_this_device_or_fromKiss__to_frequencies > 1 && lora_digipeating_mode > 1) || tx_own_beacon_from_this_device_or_fromKiss__to_frequencies == 4) && lora_freq_cross_digi > 1.0 && lora_freq_cross_digi != lora_freq) {
if (((tx_own_beacon_from_this_device_or_fromKiss__to_frequencies > 1 && lora_digipeating_mode > 1) || tx_own_beacon_from_this_device_or_fromKiss__to_frequencies == 5) && lora_freq_cross_digi > 1.0 && lora_freq_cross_digi != lora_freq) {
esp_task_wdt_reset();
loraSend(txPower_cross_digi, lora_freq_cross_digi, lora_speed_cross_digi, 0, outString); //send the packet, data is in TXbuff from lora_TXStart to lora_TXEnd
}