Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
catlaser
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chris Prince
catlaser
Commits
bea206ec
Commit
bea206ec
authored
May 15, 2021
by
Chris Prince
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor fix to provide service response to website; fix for button clicks;
parent
822e9cd5
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
8 deletions
+13
-8
catlaser_0.6.ino
esp12/catlaser_0.6.ino
+5
-0
proxy.config.json
website/lasercat-ui/proxy.config.json
+6
-6
app.component.html
website/lasercat-ui/src/app/app.component.html
+1
-1
app.component.ts
website/lasercat-ui/src/app/app.component.ts
+1
-1
No files found.
esp12/catlaser_0.6.ino
View file @
bea206ec
...
...
@@ -223,4 +223,9 @@ void loop() {
// add if..else here to countdown before turning off laser?
Serial
.
print
(
"random State="
);
Serial
.
println
(
randomState
);
//debugging
client
.
println
(
"HTTP/1.1 200 OK"
);
client
.
println
(
"Content-Type: application/json"
);
client
.
println
(
""
);
// do not forget this one
client
.
println
(
"{ Success: true }"
)
}
website/lasercat-ui/proxy.config.json
View file @
bea206ec
{
"/move*"
:
{
"target"
:
"http://
IP
:80"
,
"target"
:
"http://
192.168.0.131
:80"
,
"secure"
:
false
,
"logLevel"
:
"debug"
},
"/random*"
:
{
"target"
:
"http://
IP
:80"
,
"target"
:
"http://
192.168.0.131
:80"
,
"secure"
:
false
,
"logLevel"
:
"debug"
},
"/start"
:
{
"target"
:
"http://
IP
:80"
,
"/start
*
"
:
{
"target"
:
"http://
192.168.0.131
:80"
,
"secure"
:
false
,
"logLevel"
:
"debug"
},
"/stop"
:
{
"target"
:
"http://
IP
:80"
,
"/stop
*
"
:
{
"target"
:
"http://
192.168.0.131
:80"
,
"secure"
:
false
,
"logLevel"
:
"debug"
}
...
...
website/lasercat-ui/src/app/app.component.html
View file @
bea206ec
...
...
@@ -8,7 +8,7 @@
<div
class=
"centered"
>
<div
class=
"btn-block"
>
<button
(
click
)="
triggerLaser
()"
class=
"btn"
[
ngClass
]="{
'
btn-outline-danger
'
:
laserState =
==
'
on
',
'
btn-outline-info
'
:
laserState =
==
'
off
'}"
>
Turn {{ laserState }} Laser
</button>
<button
class=
"btn btn-warning"
[
disabled
]="
randomRuns
"
>
Start Random Patterns
</button>
<button
class=
"btn btn-warning"
[
disabled
]="
randomRuns
"
(
click
)="
randomizeLaser
()"
>
Start Random Patterns
</button>
</div>
<div
class=
"btn-block"
>
<div
class=
"inline"
>
...
...
website/lasercat-ui/src/app/app.component.ts
View file @
bea206ec
...
...
@@ -39,7 +39,7 @@ export class AppComponent {
public
moveLaser
()
{
const
xy
=
this
.
form
.
value
;
this
.
esp
.
move
(
xy
.
xPosition
,
xy
.
yPosition
);
this
.
esp
.
move
(
xy
.
xPosition
,
xy
.
yPosition
)
.
subscribe
()
;
}
public
randomizeLaser
()
{
...
...
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