Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Calibratio
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LuFG VR VIS
VR-Group
Unreal-Development
Tools
Calibratio
Commits
67efd65f
Commit
67efd65f
authored
5 months ago
by
Sebastian Pape
Browse files
Options
Downloads
Patches
Plain Diff
Updating for newer Arduino-Library versions
parent
32743b7d
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
MotionToPhotonMeter.ino
+7
-3
7 additions, 3 deletions
MotionToPhotonMeter.ino
MotionToPhotonServer.cpp
+2
-2
2 additions, 2 deletions
MotionToPhotonServer.cpp
MotionToPhotonServer.h
+2
-0
2 additions, 0 deletions
MotionToPhotonServer.h
with
11 additions
and
5 deletions
MotionToPhotonMeter.ino
+
7
−
3
View file @
67efd65f
...
@@ -47,6 +47,11 @@ MotionToPhotonServer server(result_buffer, result_buffer_length, getPhotoDiodeRe
...
@@ -47,6 +47,11 @@ MotionToPhotonServer server(result_buffer, result_buffer_length, getPhotoDiodeRe
/* Multicore */
/* Multicore */
TaskHandle_t
TaskCore0
;
TaskHandle_t
TaskCore0
;
TaskHandle_t
TaskCore1
;
TaskHandle_t
TaskCore1
;
const
esp_task_wdt_config_t
twdt_config
=
{
.
timeout_ms
=
6000
,
.
idle_core_mask
=
0b00000011
,
// Disable on all cores
.
trigger_panic
=
false
,
};
void
core1
(
void
*
pvParameters
){
void
core1
(
void
*
pvParameters
){
while
(
true
){
while
(
true
){
...
@@ -114,7 +119,7 @@ void setup() {
...
@@ -114,7 +119,7 @@ void setup() {
server
.
setup
();
server
.
setup
();
esp_task_wdt_init
(
6000
,
false
);
esp_task_wdt_init
(
&
twdt_config
);
xTaskCreatePinnedToCore
(
xTaskCreatePinnedToCore
(
core0
,
// Task function.
core0
,
// Task function.
"Server"
,
// name of task.
"Server"
,
// name of task.
...
@@ -133,8 +138,7 @@ void setup() {
...
@@ -133,8 +138,7 @@ void setup() {
&
TaskCore1
,
// Task handle to keep track of created task
&
TaskCore1
,
// Task handle to keep track of created task
1
);
// pin task to core 1
1
);
// pin task to core 1
delay
(
500
);
delay
(
500
);
disableCore0WDT
();
esp_task_wdt_deinit
();
disableCore1WDT
();
}
}
void
loop
(){}
//Still needed for arduino core to work
void
loop
(){}
//Still needed for arduino core to work
...
...
This diff is collapsed.
Click to expand it.
MotionToPhotonServer.cpp
+
2
−
2
View file @
67efd65f
...
@@ -104,14 +104,14 @@
...
@@ -104,14 +104,14 @@
}
}
void
MotionToPhotonServer
::
pageResults
(){
void
MotionToPhotonServer
::
pageResults
(){
Serial
.
println
(
"Client wants
index
page."
);
Serial
.
println
(
"Client wants
results
page."
);
server
.
setContentLength
(
CONTENT_LENGTH_UNKNOWN
);
server
.
setContentLength
(
CONTENT_LENGTH_UNKNOWN
);
server
.
send
(
200
,
"text/plain"
,
""
);
server
.
send
(
200
,
"text/plain"
,
""
);
unsigned
int
currentNumberOfResults
=
getCurrentNumberOfResults
();
unsigned
int
currentNumberOfResults
=
getCurrentNumberOfResults
();
for
(
unsigned
int
i
=
0
;
i
<
currentNumberOfResults
;
i
++
){
for
(
unsigned
int
i
=
0
;
i
<
currentNumberOfResults
;
i
++
){
server
.
sendContent
(
String
(
result_buffer
[
i
])
+
((
i
!=
currentNumberOfResults
-
1
)
?
",
\n
"
:
""
));
server
.
sendContent
(
String
(
result_buffer
[
i
])
+
((
i
!=
currentNumberOfResults
-
1
)
?
",
\n
"
:
""
));
}
}
server
.
client
().
stop
(
);
server
.
sendContent
(
""
);
}
}
void
MotionToPhotonServer
::
pageIndex
(){
void
MotionToPhotonServer
::
pageIndex
(){
...
...
This diff is collapsed.
Click to expand it.
MotionToPhotonServer.h
+
2
−
0
View file @
67efd65f
...
@@ -2,8 +2,10 @@
...
@@ -2,8 +2,10 @@
#define MotionToPhotonServer_h
#define MotionToPhotonServer_h
#include
"Arduino.h"
#include
"Arduino.h"
#include
<WiFi.h>
#include
<WebServer.h>
#include
<WebServer.h>
#include
"SPIFFS.h"
#include
"SPIFFS.h"
#include
"FS.h"
class
MotionToPhotonServer
class
MotionToPhotonServer
{
{
...
...
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