Code Monkey home page Code Monkey logo

batrack's People

Contributors

jonashoechst avatar lampep avatar tnauss avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

trackit-systems

batrack's Issues

late trigger of vhf sensor

Scenario: Bat is in the roost, leaving the roost and flying around a bit and leaving the observation area. Later come back.

Observation: Trigger is thrown too late. Many signals are detected without triggering.


BatRack log:

Dec 18 09:34:12 nature40-sensorbox-15cb4efd python3[1797]: INFO:batrack.sensors:setting VHFAnalysisUnit trigger True: vhf, 150.197 MHz, 80.121 dBm, 52 sigs, 3.565656692072465:.3f var
Dec 18 09:34:14 nature40-sensorbox-15cb4efd python3[1797]: INFO:batrack.sensors:setting VHFAnalysisUnit trigger True: vhf, 150.197 MHz, 78.8195 dBm, 52 sigs, 3.5438625126561365:.3f var
Dec 18 09:34:14 nature40-sensorbox-15cb4efd python3[1797]: INFO:batrack.sensors:setting VHFAnalysisUnit trigger True: vhf, 150.197 MHz, 71.7052 dBm, 52 sigs, 3.5716844730380126:.3f var
Dec 18 09:34:20 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:VHFAnalysisUnit     : running: 1, alive: 1, recording: 0, use_trigger: 1, trigger: 1
Dec 18 09:34:20 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:AudioAnalysisUnit   : running: 1, alive: 1, recording: 1, use_trigger: 0, trigger: 0
Dec 18 09:34:20 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:CameraAnalysisUnit  : running: 1, alive: 1, recording: 1, use_trigger: 0, trigger: 0
Dec 18 09:34:24 nature40-sensorbox-15cb4efd python3[1797]: INFO:batrack.sensors:setting VHFAnalysisUnit trigger False: vhf, timeout
Dec 18 09:34:24 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:System un-triggered, stopping recordings
Dec 18 09:34:24 nature40-sensorbox-15cb4efd python3[1797]: INFO:batrack.sensors:Stopping camera recording
Dec 18 09:34:24 nature40-sensorbox-15cb4efd python3[1797]: INFO:batrack.sensors:Powering light off
Dec 18 09:34:24 nature40-sensorbox-15cb4efd python3[1797]: INFO:batrack.sensors:ping 1
Dec 18 09:34:24 nature40-sensorbox-15cb4efd python3[1797]: INFO:batrack.sensors:setting AudioAnalysisUnit trigger True: audio, 2 pings
Dec 18 09:34:25 nature40-sensorbox-15cb4efd python3[1797]: INFO:batrack.sensors:setting AudioAnalysisUnit trigger False: audio, 21 quiet blocks
Dec 18 09:34:30 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:VHFAnalysisUnit     : running: 1, alive: 1, recording: 0, use_trigger: 1, trigger: 0
Dec 18 09:34:30 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:AudioAnalysisUnit   : running: 1, alive: 1, recording: 0, use_trigger: 0, trigger: 0
Dec 18 09:34:30 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:CameraAnalysisUnit  : running: 1, alive: 1, recording: 0, use_trigger: 0, trigger: 0
Dec 18 09:34:40 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:VHFAnalysisUnit     : running: 1, alive: 1, recording: 0, use_trigger: 1, trigger: 0
Dec 18 09:34:40 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:AudioAnalysisUnit   : running: 1, alive: 1, recording: 0, use_trigger: 0, trigger: 0
Dec 18 09:34:40 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:CameraAnalysisUnit  : running: 1, alive: 1, recording: 0, use_trigger: 0, trigger: 0
Dec 18 09:34:50 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:VHFAnalysisUnit     : running: 1, alive: 1, recording: 0, use_trigger: 1, trigger: 0
Dec 18 09:34:50 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:AudioAnalysisUnit   : running: 1, alive: 1, recording: 0, use_trigger: 0, trigger: 0
Dec 18 09:34:50 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:CameraAnalysisUnit  : running: 1, alive: 1, recording: 0, use_trigger: 0, trigger: 0
Dec 18 09:35:00 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:VHFAnalysisUnit     : running: 1, alive: 1, recording: 0, use_trigger: 1, trigger: 0
Dec 18 09:35:00 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:AudioAnalysisUnit   : running: 1, alive: 1, recording: 0, use_trigger: 0, trigger: 0
Dec 18 09:35:00 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:CameraAnalysisUnit  : running: 1, alive: 1, recording: 0, use_trigger: 0, trigger: 0
Dec 18 09:35:10 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:VHFAnalysisUnit     : running: 1, alive: 1, recording: 0, use_trigger: 1, trigger: 0
Dec 18 09:35:10 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:AudioAnalysisUnit   : running: 1, alive: 1, recording: 0, use_trigger: 0, trigger: 0
Dec 18 09:35:10 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:CameraAnalysisUnit  : running: 1, alive: 1, recording: 0, use_trigger: 0, trigger: 0
Dec 18 09:35:20 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:VHFAnalysisUnit     : running: 1, alive: 1, recording: 0, use_trigger: 1, trigger: 0
Dec 18 09:35:20 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:AudioAnalysisUnit   : running: 1, alive: 1, recording: 0, use_trigger: 0, trigger: 0
Dec 18 09:35:20 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:CameraAnalysisUnit  : running: 1, alive: 1, recording: 0, use_trigger: 0, trigger: 0
Dec 18 09:35:30 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:VHFAnalysisUnit     : running: 1, alive: 1, recording: 0, use_trigger: 1, trigger: 0
Dec 18 09:35:30 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:AudioAnalysisUnit   : running: 1, alive: 1, recording: 0, use_trigger: 0, trigger: 0
Dec 18 09:35:30 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:CameraAnalysisUnit  : running: 1, alive: 1, recording: 0, use_trigger: 0, trigger: 0
Dec 18 09:35:40 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:VHFAnalysisUnit     : running: 1, alive: 1, recording: 0, use_trigger: 1, trigger: 0
Dec 18 09:35:40 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:AudioAnalysisUnit   : running: 1, alive: 1, recording: 0, use_trigger: 0, trigger: 0
Dec 18 09:35:40 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:CameraAnalysisUnit  : running: 1, alive: 1, recording: 0, use_trigger: 0, trigger: 0
Dec 18 09:35:50 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:VHFAnalysisUnit     : running: 1, alive: 1, recording: 0, use_trigger: 1, trigger: 0
Dec 18 09:35:50 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:AudioAnalysisUnit   : running: 1, alive: 1, recording: 0, use_trigger: 0, trigger: 0
Dec 18 09:35:50 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:CameraAnalysisUnit  : running: 1, alive: 1, recording: 0, use_trigger: 0, trigger: 0
Dec 18 09:36:00 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:VHFAnalysisUnit     : running: 1, alive: 1, recording: 0, use_trigger: 1, trigger: 0
Dec 18 09:36:00 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:AudioAnalysisUnit   : running: 1, alive: 1, recording: 0, use_trigger: 0, trigger: 0
Dec 18 09:36:00 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:CameraAnalysisUnit  : running: 1, alive: 1, recording: 0, use_trigger: 0, trigger: 0
Dec 18 09:36:10 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:VHFAnalysisUnit     : running: 1, alive: 1, recording: 0, use_trigger: 1, trigger: 0
Dec 18 09:36:10 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:AudioAnalysisUnit   : running: 1, alive: 1, recording: 0, use_trigger: 0, trigger: 0
Dec 18 09:36:10 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:CameraAnalysisUnit  : running: 1, alive: 1, recording: 0, use_trigger: 0, trigger: 0
Dec 18 09:36:20 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:VHFAnalysisUnit     : running: 1, alive: 1, recording: 0, use_trigger: 1, trigger: 0
Dec 18 09:36:20 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:AudioAnalysisUnit   : running: 1, alive: 1, recording: 0, use_trigger: 0, trigger: 0
Dec 18 09:36:20 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:CameraAnalysisUnit  : running: 1, alive: 1, recording: 0, use_trigger: 0, trigger: 0
Dec 18 09:36:30 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:VHFAnalysisUnit     : running: 1, alive: 1, recording: 0, use_trigger: 1, trigger: 0
Dec 18 09:36:30 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:AudioAnalysisUnit   : running: 1, alive: 1, recording: 0, use_trigger: 0, trigger: 0
Dec 18 09:36:30 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:CameraAnalysisUnit  : running: 1, alive: 1, recording: 0, use_trigger: 0, trigger: 0
Dec 18 09:36:40 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:VHFAnalysisUnit     : running: 1, alive: 1, recording: 0, use_trigger: 1, trigger: 0
Dec 18 09:36:40 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:AudioAnalysisUnit   : running: 1, alive: 1, recording: 0, use_trigger: 0, trigger: 0
Dec 18 09:36:40 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:CameraAnalysisUnit  : running: 1, alive: 1, recording: 0, use_trigger: 0, trigger: 0
Dec 18 09:36:50 nature40-sensorbox-15cb4efd python3[1797]: INFO:batrack.sensors:setting VHFAnalysisUnit trigger True: vhf, 150.197 MHz, 70.1991 dBm, 20 sigs, 2.1447805834397147:.3f var
Dec 18 09:36:50 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:System triggered, starting recordings
Dec 18 09:36:50 nature40-sensorbox-15cb4efd python3[1797]: INFO:batrack.sensors:creating wav file '/data/nature40-sensorbox-15cb4efd/BatRack/2020-12-18T09_36_50.wav'
Dec 18 09:36:50 nature40-sensorbox-15cb4efd python3[1797]: INFO:batrack.sensors:Powering light on
Dec 18 09:36:50 nature40-sensorbox-15cb4efd python3[1797]: INFO:batrack.sensors:Starting camera recording
Dec 18 09:36:50 nature40-sensorbox-15cb4efd python3[1797]: INFO:batrack.sensors:ping 0
Dec 18 09:36:50 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:VHFAnalysisUnit     : running: 1, alive: 1, recording: 0, use_trigger: 1, trigger: 1
Dec 18 09:36:50 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:AudioAnalysisUnit   : running: 1, alive: 1, recording: 1, use_trigger: 0, trigger: 0
Dec 18 09:36:50 nature40-sensorbox-15cb4efd python3[1797]: INFO:__main__:CameraAnalysisUnit  : running: 1, alive: 1, recording: 1, use_trigger: 0, trigger: 0
Dec 18 09:36:51 nature40-sensorbox-15cb4efd python3[1797]: INFO:batrack.sensors:setting VHFAnalysisUnit trigger True: vhf, 150.197 MHz, 71.4142 dBm, 21 sigs, 2.1702699302108317:.3f var
Dec 18 09:36:51 nature40-sensorbox-15cb4efd python3[1797]: INFO:batrack.sensors:setting VHFAnalysisUnit trigger True: vhf, 150.197 MHz, 71.3181 dBm, 22 sigs, 2.1916434297299636:.3f var
Dec 18 09:36:52 nature40-sensorbox-15cb4efd python3[1797]: INFO:batrack.sensors:setting VHFAnalysisUnit trigger True: vhf, 150.197 MHz, 71.2277 dBm, 23 sigs, 2.209593424310488:.3f var
Dec 18 09:36:52 nature40-sensorbox-15cb4efd python3[1797]: INFO:batrack.sensors:setting VHFAnalysisUnit trigger True: vhf, 150.197 MHz, 71.021 dBm, 24 sigs, 2.2304663639148563:.3f var
Dec 18 09:36:53 nature40-sensorbox-15cb4efd python3[1797]: INFO:batrack.sensors:setting VHFAnalysisUnit trigger True: vhf, 150.197 MHz, 71.4435 dBm, 25 sigs, 2.2270334071100066:.3f var
Dec 18 09:36:53 nature40-sensorbox-15cb4efd python3[1797]: INFO:batrack.sensors:setting VHFAnalysisUnit trigger True: vhf, 150.197 MHz, 71.669 dBm, 26 sigs, 2.2133289854749996:.3f var
Dec 18 09:36:54 nature40-sensorbox-15cb4efd python3[1797]: INFO:batrack.sensors:setting VHFAnalysisUnit trigger True: vhf, 150.197 MHz, 71.602 dBm, 27 sigs, 2.2004514798868167:.3f var
Dec 18 09:36:54 nature40-sensorbox-15cb4efd python3[1797]: INFO:batrack.sensors:setting VHFAnalysisUnit trigger True: vhf, 150.197 MHz, 71.7391 dBm, 28 sigs, 2.182722342462669:.3f var
Dec 18 09:36:55 nature40-sensorbox-15cb4efd python3[1797]: INFO:batrack.sensors:setting VHFAnalysisUnit trigger True: vhf, 150.197 MHz, 71.899 dBm, 29 sigs, 2.1608714068642705:.3f var
Dec 18 09:36:55 nature40-sensorbox-15cb4efd python3[1797]: INFO:batrack.sensors:setting VHFAnalysisUnit trigger True: vhf, 150.197 MHz, 72.1133 dBm, 30 sigs, 2.1350742776072225:.3f var
Dec 18 09:36:56 nature40-sensorbox-15cb4efd python3[1797]: INFO:batrack.sensors:setting VHFAnalysisUnit trigger True: vhf, 150.197 MHz, 71.8972 dBm, 31 sigs, 2.1139798748816867:.3f var
Dec 18 09:36:58 nature40-sensorbox-15cb4efd python3[1797]: INFO:batrack.sensors:setting VHFAnalysisUnit trigger True: vhf, 150.197 MHz, 71.8709 dBm, 32 sigs, 2.0936847843574746:.3f var

