Skip to content

Commit

Permalink
Fix devcontainer
Browse files Browse the repository at this point in the history
  • Loading branch information
markirb committed Oct 20, 2024
1 parent 54ae642 commit 047b7ea
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 40 deletions.
6 changes: 3 additions & 3 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.209.6/containers/ubuntu/.devcontainer/base.Dockerfile

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

# [Optional] Uncomment this section to install additional OS packages.
RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& apt-get -y install --no-install-recommends clang-format make software-properties-common
RUN add-apt-repository ppa:mongoose-os/mos && apt-get update && apt-get -y install mos
RUN add-apt-repository ppa:mongoose-os/mos && apt-get update && apt-get -y install mos-latest libavahi-client3 avahi-daemon clang
42 changes: 20 additions & 22 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -1,40 +1,38 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the README at:
// https://github.com/microsoft/vscode-dev-containers/tree/v0.209.6/containers/ubuntu
{
"name": "Ubuntu",
"build": {
"dockerfile": "Dockerfile",
// Update 'VARIANT' to pick an Ubuntu version: hirsute, focal, bionic
// Use hirsute or bionic on local arm64/Apple Silicon.
"args": { "VARIANT": "focal" }
"args": {
"VARIANT": "22.04"
}
},

// Set *default* container specific settings.json values on container create.
"settings": {
"terminal.integrated.shell.linux": "zsh"
"customizations": {
"vscode": {
"settings": {
"terminal.integrated.shell.linux": "zsh"
},
// Add the IDs of extensions you want installed when the container is created.
"extensions": [],
"tasks": [
{
"label": "Fileserver",
"type": "shell",
"command": "make build",
"problemMatcher": []
}
]
}
},

// Add the IDs of extensions you want installed when the container is created.
"extensions": [],

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// "forwardPorts": [],

// Use 'postCreateCommand' to run commands after the container is created.
// "postCreateCommand": "uname -a",

// Comment out connect as root instead. More info: https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "vscode",
"features": {
"docker-in-docker": "20.10",
"git": "latest"
},
"tasks": [
{
"label": "Fileserver",
"type": "shell",
"command": "make build",
"problemMatcher": []
}
]
"postStartCommand": "sudo service dbus start; sudo service avahi-daemon start"
}
1 change: 1 addition & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ The following people have contributed to the project (in chronological order):
* [Timothy Langer](https://github.com/ZeeVox)
* [Timo Schilling](https://github.com/timoschilling)
* [Josef Blösl](https://github.com/jobl1978)
* [Markus Kirberg](https://github.com/markirb)

Full list of contributors [here](https://github.com/mongoose-os-apps/shelly-homekit/graphs/contributors).
30 changes: 15 additions & 15 deletions src/shelly_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -761,28 +761,28 @@ void InitApp() {

// Initialize accessory server.
HAPAccessoryServerOptions server_options = {
.maxPairings = kHAPPairingStorage_MinElements,
.maxPairings = kHAPPairingStorage_MinElements,
#if HAP_IP
.ip =
{
.transport = &kHAPAccessoryServerTransport_IP,
.ip =
{
.transport = &kHAPAccessoryServerTransport_IP,
#ifndef __clang__
.available = 0,
.available = 0,
#endif
.accessoryServerStorage = &s_ip_storage,
},
.accessoryServerStorage = &s_ip_storage,
},
#endif
#if HAP_BLE
.ble =
{
.transport = nullptr,
.ble =
{
.transport = nullptr,
#ifndef __clang__
.available = 0,
.available = 0,
#endif
.accessoryServerStorage = nullptr,
.preferredAdvertisingInterval = 0,
.preferredNotificationDuration = 0,
},
.accessoryServerStorage = nullptr,
.preferredAdvertisingInterval = 0,
.preferredNotificationDuration = 0,
},
#endif
};
static struct HAPPlatformMFiTokenAuth s_mfi_auth;
Expand Down
2 changes: 2 additions & 0 deletions src/shelly_output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ Status OutputPin::SetStatePWM(float duty, const char *source) {
}
return Status::OK();
#else
(void) duty;
(void) source;
return Status::UNIMPLEMENTED();
#endif
}
Expand Down

0 comments on commit 047b7ea

Please sign in to comment.