primer test respuesta igate

This commit is contained in:
richonguzman 2023-02-15 14:59:13 -03:00
parent 3b2f231db0
commit 62fcc129ee
2 changed files with 9 additions and 2 deletions

BIN
.DS_Store vendored

Binary file not shown.

View file

@ -91,13 +91,20 @@ void procesa_y_sube_APRS_IS(String mensaje) {
void valida_y_procesa_packet(String mensaje) {
String packetStart = "";
String packetStart2 = "";
Serial.print("MENSAJE RECIBIDO!!! ");
Serial.print("(Validando inicio ---> ");
packetStart = mensaje.substring(0, 3);
packetStart2 = mensaje.substring(0, 3);
if (packetStart == "\x3c\xff\x01") {
Serial.println("Packet Valido)");
procesa_y_sube_APRS_IS(mensaje);
} else {
}else if (packetStart2 == "\x77\x65\x61") {
LoRa.beginPacket();
LoRa.print("hello from iGate");
LoRa.endPacket();
Serial.println("enviando_lora");
} else {
Serial.println("Packet NO Valido)");
}
}
@ -121,7 +128,7 @@ void loop() {
receivedPacket += (char)inChar;
}
valida_y_procesa_packet(receivedPacket); //Serial.println("Mensaje Recibido : " + String(receivedPacket));
}
};
uint32_t lastTx = millis() - lastTxTime;
if (lastTx >= BeaconInterval) {