Skip to content

Commit a253e84

Browse files
committed
Remove softwareSerial stubs
1 parent 97881f1 commit a253e84

File tree

2 files changed

+4
-80
lines changed

2 files changed

+4
-80
lines changed

src/SparkFun_IM19_IMU_Arduino_Library.cpp

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
This is a library to control IM19 GNSS tilt compensation sensors.
33
44
https://github.com/sparkfun/SparkFun_IM19_IMU_Arduino_Library
5-
Best used with the UM980 Breakout: https://www.sparkfun.com/products/xxxxx
5+
Best used with the UM980 Breakout: https://www.sparkfun.com/products/23286
66
77
Development environment specifics:
88
Arduino IDE 1.8.x
@@ -21,10 +21,8 @@ IM19_PARSE_STATE im19Parse = {IM19_PARSE_STATE_WAITING_FOR_SYNC1};
2121
bool IM19::begin(HardwareSerial &serialPort)
2222
{
2323
_hwSerialPort = &serialPort;
24-
_swSerialPort = nullptr;
2524

2625
// We assume the user has started the serial port with proper pins and baud rate prior to calling begin()
27-
//_hwSerialPort->begin(115200);
2826

2927
if (isConnected() == false)
3028
{
@@ -121,10 +119,6 @@ uint16_t IM19::serialAvailable()
121119
{
122120
return (_hwSerialPort->available());
123121
}
124-
else if (_swSerialPort != nullptr)
125-
{
126-
return (_swSerialPort->available());
127-
}
128122
return (0);
129123
}
130124

@@ -134,10 +128,6 @@ uint8_t IM19::serialRead()
134128
{
135129
return (_hwSerialPort->read());
136130
}
137-
else if (_swSerialPort != nullptr)
138-
{
139-
return (_swSerialPort->read());
140-
}
141131
return (0);
142132
}
143133

@@ -147,10 +137,6 @@ uint8_t IM19::serialPeek()
147137
{
148138
return (_hwSerialPort->peek());
149139
}
150-
else if (_swSerialPort != nullptr)
151-
{
152-
return (_swSerialPort->peek());
153-
}
154140
return (0);
155141
}
156142

@@ -160,10 +146,6 @@ void IM19::serialPrintln(const char *command)
160146
{
161147
_hwSerialPort->println(command);
162148
}
163-
else if (_swSerialPort != nullptr)
164-
{
165-
_swSerialPort->println(command);
166-
}
167149
}
168150

169151
// Discards any characters sitting in RX buffer

src/SparkFun_IM19_IMU_Arduino_Library.h

Lines changed: 3 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,8 @@
11
/*
2-
This is a library to read/write to external I2C EEPROMs.
3-
It uses the same template system found in the Arduino
4-
EEPROM library so you can use the same get() and put() functions.
2+
This is a library to control IM19 GNSS tilt compensation sensors.
53
6-
https://github.com/sparkfun/SparkFun_External_EEPROM_Arduino_Library
7-
Best used with the Qwiic EEPROM: https://www.sparkfun.com/products/14764
8-
9-
Various external EEPROMs have various interface specs
10-
(overall size, page size, write times, etc). This library works with
11-
all types and allows the various settings to be set at runtime.
12-
13-
All read and write restrictions associated with pages are taken care of.
14-
You can access the external memory as if it was contiguous.
4+
https://github.com/sparkfun/SparkFun_IM19_IMU_Arduino_Library
5+
Best used with the UM980 Breakout: https://www.sparkfun.com/products/23286
156
167
Development environment specifics:
178
Arduino IDE 1.8.x
@@ -23,54 +14,11 @@
2314
2415
*/
2516

26-
/*
27-
Commands covered in v1.1.10 doc
28-
AT+SYSTEM_RESET - Reset system
29-
AT+BOOT - Used for bootloading new firmware
30-
AT+SAVE_ALL - Save current config to NVM
31-
AT+GNSS_CARD=[HEMI | OEM | NOVTEL | UNICORE]
32-
AT+AHRS=[ENABLE | DISABLE]
33-
AT+ANT2=[ENABLE | DISABLE]
34-
AT+READ_PARA=[SYSTEM | ALL]
35-
AT+LOAD_DEFAULT
36-
AT+AUTO_FIX=[ENABLE | DISABLE]
37-
AT+MAG_AUTO_SAVE=[ENABLE | DISABLE]
38-
AT+GYR_AUTO_SAVE=[ENABLE | DISABLE]
39-
AT+ACC_AUTO_SAVE=[ENABLE | DISABLE]
40-
AT+CLUB_VECTOR=[VALUE1],[VALUE2],[VALUE3] - Pole length
41-
AT+NAVI_OUTPUT=[UART1 | UART 3], [ON | OFF] - Enable/disable tilt compensation
42-
AT+MEMS_OUTPUT=[UART1 | UART 3], [ON | OFF]
43-
AT+GNSS_OUTPUT=[UART1 | UART 3], [ON | OFF]
44-
AT+LEVER_ARM=X,Y,Z - Product specific location of the IMU.
45-
AT+CHECK_SYNC
46-
AT+HIGH_RATE=[ENABLE | DISABLE]
47-
AT+SET_ALL_PARA
48-
AT+ACTIVATE_KEY=[KEY]
49-
AT+ALIGN_VEL=1.0
50-
51-
Not in document
52-
AT+GNSS_PORT=PHYSICAL_UART3 //Uses serial port 3 as the serial port for communication with GNSS
53-
AT+WORK_MODE=152 //Configured as tilt measurement mode
54-
AT+SET_PPS_EDGE=RISING/FALLING
55-
56-
Typical config:
57-
AT+MAG_AUTO_SAVE=ENABLE
58-
AT+NAVI_OUTPUT=UART1,ON
59-
AT+LEVER_ARM=0.007,-0.035,-0.025
60-
AT+CLUB_VECTOR=0.00,0.00,1.855
61-
AT+GNSS_CARD=UNICORE
62-
AT+HIGH_RATE=DISABLE
63-
AT+SAVE_ALL
64-
*/
6517
#ifndef _SPARKFUN_IM19_IMU_ARDUINO_LIBRARY_H
6618
#define _SPARKFUN_IM19_IMU_ARDUINO_LIBRARY_H
6719

6820
#include "Arduino.h"
6921

70-
#if __has_include("SoftwareSerial.h")
71-
#include <SoftwareSerial.h>
72-
#endif
73-
7422
#define IM19_CHECK_POINTER_BOOL(packetPointer, initPointer) \
7523
{ \
7624
if (packetPointer == nullptr) \
@@ -186,7 +134,6 @@ typedef struct
186134
//IM19_GNSS_data_t *callbackData;
187135
} IM19_GNSS_t;
188136

189-
190137
const uint8_t im19Sync1 = 'f';
191138
const uint8_t im19Sync2 = 'm';
192139
const uint8_t im19Sync3 = 'i';
@@ -262,11 +209,6 @@ class IM19
262209

263210
protected:
264211
HardwareSerial *_hwSerialPort = nullptr;
265-
#if __has_include("SoftwareSerial.h")
266-
SoftwareSerial *_swSerialPort = nullptr;
267-
#else
268-
HardwareSerial *_swSerialPort = nullptr;
269-
#endif
270212

271213
public:
272214
bool begin(HardwareSerial &serialPort);

0 commit comments

Comments
 (0)