Skip to content

Commit 1d3b3f7

Browse files
authored
Merge pull request #487 from CameronRP/update-test
Update test
2 parents 7274d9f + 8441393 commit 1d3b3f7

File tree

8 files changed

+42
-22
lines changed

8 files changed

+42
-22
lines changed

tc2/basics/config.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,8 @@ gpio=6,12=ip,pd
4949
# Set SWD pins to input so RP2040 can be programmed externally.
5050
gpio=25,24=ip
5151

52+
# Set I2C lock pin to a pull-up input.
53+
gpio=13=ip,pu
54+
5255
# Set GPIO pin to trigger shutdown.
5356
dtoverlay=gpio-shutdown,debounce=1,gpio_pin=26,gpio_pull=up

tc2/event-reporter/init.sls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
event-reporter-pkg:
22
cacophony.pkg_installed_from_github:
33
- name: event-reporter
4-
- version: "3.12.1"
4+
- version: "3.12.2"
55
- architecture: "arm64"
66
- branch: "master"
77

tc2/rpi-net-manager/init.sls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
rpi-net-manager-pkg:
22
cacophony.pkg_installed_from_github:
33
- name: rpi-net-manager
4-
- version: "0.7.1"
4+
- version: "0.7.3"
55
- architecture: "arm64"
66

77
rpi-net-manager-service:

tc2/rtl8821au/init.sls

Lines changed: 34 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{% from "tc2/rtl8821au/map.jinja" import rtl8821au with context %}
22
{% set device_present = salt['cacophony.has_usb_device'](rtl8821au['device_ids']) %}
3-
{% set install_marker = rtl8821au['install_marker'] %}
4-
{% set already_installed = salt['file.file_exists'](install_marker) %}
5-
{% set should_install = rtl8821au['auto_update'] or not already_installed %}
3+
{% set driver_installed = salt['cmd.retcode'](['modinfo', '8821au']) == 0 %}
4+
{% set should_install = rtl8821au['auto_update'] or not driver_installed %}
65
{% set install_command = "./install-driver.sh" %}
76
{% if rtl8821au['install_args'] %}
87
{% set install_command = install_command + " " + " ".join(rtl8821au['install_args']) %}
@@ -17,6 +16,16 @@ rtl8821au-deps:
1716
{% endif %}
1817
1918
{% if should_install %}
19+
rtl8821au-disable-tc2-agent:
20+
service.dead:
21+
- name: tc2-agent
22+
- enable: False
23+
24+
rtl8821au-disable-tc2-hat-attiny:
25+
service.dead:
26+
- name: tc2-hat-attiny
27+
- enable: False
28+
2029
rtl8821au-source:
2130
git.latest:
2231
- name: {{ rtl8821au['repo'] }}
@@ -28,9 +37,6 @@ rtl8821au-source:
2837
- pkg: rtl8821au-deps
2938
{% endif %}
3039
- user: root
31-
{% if not rtl8821au['auto_update'] %}
32-
- unless: test -f "{{ install_marker }}"
33-
{% endif %}
3440
3541
rtl8821au-install:
3642
cmd.run:
@@ -39,6 +45,8 @@ rtl8821au-install:
3945
- unless: modinfo 8821au
4046
- require:
4147
- git: rtl8821au-source
48+
- service: rtl8821au-disable-tc2-agent
49+
- service: rtl8821au-disable-tc2-hat-attiny
4250
4351
rtl8821au-reinstall:
4452
cmd.run:
@@ -49,21 +57,32 @@ rtl8821au-reinstall:
4957
- git: rtl8821au-source
5058
- require:
5159
- git: rtl8821au-source
60+
- service: rtl8821au-disable-tc2-agent
61+
- service: rtl8821au-disable-tc2-hat-attiny
5262
53-
rtl8821au-marker:
54-
file.managed:
55-
- name: {{ install_marker }}
56-
- contents: installed
57-
- makedirs: True
58-
- onlyif: modinfo 8821au
63+
rtl8821au-enable-tc2-agent:
64+
service.running:
65+
- name: tc2-agent
66+
- enable: True
5967
- require:
60-
- git: rtl8821au-source
61-
- unless: test -f "{{ install_marker }}"
68+
- cmd: rtl8821au-install
69+
- cmd: rtl8821au-reinstall
70+
- service: rtl8821au-disable-tc2-agent
71+
72+
rtl8821au-enable-tc2-hat-attiny:
73+
service.running:
74+
- name: tc2-hat-attiny
75+
- enable: True
76+
- require:
77+
- cmd: rtl8821au-install
78+
- cmd: rtl8821au-reinstall
79+
- service: rtl8821au-disable-tc2-hat-attiny
80+
6281
{% else %}
6382
rtl8821au-installed:
6483
test.nop:
6584
- name: rtl8821au
66-
- comment: Driver already installed ({{ install_marker }})
85+
- comment: Driver already installed (modinfo 8821au)
6786
{% endif %}
6887
6988
rtl8821au-modprobe-options:

tc2/rtl8821au/map.jinja

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141

4242
{% set branch = salt['pillar.get']('rtl8821au:branch', 'main') %}
4343
{% set source_dir = salt['pillar.get']('rtl8821au:source_dir', '/usr/local/src/8821au-20210708') %}
44-
{% set install_marker = salt['pillar.get']('rtl8821au:install_marker', source_dir ~ '/.salt-driver-installed') %}
4544
{% set auto_update = salt['pillar.get']('rtl8821au:auto_update', False) %}
4645

4746
{% set rtl8821au = {
@@ -50,7 +49,6 @@
5049
'repo': salt['pillar.get']('rtl8821au:repo', 'https://github.com/morrownr/8821au-20210708.git'),
5150
'branch': branch,
5251
'source_dir': source_dir,
53-
'install_marker': install_marker,
5452
'auto_update': auto_update,
5553
'install_args': salt['pillar.get']('rtl8821au:install_args', ['NoPrompt']),
5654
} %}

tc2/tc2-agent/init.sls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
tc2-agent-pkg:
22
cacophony.pkg_installed_from_github:
33
- name: tc2-agent
4-
- version: "0.5.31"
4+
- version: "0.6.0"
55
- architecture: "arm64"
66
- branch: "main"
77

tc2/tc2-hat-controller/init.sls

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
tc2-hat-controller-pkg:
22
cacophony.pkg_installed_from_github:
33
- name: tc2-hat-controller
4-
- version: "0.21.1"
4+
- version: "0.22.0"
55
- architecture: "arm64"
66
- branch: "main"
77

tc2/thermal-recorder-py/thermal-classifier.service

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ After=multi-user.target
55
[Service]
66
Type=simple
77
ExecStart=/home/pi/.venv/classifier/bin/serve_model
8-
Restart=always
8+
Restart=on-failure
99
RestartSec=3s
1010

1111
[Install]

0 commit comments

Comments
 (0)