RadioTracking log:

2020-12-18 08:34:11.786306199;    6352; 0.009600;    72720.585938; 3750.000000;  80.121033; -67.694611
2020-12-18 08:34:12.253506135;    8704; 0.012800;    72861.835938; 3750.000000;  78.819534; -67.694611
2020-12-18 08:34:12.723906215;   11040; 0.009600;    72847.218750; 2500.000000;  71.705154; -67.694611
2020-12-18 08:34:20.966026403; ; ; ; ; 
2020-12-18 08:34:31.431719941; ; ; ; ; 
2020-12-18 08:34:41.900588947; ; ; ; ; 
2020-12-18 08:34:51.973172537; ; ; ; ; 
2020-12-18 08:35:02.417105189; ; ; ; ; 
2020-12-18 08:35:12.916027738; ; ; ; ; 
2020-12-18 08:35:23.376234661; ; ; ; ; 
2020-12-18 08:35:33.846100855; ; ; ; ; 
2020-12-18 08:35:44.296858715; ; ; ; ; 
2020-12-18 08:35:54.371283920; ; ; ; ; 
2020-12-18 08:36:04.810953603; ; ; ; ; 
2020-12-18 08:36:15.284090110; ; ; ; ; 
2020-12-18 08:36:25.781466616; ; ; ; ; 
2020-12-18 08:36:36.229951820; ; ; ; ; 
2020-12-18 08:36:38.927551692;   13536; 0.009600;    72500.000000; 1875.000000;  71.336472; -67.694611
2020-12-18 08:36:39.394751756;   15872; 0.009600;    72589.289062; 3125.000000;  75.938828; -67.694611
2020-12-18 08:36:39.858751756;   18208; 0.012800;    72633.929688; 3125.000000;  75.673355; -67.694611
2020-12-18 08:36:40.325951540;   20528; 0.009600;    72812.500000; 2500.000000;  75.338081; -67.694611
2020-12-18 08:36:40.793151820;   22864; 0.009600;    72812.500000; 2500.000000;  75.239532; -67.694611
2020-12-18 08:36:41.260351620;   25200; 0.009600;    72812.500000; 2500.000000;  75.376923; -67.694611
2020-12-18 08:36:41.724351852;   27520; 0.009600;    72727.273438; 2500.000000;  75.146042; -67.694611
2020-12-18 08:36:42.191551628;   29856; 0.009600;    72692.304688; 3125.000000;  75.477890; -67.694611
2020-12-18 08:36:42.658751436;   32192; 0.009600;    72812.500000; 2500.000000;  75.329086; -67.694611
2020-12-18 08:36:43.122751692;   34528; 0.012800;    72760.414062; 2500.000000;  75.272217; -67.694611
2020-12-18 08:36:43.589951468;   36848; 0.009600;    72812.500000; 2500.000000;  75.156242; -67.694611
2020-12-18 08:36:44.057151756;   39184; 0.009600;    72812.500000; 2500.000000;  75.014740; -67.694611
2020-12-18 08:36:44.521151500;   41520; 0.012800;    72740.382812; 2500.000000;  75.370537; -67.694611
2020-12-18 08:36:44.988351756;   43840; 0.009600;    72812.500000; 2500.000000;  75.321068; -67.694611
2020-12-18 08:36:45.455552060;   46176; 0.009600;    72812.500000; 2500.000000;  75.376656; -67.694611
2020-12-18 08:36:45.919551820;   48512; 0.012800;    72740.382812; 2500.000000;  74.970978; -67.694611
2020-12-18 08:36:46.683261556; ; ; ; ; 
2020-12-18 08:36:48.238461556;    7824; 0.009600;    72500.000000; 1875.000000;  70.242188; -67.694611
2020-12-18 08:36:49.169661460;   12480; 0.009600;    72578.125000; 1875.000000;  70.267632; -67.694611
2020-12-18 08:36:50.100861460;   17136; 0.009600;    72500.000000; 1875.000000;  70.107880; -67.694611
2020-12-18 08:36:50.568061492;   19472; 0.009600;    72500.000000; 1875.000000;  70.199104; -67.694611
2020-12-18 08:36:51.032061268;   21792; 0.009600;    72500.000000; 1875.000000;  71.414154; -67.694611
2020-12-18 08:36:51.499261556;   24128; 0.009600;    72500.000000; 1875.000000;  71.318146; -67.694611

