diff options
| author | Joel Challis <git@zvecr.com> | 2020-04-26 22:23:54 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-26 22:23:54 +0100 |
| commit | 3cb6fb29359b8fea1087039a4d458c70109fddaf (patch) | |
| tree | e35047da8f008a4338f1619b27fcf01c1c2b1984 | |
| parent | 6ec3cc029ea7f93ddd46b05a703d754231f8a158 (diff) | |
| parent | 5c666398d55708915091a08299dc7d493b37db3c (diff) | |
| download | qmk_firmware-3cb6fb29359b8fea1087039a4d458c70109fddaf.tar.gz qmk_firmware-3cb6fb29359b8fea1087039a4d458c70109fddaf.zip | |
Merge pull request #8931 from kbrock/kle2info_2
[kle2json] fix rounding in output
| -rw-r--r-- | lib/python/kle2xy.py | 4 | ||||
| -rwxr-xr-x | lib/python/qmk/cli/kle2json.py | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/python/kle2xy.py b/lib/python/kle2xy.py index bff1d025b..003476f92 100644 --- a/lib/python/kle2xy.py +++ b/lib/python/kle2xy.py | |||
| @@ -110,8 +110,8 @@ class KLE2xy(list): | |||
| 110 | 110 | ||
| 111 | else: | 111 | else: |
| 112 | current_key['name'] = key | 112 | current_key['name'] = key |
| 113 | current_key['row'] = current_row | 113 | current_key['row'] = round(current_row, 2) |
| 114 | current_key['column'] = current_col | 114 | current_key['column'] = round(current_col, 2) |
| 115 | 115 | ||
| 116 | # Determine the X center | 116 | # Determine the X center |
| 117 | x_center = (current_key['width'] * self.key_width) / 2 | 117 | x_center = (current_key['width'] * self.key_width) / 2 |
diff --git a/lib/python/qmk/cli/kle2json.py b/lib/python/qmk/cli/kle2json.py index 5268462f9..798f95fd1 100755 --- a/lib/python/qmk/cli/kle2json.py +++ b/lib/python/qmk/cli/kle2json.py | |||
| @@ -69,7 +69,7 @@ def kle2json(cli): | |||
| 69 | # Replace layout in keyboard json | 69 | # Replace layout in keyboard json |
| 70 | keyboard = keyboard.replace('"LAYOUT_JSON_HERE"', layout) | 70 | keyboard = keyboard.replace('"LAYOUT_JSON_HERE"', layout) |
| 71 | # Write our info.json | 71 | # Write our info.json |
| 72 | file = open(out_path + "/info.json", "w") | 72 | file = open(out_path / "info.json", "w") |
| 73 | file.write(keyboard) | 73 | file.write(keyboard) |
| 74 | file.close() | 74 | file.close() |
| 75 | cli.log.info('Wrote out {fg_cyan}%s/info.json', out_path) | 75 | cli.log.info('Wrote out {fg_cyan}%s/info.json', out_path) |
