Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
milestone-2
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
Kasper Lauge Madsen
milestone-2
Commits
9a5f374e
Commit
9a5f374e
authored
5 years ago
by
kasperlauge
Browse files
Options
Downloads
Patches
Plain Diff
Resolved a small error
parent
35516c47
No related branches found
Branches containing commit
No related tags found
1 merge request
!2
Features/led fix
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
client/src/app/models/led.model.ts
+6
-2
6 additions, 2 deletions
client/src/app/models/led.model.ts
client/src/app/sensor.service.ts
+3
-3
3 additions, 3 deletions
client/src/app/sensor.service.ts
server/src/services/gpio.service.ts
+3
-3
3 additions, 3 deletions
server/src/services/gpio.service.ts
with
12 additions
and
8 deletions
client/src/app/models/led.model.ts
+
6
−
2
View file @
9a5f374e
export
class
LED
{
value
:
number
;
id
:
string
}
\ No newline at end of file
id
:
number
;
};
export
class
LEDs
{
leds
:
LED
[];
};
\ No newline at end of file
This diff is collapsed.
Click to expand it.
client/src/app/sensor.service.ts
+
3
−
3
View file @
9a5f374e
...
...
@@ -3,7 +3,7 @@ import { HttpClient } from '@angular/common/http';
import
{
environment
}
from
'
src/environments/environment
'
;
import
{
Observable
}
from
'
rxjs
'
;
import
{
Dht
}
from
'
./models/dht.model
'
;
import
{
LED
}
from
'
./models/led.model
'
;
import
{
LED
,
LEDs
}
from
'
./models/led.model
'
;
@
Injectable
({
providedIn
:
'
root
'
...
...
@@ -20,8 +20,8 @@ export class SensorService {
return
this
.
http
.
get
<
Dht
>
(
`
${
this
.
rootUrl
}
api/sensor/dht`
);
}
getLEDs
():
Observable
<
any
>
{
return
this
.
http
.
get
<
any
>
(
`
${
this
.
rootUrl
}
api/actuator/led`
);
getLEDs
():
Observable
<
LEDs
>
{
return
this
.
http
.
get
<
LEDs
>
(
`
${
this
.
rootUrl
}
api/actuator/led`
);
}
setLED
(
id
:
number
,
status
:
boolean
):
Observable
<
LED
>
{
...
...
This diff is collapsed.
Click to expand it.
server/src/services/gpio.service.ts
+
3
−
3
View file @
9a5f374e
...
...
@@ -86,9 +86,9 @@ export function getLEDservice(lednr: number) {
export
function
getAllLEDsservice
()
{
let
tmp
=
[
{
"
value
"
:
getLEDservice
(
2
),
"
id
"
:
"
2
"
},
{
"
value
"
:
getLEDservice
(
4
),
"
id
"
:
"
4
"
},
{
"
value
"
:
getLEDservice
(
22
),
"
id
"
:
"
22
"
}
{
"
value
"
:
getLEDservice
(
2
),
"
id
"
:
2
},
{
"
value
"
:
getLEDservice
(
4
),
"
id
"
:
4
},
{
"
value
"
:
getLEDservice
(
22
),
"
id
"
:
22
}
];
return
tmp
;
...
...
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