Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Hideaki Tai
/
omni_main
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
e933c300
authored
Feb 16, 2019
by
Hideaki Tai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
simplify setup sequence
parent
8188af44
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
src/main.cpp
+9
-2
No files found.
src/main.cpp
View file @
e933c300
...
...
@@ -17,8 +17,6 @@ void setup()
initEeprom
(
HARDWARE_ID
);
delay
(
2000
);
initXBee
(
HARDWARE_ID
);
unpacker
.
attach
(
XBEE_SERIAL
);
...
...
@@ -47,6 +45,14 @@ void setup()
WHILL_SERIAL_R
.
begin
(
WHILL_SERIAL_BAUD
,
SERIAL_8N2
);
// R
whill
.
attach
(
WHILL_SERIAL_L
,
WHILL_SERIAL_R
);
#if 1
whill
.
stop
();
delay
(
500
);
whill
.
streaming
(
true
,
WHILL_INFO_INTERVAL_MS
,
DATASET
::
SENSOR_INFO
);
delay
(
500
);
whill
.
speed
(
SPEEDMODE
::
RS232C
,
60
,
90
,
90
,
60
,
90
,
90
,
60
,
90
,
90
);
// for new whill firmware
delay
(
500
);
#else
whill
.
streaming
(
false
,
WHILL_INFO_INTERVAL_MS
,
DATASET
::
SPEED_PROFILE
);
whill
.
stop
();
...
...
@@ -67,6 +73,7 @@ void setup()
whill
.
streaming
(
true
,
WHILL_INFO_INTERVAL_MS
,
DATASET
::
SENSOR_INFO
);
delay
(
1000
);
#endif
if
(
digitalRead
(
PIN_EMERGENCY
)
==
LOW
)
b_motor_active
=
true
;
else
b_motor_active
=
false
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment