mirror of
https://github.com/hatlabs/SH-ESP32-nmea2000-gateway.git
synced 2025-05-19 00:40:30 -07:00
Reformat the file
This commit is contained in:
parent
64ecf56190
commit
329f02f74e
20
src/main.cpp
20
src/main.cpp
@ -5,16 +5,16 @@
|
||||
#define SDA_PIN 16
|
||||
#define SCL_PIN 17
|
||||
|
||||
#include <Wire.h>
|
||||
#include <ActisenseReader.h>
|
||||
#include <Adafruit_GFX.h>
|
||||
#include <Adafruit_SSD1306.h>
|
||||
#include <N2kMessages.h>
|
||||
#include <ActisenseReader.h>
|
||||
#include <NMEA2000_esp32.h>
|
||||
|
||||
#include <ReactESP.h>
|
||||
#include <Wire.h>
|
||||
#include <esp_int_wdt.h>
|
||||
#include <esp_task_wdt.h>
|
||||
|
||||
using namespace reactesp;
|
||||
|
||||
ReactESP app;
|
||||
@ -85,9 +85,7 @@ void setup() {
|
||||
|
||||
// toggle the LED pin at rate of 1 Hz
|
||||
pinMode(LED_BUILTIN, OUTPUT);
|
||||
app.onRepeatMicros(1e6 / 1, []() {
|
||||
ToggleLed();
|
||||
});
|
||||
app.onRepeatMicros(1e6 / 1, []() { ToggleLed(); });
|
||||
|
||||
// instantiate the NMEA2000 object
|
||||
nmea2000 = new tNMEA2000_esp32(CAN_TX_PIN, CAN_RX_PIN);
|
||||
@ -104,7 +102,8 @@ void setup() {
|
||||
"20210331", // Manufacturer's Model serial code (max 32 chars)
|
||||
103, // Manufacturer's product code
|
||||
"SH-ESP32 NMEA 2000 USB GW", // Manufacturer's Model ID (max 33 chars)
|
||||
"0.1.0.0 (2021-03-31)", // Manufacturer's Software version code (max 40 chars)
|
||||
"0.1.0.0 (2021-03-31)", // Manufacturer's Software version code (max 40
|
||||
// chars)
|
||||
"0.0.3.1 (2021-03-07)" // Manufacturer's Model version (max 24 chars)
|
||||
);
|
||||
// Set device information
|
||||
@ -120,7 +119,8 @@ void setup() {
|
||||
|
||||
nmea2000->SetForwardStream(forward_stream);
|
||||
nmea2000->SetMode(tNMEA2000::N2km_ListenAndNode);
|
||||
// nmea2000->SetForwardType(tNMEA2000::fwdt_Text); // Show bus data in clear text
|
||||
// nmea2000->SetForwardType(tNMEA2000::fwdt_Text); // Show bus data in clear
|
||||
// text
|
||||
nmea2000->SetForwardOwnMessages(false); // do not echo own messages.
|
||||
nmea2000->SetMsgHandler(HandleStreamN2kMsg);
|
||||
nmea2000->Open();
|
||||
@ -170,6 +170,4 @@ void setup() {
|
||||
});
|
||||
}
|
||||
|
||||
void loop() {
|
||||
app.tick();
|
||||
}
|
||||
void loop() { app.tick(); }
|
||||
|
Loading…
x
Reference in New Issue
Block a user