gpiozero seems to fall back to other libs

May 18 12:46:29 mof-batrack-00001 python3[943]: /usr/local/lib/python3.7/dist-packages/gpiozero/devices.py:290: PinFactoryFallback: Falling back from rpigpio: No module named 'RPi'
May 18 12:46:29 mof-batrack-00001 python3[943]:   'Falling back from %s: %s' % (name, str(e))))
May 18 12:46:29 mof-batrack-00001 python3[943]: /usr/local/lib/python3.7/dist-packages/gpiozero/devices.py:290: PinFactoryFallback: Falling back from lgpio: No module named 'lgpio'
May 18 12:46:29 mof-batrack-00001 python3[943]:   'Falling back from %s: %s' % (name, str(e))))
May 18 12:46:29 mof-batrack-00001 python3[943]: /usr/local/lib/python3.7/dist-packages/gpiozero/devices.py:290: PinFactoryFallback: Falling back from rpio: No module named 'RPIO'
May 18 12:46:29 mof-batrack-00001 python3[943]:   'Falling back from %s: %s' % (name, str(e))))
May 18 12:46:29 mof-batrack-00001 python3[943]: /usr/local/lib/python3.7/dist-packages/gpiozero/devices.py:290: PinFactoryFallback: Falling back from pigpio: No module named 'pigpio'
May 18 12:46:29 mof-batrack-00001 python3[943]:   'Falling back from %s: %s' % (name, str(e))))
May 18 12:46:29 mof-batrack-00001 python3[943]: /usr/local/lib/python3.7/dist-packages/gpiozero/devices.py:285: NativePinFactoryFallback: Falling back to the experimental pin factory NativeFactory because no other pin factory could be loaded. For best results, install RPi.GPIO or pigpio. See https://gpiozero.readthedocs.io/en/stable/api_pins.html for more information.

