From 353cbb0eea758b94944e01cfe74d1b6d6ff94a84 Mon Sep 17 00:00:00 2001 From: David Carley Date: Tue, 2 Mar 2021 07:56:53 -0800 Subject: [PATCH] Pinned cbang, updated .gitignore, bumped version --- .gitignore | 3 +++ Makefile | 1 + package.json | 2 +- src/py/bbctrl/Config.py | 6 ++++-- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 2157929..8f3cf82 100644 --- a/.gitignore +++ b/.gitignore @@ -19,7 +19,10 @@ __pycache__ *.deb *.zip /rpi-share +/rpi-root /package-lock.json +/src/bbserial/linux-rpi-raspberrypi-kernel* +/src/bbserial/raspberrypi-kernel* *.elf *.hex diff --git a/Makefile b/Makefile index ee8c2c6..6803221 100644 --- a/Makefile +++ b/Makefile @@ -60,6 +60,7 @@ $(GPLAN_MOD): $(GPLAN_IMG) ./scripts/gplan-init-build.sh git -C rpi-share/cbang fetch git -C rpi-share/cbang reset --hard FETCH_HEAD + git -C rpi-share/cbang checkout 18f1e963107ef26abe750c023355a5c40dd07853 git -C rpi-share/camotics fetch git -C rpi-share/camotics reset --hard FETCH_HEAD git -C rpi-share/camotics checkout ec876c80d20fc19837133087cef0c447df5a939d diff --git a/package.json b/package.json index 1e3b07e..c8da749 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bbctrl", - "version": "1.0.6", + "version": "1.0.7b0", "homepage": "https://onefinitycnc.com/", "repository": "https://github.com/OneFinityCNC/onefinity", "license": "GPL-3.0+", diff --git a/src/py/bbctrl/Config.py b/src/py/bbctrl/Config.py index 0034cfe..83d61c8 100644 --- a/src/py/bbctrl/Config.py +++ b/src/py/bbctrl/Config.py @@ -137,7 +137,9 @@ class Config(object): def upgrade(self, config): - version = tuple(map(int, config['version'].split('.'))) + version = config['version'] + version = version.split('b')[0] # Strip off any "beta" suffix + version = tuple(map(int, version.split('.'))) # Break it into a tuple of integers if version < (0, 2, 4): for motor in config['motors']: @@ -177,7 +179,7 @@ class Config(object): self._update(config, False) with open(self.ctrl.get_path('config.json'), 'w') as f: - json.dump(config, f) + json.dump(config, f, indent=2) os.sync()