Преглед на файлове

extend readme and status output

Thomas Buck преди 2 месеца
родител
ревизия
0f8d8efd8a
променени са 2 файла, в които са добавени 26 реда и са изтрити 2 реда
  1. 22
    0
      README.md
  2. 4
    2
      docs/src/js/3d.js

+ 22
- 0
README.md Целия файл

35
 After the firmware has been flashed once you can just use the included `flash.sh` to avoid having to hold the button.
35
 After the firmware has been flashed once you can just use the included `flash.sh` to avoid having to hold the button.
36
 Use `debug.sh` to open a serial console via USB.
36
 Use `debug.sh` to open a serial console via USB.
37
 
37
 
38
+## Documentation
39
+
40
+You can find the [documentation here on GitHub pages](https://xythobuz.github.io/lars/).
41
+
42
+The docs are built using [mdbook](https://github.com/rust-lang/mdBook), licensed as `MPL-2.0`.
43
+Get the [latest release from GitHub](https://github.com/rust-lang/mdBook/releases) for a pre-built binary if you want to test changes to the docs locally.
44
+
45
+    ./docs/generate_docs.sh serve
46
+
47
+This will open your browser to a local development instance of the docs.
48
+
38
 ## Hardware Connections
49
 ## Hardware Connections
39
 
50
 
51
+These are the used pins on the first prototype.
52
+Follow these if you want to build your own version without the included PCB design.
53
+
40
     Pin 1    GP0    I2C0 SDA
54
     Pin 1    GP0    I2C0 SDA
41
     Pin 2    GP1    I2C0 SCL
55
     Pin 2    GP1    I2C0 SCL
42
 
56
 
69
 
83
 
70
 The code in `src/encoder.c` is derived from [mathertel/RotaryEncoder](https://github.com/mathertel/RotaryEncoder) and therefore licensed as BSD 3-clause.
84
 The code in `src/encoder.c` is derived from [mathertel/RotaryEncoder](https://github.com/mathertel/RotaryEncoder) and therefore licensed as BSD 3-clause.
71
 
85
 
86
+The docs are built using [mdbook](https://github.com/rust-lang/mdBook), licensed as `MPL-2.0`.
87
+
88
+The PCB SVG files in the documentation are displayed using [svg-pan-zoom](https://github.com/bumbu/svg-pan-zoom), licensed as `BSD-2-Clause`.
89
+
90
+The 3D PCB files in the documentation are displayed using [three.js](hhttps://github.com/mrdoob/three.js), licensed as `MIT`.
91
+
92
+Some code in `docs/src/js/3d.js` is derived from [a blog post of Michal Jirků](https://wejn.org/2020/12/cracking-the-threejs-object-fitting-nut/).
93
+
72
     This program is free software: you can redistribute it and/or modify
94
     This program is free software: you can redistribute it and/or modify
73
     it under the terms of the GNU General Public License as published by
95
     it under the terms of the GNU General Public License as published by
74
     the Free Software Foundation, either version 3 of the License, or
96
     the Free Software Foundation, either version 3 of the License, or

+ 4
- 2
docs/src/js/3d.js Целия файл

142
                 scene.add(mesh);
142
                 scene.add(mesh);
143
                 fitCameraToObject(camera, scene, 0, controls, 0);
143
                 fitCameraToObject(camera, scene, 0, controls, 0);
144
                 controls.update();
144
                 controls.update();
145
+                status.textContent = "Loaded STL 100%";
145
             },
146
             },
146
             (xhr) => {
147
             (xhr) => {
147
-                const s = (xhr.loaded / xhr.total) * 100 + '% loaded';
148
+                const s = Math.floor((xhr.loaded / xhr.total) * 100) + '% loaded';
148
                 console.log(s);
149
                 console.log(s);
149
                 status.textContent = s;
150
                 status.textContent = s;
150
             },
151
             },
164
                 scene.add(object);
165
                 scene.add(object);
165
                 fitCameraToObject(camera, scene, 0, controls, 0);
166
                 fitCameraToObject(camera, scene, 0, controls, 0);
166
                 controls.update();
167
                 controls.update();
168
+                status.textContent = "Loaded VRML 100%";
167
             },
169
             },
168
             (xhr) => {
170
             (xhr) => {
169
-                const s = (xhr.loaded / xhr.total) * 100 + '% loaded';
171
+                const s = Math.floor((xhr.loaded / xhr.total) * 100) + '% loaded';
170
                 console.log(s);
172
                 console.log(s);
171
                 status.textContent = s;
173
                 status.textContent = s;
172
             },
174
             },

Loading…
Отказ
Запис