Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nornagon/saxi
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.15.0
Choose a base ref
...
head repository: nornagon/saxi
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
Showing with 8,052 additions and 15,039 deletions.
  1. +0 −24 .circleci/config.yml
  2. +7 −1 .eslintrc.js
  3. +30 −0 .github/workflows/node.js.yml
  4. +1 −0 .gitignore
  5. +57 −0 README.md
  6. 0 cli.js
  7. BIN docs/pi-zero.jpg
  8. +7,740 −14,767 package-lock.json
  9. +28 −26 package.json
  10. +20 −64 src/__tests__/ebb.test.ts
  11. +0 −1 src/background-planner.ts
  12. +7 −6 src/ebb.ts
  13. +0 −1 src/global.d.ts
  14. +1 −1 src/paper-size.ts
  15. +4 −4 src/planning.ts
  16. +1 −0 src/regex-transform-stream.ts
  17. +11 −6 src/serialport-serialport.ts
  18. +40 −32 src/server.ts
  19. +8 −4 src/style.css
  20. +93 −81 src/ui.tsx
  21. +2 −2 src/util.ts
  22. +1 −1 src/vec.ts
  23. +1 −0 tsconfig.web.json
  24. +0 −18 tslint.json
24 changes: 0 additions & 24 deletions .circleci/config.yml

This file was deleted.

8 changes: 7 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: [
'eslint:recommended',
'plugin:react/recommended',
'plugin:@typescript-eslint/recommended',
],
parserOptions: {
ecmaVersion: 2018,
sourceType: 'module',
project: './tsconfig.json',
},
root: true,
rules: {
// Place to specify ESLint rules. Can be used to overwrite rules specified from the extended configs
// e.g. "@typescript-eslint/explicit-function-return-type": "off",
@@ -27,4 +29,8 @@ module.exports = {
version: 'detect',
},
},
ignorePatterns: [
'*.js',
'__tests__',
],
};
30 changes: 30 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js CI

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/

steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm test
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules/
dist/
.eslintcache
.vscode
57 changes: 57 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# saxi
##### make plot good

### ARCHIVED
!! NOTE !! Development has moved to https://github.com/alexrudd2/saxi

saxi is a tool for interacting with the [AxiDraw
drawing machine](https://axidraw.com/) by Evil Mad Scientist. It comes with an
easy-to-use interface, and is exactingly precise.
@@ -34,6 +37,60 @@ $ sudo apt-get install -y nodejs

and then proceed as above :) If you connect to the raspberry pi over ssh, you might want to run the `saxi` server inside a tmux or screen session to have it stay running even if your ssh session disconnects.

If you want `saxi` to run at boot on the Pi you can use a systemd unit file and enable the service:

```bash
sudo tee /lib/systemd/system/saxi.service <<EOF
[Unit]
Description=Saxi
After=network.target
[Service]
ExecStart=saxi
Restart=always
User=pi
[Install]
WantedBy=multi-user.target
EOF
sudo systemctl enable saxi.service
```

To watch the logs while it is running, use:
```bash
journalctl -f -u saxi
```

#### Raspberry Pi Zero OTG

![Pi Zero on an AxiDraw with a Y-shaped USB cable](docs/pi-zero.jpg)

For the Pi Zero you can make a USB "OTG" cable out of two Micro-B cables and two 0.1" headers
to tap into the AxiDraw's 5V servo supply to power the Pi. This makes for a more compact
installation without the need for an additional wall-wart.


```
+------ Center pin on servo rail
| +---- Ground pin on servo rail
| |
| |
Red -----+-|---- Red
Black -------+---- Black
White ------------ White
Green ------------ Green (sometimes Blue)
```

The Pi will also need to have the `dr_mode=host` parameter set in
`config.txt` to force host mode, since normal USB Micro cables do not
include the `ID` pin that would be used to signal that it is an OTG
connection.

```
echo dtoverly=dwc2,dr_mode=host | sudo tee -a /boot/config.txt
```


#### CORS
If you want to connect to saxi from a web page that isn't served by saxi
itself, you'll need to enable
Empty file modified cli.js
100644 → 100755
Empty file.
Binary file added docs/pi-zero.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading