Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pousseseringue-arduino
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FabLAAS
PousseSeringue
pousseseringue-arduino
Commits
ed8b1816
Commit
ed8b1816
authored
1 year ago
by
David Gauchard
Browse files
Options
Downloads
Patches
Plain Diff
reenabling wifi
parent
75a708dd
No related branches found
Branches containing commit
No related tags found
1 merge request
!17
Malaurie's work on UI + CLI interface + AccelStepper interface
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pousseseringue-arduino.cpp
+10
-25
10 additions, 25 deletions
pousseseringue-arduino.cpp
with
10 additions
and
25 deletions
pousseseringue-arduino.cpp
+
10
−
25
View file @
ed8b1816
...
@@ -78,7 +78,6 @@ DNSServer dnsServer;
...
@@ -78,7 +78,6 @@ DNSServer dnsServer;
char
ssid
[
65
];
char
ssid
[
65
];
Modes
mode
=
Modes
::
RPM
;
Modes
mode
=
Modes
::
RPM
;
bool
stepperMoving
=
false
;
int
move
=
0
;
int
move
=
0
;
...
@@ -245,27 +244,10 @@ void buttons (int shortp, int longp)
...
@@ -245,27 +244,10 @@ void buttons (int shortp, int longp)
#if !CORE_MOCK
#if !CORE_MOCK
IRAM_ATTR
void
stepperRunOLD
()
{
// if (syringe.locked())
// return;
// cli();
#if 0
if (rpming)
stepperMoving = stepper.runSpeed();
else
stepperMoving = stepper.run();
#else
stepperMoving
=
stepper
.
runSpeed
();
#endif
// sei();
}
IRAM_ATTR
IRAM_ATTR
void
stepperRun
()
void
stepperRun
()
{
{
stepperMoving
=
stepper
.
runSpeed
();
stepper
.
runSpeed
();
}
}
#endif // !CORE_MOCK
#endif // !CORE_MOCK
...
@@ -299,12 +281,12 @@ void setup()
...
@@ -299,12 +281,12 @@ void setup()
digitalWrite
(
SLEEP
,
0
);
digitalWrite
(
SLEEP
,
0
);
#endif // !CORE_MOCK
#endif // !CORE_MOCK
#if
0
#if
1
uint8_t
mac
[
6
];
uint8_t
mac
[
6
];
WiFi
.
macAddress
(
mac
);
WiFi
.
macAddress
(
mac
);
sprintf
(
ssid
,
NAME
"-%02x%02x%02x"
,
mac
[
3
],
mac
[
4
],
mac
[
5
]);
sprintf
(
ssid
,
NAME
"-%02x%02x%02x"
,
mac
[
3
],
mac
[
4
],
mac
[
5
]);
#if
0
#if
1
if
(
strlen
(
STASSID
)
>
0
)
if
(
strlen
(
STASSID
)
>
0
)
{
{
WiFi
.
setPhyMode
(
WIFI_PHY_MODE_11G
);
WiFi
.
setPhyMode
(
WIFI_PHY_MODE_11G
);
...
@@ -346,7 +328,7 @@ void setup()
...
@@ -346,7 +328,7 @@ void setup()
timer1_enable
(
TIM_DIV1
,
TIM_EDGE
,
TIM_LOOP
);
timer1_enable
(
TIM_DIV1
,
TIM_EDGE
,
TIM_LOOP
);
timer1_attachInterrupt
(
stepperRun
);
timer1_attachInterrupt
(
stepperRun
);
timer1_write
(
microsecondsToClockCycles
(
100
));
timer1_write
(
microsecondsToClockCycles
(
100
));
schedule_recurrent_function_us
([](){
if
(
stepper
Moving
)
{
InterruptLock
lock
;
stepper
.
computeNewSpeed
();
}
return
true
;
},
1
);
schedule_recurrent_function_us
([](){
if
(
stepper
.
distanceToGo
()
)
{
InterruptLock
lock
;
stepper
.
computeNewSpeed
();
}
return
true
;
},
1
);
#else
#else
#warning ===================================================================================================
#warning ===================================================================================================
#warning "Please use the ISR version of AccelStepper (git clone -b isr https://github.com/d-a-v/AccelStepper)"
#warning "Please use the ISR version of AccelStepper (git clone -b isr https://github.com/d-a-v/AccelStepper)"
...
@@ -374,7 +356,10 @@ void setup()
...
@@ -374,7 +356,10 @@ void setup()
void
loop
()
void
loop
()
{
{
if
(
bEmergency
.
update
(
digitalRead
(
COURSE
)))
if
(
bEmergency
.
update
(
digitalRead
(
COURSE
)))
syringe
.
manageEmergency
(
bEmergency
.
pressed
(),
stepperMoving
);
{
syringe
.
manageEmergency
(
bEmergency
.
pressed
(),
!!
stepper
.
distanceToGo
());
Serial
.
printf
(
"%sEmergency=%u (remaining steps = %lu)
\n
"
,
msgHeader
,
bEmergency
.
pressed
(),
stepper
.
distanceToGo
());
}
#if CORE_MOCK
#if CORE_MOCK
bool
changeA
=
false
;
bool
changeA
=
false
;
...
@@ -416,6 +401,6 @@ void loop()
...
@@ -416,6 +401,6 @@ void loop()
}
}
console
.
loop
(
Serial
);
console
.
loop
(
Serial
);
//
webLoop();
webLoop
();
//
dnsServer.processNextRequest(); // access-point redirection
dnsServer
.
processNextRequest
();
// access-point redirection
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment