Skip to content
This repository was archived by the owner on Oct 27, 2018. It is now read-only.

Commit 23452ed

Browse files
committed
watch script is now stopped during update
1 parent c7a35f5 commit 23452ed

File tree

5 files changed

+34
-20
lines changed

5 files changed

+34
-20
lines changed

board/raspberrypi/config.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
start_file=start.elf
22
fixup_file=fixup.elf
3-
arm_freq=800
4-
core_freq=500
5-
sdram_freq=500
6-
over_voltage=6
3+
arm_freq=700
4+
core_freq=250
5+
sdram_freq=400
6+
over_voltage=0
7+
gpu_mem=128
78
gpu_mem_256=128
89
gpu_mem_512=128
910
disable_camera_led=0
11+
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
bcm2835-v4l2
1+
bcm2835-v4l2 max_video_width=2592 max_video_height=1944
22

board/raspberrypi/overlay/programs/motioneye/src/boardctl.py

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,17 @@
1818
import logging
1919
import os.path
2020

21-
from config import additional_config, additional_section
21+
from config import additional_config
2222

2323

2424
CONFIG_TXT = '/boot/config.txt'
2525

2626
OVERCLOCK = {
27-
'700': '700|250|400|0',
28-
'800': '800|250|400|0',
29-
'900': '900|250|450|0',
30-
'950': '950|250|450|0',
31-
'1000': '1000|500|600|6'
27+
700: '700|250|400|0',
28+
800: '800|250|400|0',
29+
900: '900|250|450|0',
30+
950: '950|250|450|0',
31+
1000: '1000|500|600|6'
3232
}
3333

3434
def _get_board_settings():
@@ -156,14 +156,18 @@ def _set_board_settings(s):
156156

157157
with open(CONFIG_TXT, 'w') as f:
158158
for line in lines:
159-
f.write(line + '\n')
159+
if not line.strip():
160+
continue
161+
if not line.endswith('\n'):
162+
line += '\n'
163+
f.write(line)
160164

161165

162-
@additional_section
163-
def board():
166+
@additional_config
167+
def boardSeparator():
164168
return {
165-
'label': 'Raspberry PI Tweaks',
166-
'description': 'tweak your Raspberry PI board',
169+
'type': 'separator',
170+
'section': 'expertSettings',
167171
'advanced': True
168172
}
169173

@@ -176,7 +180,7 @@ def gpuMem():
176180
'type': 'number',
177181
'min': '16',
178182
'max': '448',
179-
'section': 'board',
183+
'section': 'expertSettings',
180184
'advanced': True,
181185
'reboot': True,
182186
'get': _get_board_settings,
@@ -191,7 +195,7 @@ def cameraLed():
191195
'label': 'Enable CSI Camera Led',
192196
'description': 'control the led on the CSI camera board',
193197
'type': 'bool',
194-
'section': 'board',
198+
'section': 'expertSettings',
195199
'advanced': True,
196200
'reboot': True,
197201
'get': _get_board_settings,
@@ -213,10 +217,11 @@ def overclock():
213217
('950|250|450|0', 'high (950/250/450/0)'),
214218
('1000|500|600|6', 'turbo (1000/500/600/6)')
215219
],
216-
'section': 'board',
220+
'section': 'expertSettings',
217221
'advanced': True,
218222
'reboot': True,
219223
'get': _get_board_settings,
220224
'set': _set_board_settings,
221225
'get_set_dict': True
222226
}
227+

package/motioneye/extractl.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,11 @@ def _set_motioneye_settings(s):
9898

9999
with open(MOTIONEYE_CONF, 'w') as f:
100100
for line in lines:
101-
f.write(line + '\n')
101+
if not line.strip():
102+
continue
103+
if not line.endswith('\n'):
104+
line += '\n'
105+
f.write(line)
102106

103107

104108
def _get_date_settings():

package/motioneye/update.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,9 @@ def perform_update(version):
185185
logging.info('killing motioneye init script...')
186186
os.system('kill $(pidof S95motioneye)')
187187

188+
logging.info('stopping netwatch init script...')
189+
os.system('/etc/init.d/S41netwatch stop')
190+
188191
download(version)
189192

190193
logging.info('backing up /boot/config.txt')

0 commit comments

Comments
 (0)