Skip to content

Commit

Permalink
Fix clock update script.
Browse files Browse the repository at this point in the history
  • Loading branch information
d33tah committed Sep 13, 2023
1 parent cc5a6ee commit 28f1b36
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Dockerfile.arduino
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM ubuntu:20.04
FROM ubuntu:22.04

RUN apt update && apt-get install -y bash wget

ARG USER=docker
ARG UID=1000
ARG GID=1000

RUN groupadd --gid=${GID} ${GID} && useradd -m ${USER} --uid=${UID} -g${GID} -G dialout
RUN groupadd --gid=${GID} g${GID} && useradd -m ${USER} --uid=${UID} -g${GID} -G dialout

RUN cd /tmp/ \
&& wget https://github.com/arduino/arduino-cli/releases/download/0.18.3/arduino-cli_0.18.3_Linux_64bit.tar.gz \
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
DEVICE_SERIAL ?= /dev/ttyACM0
DEVICE_SERIAL ?= /dev/ttyUSB0
KEY_NUM ?= 99
DOCKER_ARDUINO_CLI = docker run --device=$(DEVICE_SERIAL) --mount src="$(shell pwd)",target=/usr/src/app,type=bind -it --rm arduino-cli
DOCKER_PYTHON_CLI = docker run --device=$(DEVICE_SERIAL) --mount src="$(shell pwd)",target=/usr/src/app,type=bind -it --rm hs-ldz-totp-lock
Expand Down Expand Up @@ -33,7 +33,7 @@ generate-example-secrets: build
echo 'xxd -c 22 -s 44 -l 22 ./backup/rawdata.out'
xxd -c 22 -s 0 -l 88 ./backup/rawdata.out

uno-configure-ds3231: ac-build
uno-configure-ds3231: ac-build build
$(DOCKER_ARDUINO_CLI) arduino-cli board list
$(DOCKER_ARDUINO_CLI) bash -c "cd /usr/src/app/configure_DS3231 && arduino-cli compile --fqbn arduino:avr:uno --libraries=../vendor/librares/ && arduino-cli upload -p $(DEVICE_SERIAL) --fqbn arduino:avr:uno"
$(DOCKER_PYTHON_CLI) python ./configure_DS3231/configure_time.py $(DEVICE_SERIAL)
Expand Down

0 comments on commit 28f1b36

Please sign in to comment.