diff --git a/clover/src/selfcheck.py b/clover/src/selfcheck.py index d98990e2..a8b194e0 100755 --- a/clover/src/selfcheck.py +++ b/clover/src/selfcheck.py @@ -643,13 +643,22 @@ def check_clover_service(): elif 'failed' in output: failure('service failed to run, check your launch-files') - r = re.compile(r'^(.*)\[(FATAL|ERROR)\] \[\d+.\d+\]: (.*?)(\x1b(.*))?$') + BLACKLIST = 'Unexpected command 520', 'Time jump detected' + + r = re.compile(r'^(.*)\[(FATAL|ERROR| WARN)\] \[\d+.\d+\]: (.*?)(\x1b(.*))?$') error_count = OrderedDict() try: for line in open('/tmp/clover.err', 'r'): + skip = False + for substr in BLACKLIST: + if substr in line: + skip = True + if skip: + continue + node_error = r.search(line) if node_error: - msg = node_error.groups()[1] + ': ' + node_error.groups()[2] + msg = node_error.groups()[1].strip() + ': ' + node_error.groups()[2] if msg in error_count: error_count[msg] += 1 else: diff --git a/clover_blocks/www/python.js b/clover_blocks/www/python.js index afc7ae09..1589cfdf 100644 --- a/clover_blocks/www/python.js +++ b/clover_blocks/www/python.js @@ -464,7 +464,7 @@ Blockly.Python.led_count = function(block) { function pigpio() { Blockly.Python.definitions_['import_pigpio'] = 'import pigpio'; - Blockly.Python.definitions_['init_pigpio'] = 'pi = pigpio.pi()'; + Blockly.Python.definitions_['init_pigpio'] = 'pi = pigpio.pi()\nif not pi.connected: raise Exception(\'Cannot connect to pigpiod\')'; } const GPIO_READ = `\ndef gpio_read(pin): diff --git a/redirects.json b/redirects.json index 17bdfd70..9c75611d 100644 --- a/redirects.json +++ b/redirects.json @@ -63,6 +63,7 @@ { "from": "power/", "to": "en/power.html" }, { "from": "connection/", "to": "en/connection.html" }, { "from": "clover_vm/", "to": "en/simulation_vm.html" }, + { "from": "gpio/", "to": "en/gpio.html" }, { "from": "ru/microsd_images.html", "to": "image.html" }, { "from": "en/microsd_images.html", "to": "image.html" }