Booting the BatRack image after heavy rainfalls leads to an error in the scheduling

Jul 15 09:37:19 mof-batrack-00001 python3[913]: Traceback (most recent call last):
Jul 15 09:37:19 mof-batrack-00001 python3[913]:   File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
Jul 15 09:37:19 mof-batrack-00001 python3[913]:     "__main__", mod_spec)
Jul 15 09:37:19 mof-batrack-00001 python3[913]:   File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
Jul 15 09:37:19 mof-batrack-00001 python3[913]:     exec(code, run_globals)
Jul 15 09:37:19 mof-batrack-00001 python3[913]:   File "/home/pi/BatRack/batrack/__main__.py", line 289, in <module>
Jul 15 09:37:19 mof-batrack-00001 python3[913]:     schedule.run_pending()
Jul 15 09:37:19 mof-batrack-00001 python3[913]:   File "/usr/local/lib/python3.7/dist-packages/schedule/__init__.py", line 780, in run_pending
Jul 15 09:37:19 mof-batrack-00001 python3[913]: INFO:batrack.sensors:Found an input: device 1 - UltraMic384K 16bit r0: USB Audio (hw:1,0)
Jul 15 09:37:19 mof-batrack-00001 python3[913]: INFO:root:MQTT connection established (0)
Jul 15 09:37:19 mof-batrack-00001 python3[913]:     default_scheduler.run_pending()
Jul 15 09:37:19 mof-batrack-00001 python3[913]:   File "/usr/local/lib/python3.7/dist-packages/schedule/__init__.py", line 100, in run_pending
Jul 15 09:37:19 mof-batrack-00001 python3[913]: INFO:root:Subscribed to +/radiotracking/matched/cbor
Jul 15 09:37:19 mof-batrack-00001 python3[913]:     self._run_job(job)
Jul 15 09:37:19 mof-batrack-00001 python3[913]:   File "/usr/local/lib/python3.7/dist-packages/schedule/__init__.py", line 172, in _run_job
Jul 15 09:37:19 mof-batrack-00001 python3[913]:     ret = job.run()
Jul 15 09:37:19 mof-batrack-00001 python3[913]:   File "/usr/local/lib/python3.7/dist-packages/schedule/__init__.py", line 661, in run
Jul 15 09:37:19 mof-batrack-00001 python3[913]: INFO:__main__:BatRack [run.1] finished
Jul 15 09:37:20 mof-batrack-00001 python3[913]:     ret = self.job_func()
Jul 15 09:37:20 mof-batrack-00001 python3[913]:   File "/home/pi/BatRack/batrack/__main__.py", line 233, in stop_and_remove
Jul 15 09:37:20 mof-batrack-00001 python3[913]:     instance.stop()
Jul 15 09:37:20 mof-batrack-00001 python3[913]:   File "/home/pi/BatRack/batrack/__main__.py", line 191, in stop
Jul 15 09:37:20 mof-batrack-00001 python3[913]:     [unit.stop() for unit in self._units]
Jul 15 09:37:20 mof-batrack-00001 python3[913]:   File "/home/pi/BatRack/batrack/__main__.py", line 191, in <listcomp>
Jul 15 09:37:20 mof-batrack-00001 python3[913]:     [unit.stop() for unit in self._units]
Jul 15 09:37:20 mof-batrack-00001 python3[913]:   File "/home/pi/BatRack/batrack/sensors.py", line 71, in stop
Jul 15 09:37:20 mof-batrack-00001 python3[913]:     self.join()
Jul 15 09:37:20 mof-batrack-00001 python3[913]:   File "/usr/lib/python3.7/threading.py", line 1027, in join
Jul 15 09:37:20 mof-batrack-00001 python3[913]:     raise RuntimeError("cannot join thread before it is started")
Jul 15 09:37:20 mof-batrack-00001 python3[913]: RuntimeError: cannot join thread before it is started

Evaluate errors in analysis units

Whenever fatal errors occur in certain units and execution of those stops, BatRack should terminate itself, instead of continuing execution in this failed state.

Bug: Race condition when stopping audio recording

In thread 1, there runs an audio recording, thread 2 stops this recording. Since the check, if a wave file exists is not atom, the 2nd thread can be scheduled in-between the check and writing data on the then-closed file.

BatRack/batrack/sensors.py

Lines 215 to 217 in 2d17d5d

# if a wave file is opened, write the frame to this file
if self.__wave:
self.__wave_write(frame)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.