File tree 3 files changed +21
-5
lines changed
Learn/Simple Libraries/Robotics/S3/libs3
3 files changed +21
-5
lines changed Original file line number Diff line number Diff line change @@ -74,7 +74,15 @@ the Test Utility, cycle the Scribbler//s power switch.
74
74
75
75
*/
76
76
77
- int main () {
77
+ // ------ Libraries and Definitions ------
78
+ #include "simpletools.h"
79
+ #include "s3.h"
80
+
81
+
82
+
83
+ // ------ Main Program ------
84
+ int main ()
85
+ {
78
86
79
87
}
80
88
Original file line number Diff line number Diff line change @@ -118,11 +118,19 @@ int32_t s3_readMic()
118
118
static void s3_obstacler ()
119
119
{
120
120
int32_t side , ObstacleThld ;
121
- if (scribbler_get_obstacle_threshold () != SCRIBBLER_DEFAULT_OBSTACLE_THLD ) {
122
- ObstacleThld = scribbler_get_obstacle_threshold ();
121
+ if (scribbler_get_model_s3 ()) {
122
+ if (scribbler_get_obstacle_threshold () != S3_OBSTACLE_THLD ) {
123
+ ObstacleThld = scribbler_get_obstacle_threshold ();
124
+ } else {
125
+ ObstacleThld = S3_OBSTACLE_THLD ;
126
+ }
123
127
} else {
124
- ObstacleThld = S3_OBSTACLE_THLD ;
125
- }
128
+ if (scribbler_get_obstacle_threshold () != SCRIBBLER_DEFAULT_OBSTACLE_THLD ) {
129
+ ObstacleThld = scribbler_get_obstacle_threshold ();
130
+ } else {
131
+ ObstacleThld = SCRIBBLER_DEFAULT_OBSTACLE_THLD ;
132
+ }
133
+ }
126
134
while (1 ) {
127
135
for (side = SCRIBBLER_OBS_TX_LEFT ; side <= SCRIBBLER_OBS_TX_RIGHT ; side = side + 9 ) {
128
136
FRQA = (14000 * ObstacleThld ) + (20607 * (100 - ObstacleThld ));
You can’t perform that action at this time.
0 commit comments