Skip to content

Commit 2ac6757

Browse files
committed
- done v2.0.1
- changed gps board to softserial
1 parent 428400e commit 2ac6757

File tree

3 files changed

+22
-12
lines changed

3 files changed

+22
-12
lines changed

ReleaseNote.txt

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
RelNote -*- mode : org -*-
2+
13
# Release Note
24
* DONE v1.0.0 - all-C projects
35
** I2C console via serial port: make I2C debugging easier
@@ -11,17 +13,24 @@
1113
** DONE Support Arduino IDE framework (Arduino Makefile)
1214
** DONE skeleton.mk is one-stop .mk for all projects, include it at the end of project's makefile
1315
** DONE create libutils.a
14-
** INPROGRESS v2.0.1 - migrate SerialDebugPrint api to non-macro, restructure i2c-console parser
16+
** DONE v2.0.1 - migrate SerialDebugPrint api to non-macro, restructure i2c-console parser
17+
- State "DONE" from "INPROGRESS" [2017-06-11 Sun 23:01]
1518
*** DONE change SerialDebugPrint* api & test src
1619
SCHEDULED: <2017-06-10 Sat>
1720
- State "DONE" from "INPROGRESS" [2017-06-10 Sat 17:10]
1821
*** DONE move i2c-console parser to module & callback management
1922
- State "DONE" from "INPROGRESS" [2017-06-10 Sat 21:02]
20-
*** INPROGRESS GPS breakout board to output to softserial
23+
*** DONE GPS breakout board to output to softserial
24+
- State "DONE" from "INPROGRESS" [2017-06-11 Sun 22:54]
2125

2226
* WAIT v2.1.0 - Google test support & C sensor library support
2327
** add common/makefiles/gtest.mk
2428
*** add simple gtest project
29+
** full range adc & pin change interrupt C support
2530
** motion sensor test code
2631
** hand clap sound detector
27-
** full range adc & pin change interrupt C support
32+
* WAIT v2.2.0 - more integrated module in i2c-console
33+
** LSM303DLHC support: compass & accelerator in test/
34+
*** accelerometer support
35+
*** compass support
36+
*** i2c-console support

c-project/without-os/GPS-breakout-board/GPS-test.c

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77

88
#include "NMEAParser.h"
99
#include "SerialDebug.h"
10+
#include "SoftSerial.h"
1011
#include "LCD.h"
1112

1213
#include <util/delay.h>
@@ -16,6 +17,7 @@ int main(void)
1617
{
1718
LCDInit();
1819
SerialDebugInitWithBaudRate(9600);
20+
SoftSerialInit();
1921
double distance = 0.0f;
2022
NMEAData initLocation, prevData;
2123
initLocation.isValid = 0;
@@ -32,7 +34,7 @@ int main(void)
3234

3335
if (!initLocation.isValid)
3436
{
35-
SerialDebugPrint("Failed initial parsed message: %s", gps_msg);
37+
SoftSerialPrintLn("Failed initial parsed message: %s", gps_msg);
3638
}
3739
}
3840

@@ -50,22 +52,22 @@ int main(void)
5052

5153
if (gpsData.isValid && parseResult == 0)
5254
{
53-
SerialDebugPrint("Parse succeeds, message %s", gps_msg);
54-
SerialDebugPrint("lat %d %lf", gpsData.location.lat_deg,
55+
SoftSerialPrintLn("Parse succeeds, message %s", gps_msg);
56+
SoftSerialPrintLn("lat %d %lf", gpsData.location.lat_deg,
5557
gpsData.location.lat_min);
56-
SerialDebugPrint("lon %d %lf", gpsData.location.lon_deg,
58+
SoftSerialPrintLn("lon %d %lf", gpsData.location.lon_deg,
5759
gpsData.location.lon_min);
5860

5961
distance += NMEAGetDistance(&prevData.location, &gpsData.location);
60-
SerialDebugPrint("traveled distance %.2lf m", distance);
62+
SoftSerialPrintLn("traveled distance %.2lf m", distance);
6163

6264
double angle = NMEAGetAngle(&initLocation.location, &gpsData.location);
63-
SerialDebugPrint("angle from initial location %.2lf degrees", angle);
65+
SoftSerialPrintLn("angle from initial location %.2lf degrees", angle);
6466

6567
double distanceToInitPlace = NMEAGetDistance(&initLocation.location, &gpsData.location);
66-
SerialDebugPrint(" %4.0lf m to initial place", distanceToInitPlace);
68+
SoftSerialPrintLn(" %4.0lf m to initial place", distanceToInitPlace);
6769

68-
SerialDebugPrint(" ");
70+
SoftSerialPrintLn(" ");
6971

7072
LCDSetCursor(1,0);
7173
LCDPrint("traveled %.2lf m", distance);

c-project/without-os/GPS-breakout-board/NMEAParser.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,6 @@ double NMEAGetAngle(const NMEALocation * a, const NMEALocation * b)
418418
double latb = toRadian(b->lat_deg, b->lat_min);
419419
double lonb = toRadian(b->lon_deg, b->lon_min);
420420

421-
double dlat = (latb - lata);
422421
double dlon = (lonb - lona);
423422

424423
double y = sin(dlon) * cos(latb);

0 commit comments

Comments
 (0)