This commit is contained in:
geeksville
2020-02-01 16:05:12 -08:00
parent 76f4b92790
commit 490331f3cd
4 changed files with 75 additions and 21 deletions

View File

@@ -69,6 +69,7 @@ bool MeshRadio::init() {
ErrorCode MeshRadio::sendTo(NodeNum dest, const uint8_t *buf, size_t len) {
Serial.println("Sending...");
return manager.sendtoWait((uint8_t *) buf, len, dest);
}
@@ -91,11 +92,9 @@ void mesh_loop()
radio.loop();
delay(1000); // Wait 1 second between transmits, could also 'sleep' here!
Serial.println("Transmitting..."); // Send a message to rf95_server
char radiopacket[20] = "Hello World # ";
sprintf(radiopacket, "hello %d", packetnum++);
Serial.println("Sending...");
radio.sendTo(NODENUM_BROADCAST, (uint8_t *)radiopacket, sizeof(radiopacket));
}

View File

@@ -257,7 +257,7 @@ void setup() {
#endif
#ifdef LED_PIN
pinMode(LED_PIN, OUTPUT);
digitalWrite(LED_PIN, 0); // turn off for now
digitalWrite(LED_PIN, 1); // turn on for now
#endif
// Hello
@@ -274,12 +274,12 @@ void setup() {
gps_setup();
// Show logo on first boot after removing battery
if (bootCount == 0) {
//if (bootCount == 0) {
screen_print(APP_NAME " " APP_VERSION, 0, 0);
screen_show_logo();
screen_update();
delay(LOGO_DELAY);
}
//}
initBLE("KHBT Test"); // FIXME, use a real name based on the macaddr