Skip to content

Commit 047b7ea

Browse files
committed
Fix devcontainer
1 parent 54ae642 commit 047b7ea

File tree

5 files changed

+41
-40
lines changed

5 files changed

+41
-40
lines changed

.devcontainer/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.209.6/containers/ubuntu/.devcontainer/base.Dockerfile
22

33
# [Choice] Ubuntu version (use hirsuite or bionic on local arm64/Apple Silicon): hirsute, focal, bionic
4-
ARG VARIANT="hirsute"
5-
FROM mcr.microsoft.com/vscode/devcontainers/base:0-${VARIANT}
4+
ARG VARIANT="22.04"
5+
FROM mcr.microsoft.com/devcontainers/base:ubuntu-${VARIANT}
66

77
# [Optional] Uncomment this section to install additional OS packages.
88
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
99
&& apt-get -y install --no-install-recommends clang-format make software-properties-common
10-
RUN add-apt-repository ppa:mongoose-os/mos && apt-get update && apt-get -y install mos
10+
RUN add-apt-repository ppa:mongoose-os/mos && apt-get update && apt-get -y install mos-latest libavahi-client3 avahi-daemon clang

.devcontainer/devcontainer.json

Lines changed: 20 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,38 @@
1-
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
2-
// https://github.com/microsoft/vscode-dev-containers/tree/v0.209.6/containers/ubuntu
31
{
42
"name": "Ubuntu",
53
"build": {
64
"dockerfile": "Dockerfile",
7-
// Update 'VARIANT' to pick an Ubuntu version: hirsute, focal, bionic
8-
// Use hirsute or bionic on local arm64/Apple Silicon.
9-
"args": { "VARIANT": "focal" }
5+
"args": {
6+
"VARIANT": "22.04"
7+
}
108
},
11-
129
// Set *default* container specific settings.json values on container create.
13-
"settings": {
14-
"terminal.integrated.shell.linux": "zsh"
10+
"customizations": {
11+
"vscode": {
12+
"settings": {
13+
"terminal.integrated.shell.linux": "zsh"
14+
},
15+
// Add the IDs of extensions you want installed when the container is created.
16+
"extensions": [],
17+
"tasks": [
18+
{
19+
"label": "Fileserver",
20+
"type": "shell",
21+
"command": "make build",
22+
"problemMatcher": []
23+
}
24+
]
25+
}
1526
},
16-
17-
// Add the IDs of extensions you want installed when the container is created.
18-
"extensions": [],
19-
2027
// Use 'forwardPorts' to make a list of ports inside the container available locally.
2128
// "forwardPorts": [],
22-
2329
// Use 'postCreateCommand' to run commands after the container is created.
2430
// "postCreateCommand": "uname -a",
25-
2631
// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
2732
"remoteUser": "vscode",
2833
"features": {
2934
"docker-in-docker": "20.10",
3035
"git": "latest"
3136
},
32-
"tasks": [
33-
{
34-
"label": "Fileserver",
35-
"type": "shell",
36-
"command": "make build",
37-
"problemMatcher": []
38-
}
39-
]
37+
"postStartCommand": "sudo service dbus start; sudo service avahi-daemon start"
4038
}

AUTHORS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,6 @@ The following people have contributed to the project (in chronological order):
99
* [Timothy Langer](https://github.com/ZeeVox)
1010
* [Timo Schilling](https://github.com/timoschilling)
1111
* [Josef Blösl](https://github.com/jobl1978)
12+
* [Markus Kirberg](https://github.com/markirb)
1213

1314
Full list of contributors [here](https://github.com/mongoose-os-apps/shelly-homekit/graphs/contributors).

src/shelly_main.cpp

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -761,28 +761,28 @@ void InitApp() {
761761

762762
// Initialize accessory server.
763763
HAPAccessoryServerOptions server_options = {
764-
.maxPairings = kHAPPairingStorage_MinElements,
764+
.maxPairings = kHAPPairingStorage_MinElements,
765765
#if HAP_IP
766-
.ip =
767-
{
768-
.transport = &kHAPAccessoryServerTransport_IP,
766+
.ip =
767+
{
768+
.transport = &kHAPAccessoryServerTransport_IP,
769769
#ifndef __clang__
770-
.available = 0,
770+
.available = 0,
771771
#endif
772-
.accessoryServerStorage = &s_ip_storage,
773-
},
772+
.accessoryServerStorage = &s_ip_storage,
773+
},
774774
#endif
775775
#if HAP_BLE
776-
.ble =
777-
{
778-
.transport = nullptr,
776+
.ble =
777+
{
778+
.transport = nullptr,
779779
#ifndef __clang__
780-
.available = 0,
780+
.available = 0,
781781
#endif
782-
.accessoryServerStorage = nullptr,
783-
.preferredAdvertisingInterval = 0,
784-
.preferredNotificationDuration = 0,
785-
},
782+
.accessoryServerStorage = nullptr,
783+
.preferredAdvertisingInterval = 0,
784+
.preferredNotificationDuration = 0,
785+
},
786786
#endif
787787
};
788788
static struct HAPPlatformMFiTokenAuth s_mfi_auth;

src/shelly_output.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ Status OutputPin::SetStatePWM(float duty, const char *source) {
8383
}
8484
return Status::OK();
8585
#else
86+
(void) duty;
87+
(void) source;
8688
return Status::UNIMPLEMENTED();
8789
#endif
8890
}

0 commit comments

Comments
 (0)