Skip to content

Commit

Permalink
chore: Format fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Billiam committed Aug 15, 2024
1 parent cfc9311 commit c7f1bd5
Show file tree
Hide file tree
Showing 6 changed files with 84 additions and 80 deletions.
90 changes: 45 additions & 45 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,51 +4,51 @@

### 🚀 Added

* Add \`secure\` cncjs option for api and websocket connections ([6af2bf2](https://github.com/billiam/cncjs-pendant-streamdeck/commit/6af2bf2))
- Add \`secure\` cncjs option for api and websocket connections ([6af2bf2](https://github.com/billiam/cncjs-pendant-streamdeck/commit/6af2bf2))

## [0.5.2](https://github.com/billiam/cncjs-pendant-streamdeck/compare/0.5.1...0.5.2?diff=split) (2024-06-02)

### 🩹 Fixes

* Fix errors when binding does not contain actions ([069391f](https://github.com/billiam/cncjs-pendant-streamdeck/commit/069391f))
- Fix errors when binding does not contain actions ([069391f](https://github.com/billiam/cncjs-pendant-streamdeck/commit/069391f))

## [0.5.1](https://github.com/billiam/cncjs-pendant-streamdeck/compare/0.5.0...0.5.1?diff=split) (2024-06-02)

### 🩹 Fixes

##### `stream deck`

* Exit with error when streamdeck is not found ([c7f7ed0](https://github.com/billiam/cncjs-pendant-streamdeck/commit/c7f7ed0))
* Fix unconfigurable global font size ([2704fac](https://github.com/billiam/cncjs-pendant-streamdeck/commit/2704fac))
- Exit with error when streamdeck is not found ([c7f7ed0](https://github.com/billiam/cncjs-pendant-streamdeck/commit/c7f7ed0))
- Fix unconfigurable global font size ([2704fac](https://github.com/billiam/cncjs-pendant-streamdeck/commit/2704fac))

##### `web`

* Failed pointer release events in mobile browsers ([84adb0d](https://github.com/billiam/cncjs-pendant-streamdeck/commit/84adb0d))
- Failed pointer release events in mobile browsers ([84adb0d](https://github.com/billiam/cncjs-pendant-streamdeck/commit/84adb0d))

## [0.5.0](https://github.com/billiam/cncjs-pendant-streamdeck/compare/0.4.3...0.5.0?diff=split) (2022-09-15)

### 🚀 Added

##### `web`

* Make overall background color configurable ([06f7921](https://github.com/billiam/cncjs-pendant-streamdeck/commit/06f7921))
- Make overall background color configurable ([06f7921](https://github.com/billiam/cncjs-pendant-streamdeck/commit/06f7921))

### 🩹 Fixes

* Fix overall font size being ignored ([2dfd088](https://github.com/billiam/cncjs-pendant-streamdeck/commit/2dfd088))
- Fix overall font size being ignored ([2dfd088](https://github.com/billiam/cncjs-pendant-streamdeck/commit/2dfd088))

##### `stream deck`

* Fix missing md5 dependency in packaged build ([d468677](https://github.com/billiam/cncjs-pendant-streamdeck/commit/d468677))
- Fix missing md5 dependency in packaged build ([d468677](https://github.com/billiam/cncjs-pendant-streamdeck/commit/d468677))

## [0.4.3](https://github.com/billiam/cncjs-pendant-streamdeck/compare/0.4.2...0.4.3?diff=split) (2022-08-27)

### 🩹 Fixes

##### `file list`

* Fix incorrect enabled test for down arrow ([df84469](https://github.com/billiam/cncjs-pendant-streamdeck/commit/df84469))
* Fix button state caching causing stuck/incorrect buttons ([9fa195f](https://github.com/billiam/cncjs-pendant-streamdeck/commit/9fa195f))
- Fix incorrect enabled test for down arrow ([df84469](https://github.com/billiam/cncjs-pendant-streamdeck/commit/df84469))
- Fix button state caching causing stuck/incorrect buttons ([9fa195f](https://github.com/billiam/cncjs-pendant-streamdeck/commit/9fa195f))

# Changelog

Expand All @@ -58,34 +58,34 @@

##### `stream deck`

* Fix sleep dimming resetting to full brightness ([a8dec87](https://github.com/billiam/cncjs-pendant-streamdeck/commit/a8dec87))
- Fix sleep dimming resetting to full brightness ([a8dec87](https://github.com/billiam/cncjs-pendant-streamdeck/commit/a8dec87))

## [0.4.1](https://github.com/billiam/cncjs-pendant-streamdeck/compare/0.4.0...0.4.1?diff=split) (2022-08-25)

### 🩹 Fixes

* Add missing loading module ([556cc93](https://github.com/billiam/cncjs-pendant-streamdeck/commit/556cc93))
- Add missing loading module ([556cc93](https://github.com/billiam/cncjs-pendant-streamdeck/commit/556cc93))

## [0.4.0](https://github.com/billiam/cncjs-pendant-streamdeck/compare/0.3.0...0.4.0?diff=split) (2022-08-25)

### 📖 Documentation

##### `config example`

* Distinguish between unhold and start feed in default icon config ([189c39c](https://github.com/billiam/cncjs-pendant-streamdeck/commit/189c39c))
* Use different background for play button when it means 'unpause' in default config ([4c6176d](https://github.com/billiam/cncjs-pendant-streamdeck/commit/4c6176d))
* Add default streamdeckUi section ([4f7848c](https://github.com/billiam/cncjs-pendant-streamdeck/commit/4f7848c))
- Distinguish between unhold and start feed in default icon config ([189c39c](https://github.com/billiam/cncjs-pendant-streamdeck/commit/189c39c))
- Use different background for play button when it means 'unpause' in default config ([4c6176d](https://github.com/billiam/cncjs-pendant-streamdeck/commit/4c6176d))
- Add default streamdeckUi section ([4f7848c](https://github.com/billiam/cncjs-pendant-streamdeck/commit/4f7848c))

### 🚀 Added

* Set state to disconnected when a connection error occurs ([1bf77e7](https://github.com/billiam/cncjs-pendant-streamdeck/commit/1bf77e7))
* Support custom user commands, loading animations ([889ba37](https://github.com/billiam/cncjs-pendant-streamdeck/commit/889ba37), [#8](https://github.com/billiam/cncjs-pendant-streamdeck/issues/8))
- Set state to disconnected when a connection error occurs ([1bf77e7](https://github.com/billiam/cncjs-pendant-streamdeck/commit/1bf77e7))
- Support custom user commands, loading animations ([889ba37](https://github.com/billiam/cncjs-pendant-streamdeck/commit/889ba37), [#8](https://github.com/billiam/cncjs-pendant-streamdeck/issues/8))

### 🩹 Fixes

##### `web`

* Fixed right-click triggering buttons, especially hold actions ([1943880](https://github.com/billiam/cncjs-pendant-streamdeck/commit/1943880))
- Fixed right-click triggering buttons, especially hold actions ([1943880](https://github.com/billiam/cncjs-pendant-streamdeck/commit/1943880))

# [0.3.0](https://github.com/billiam/cncjs-pendant-streamdeck/compare/0.2.5...0.3.0) (2022-08-18)

Expand All @@ -99,39 +99,39 @@ Deck processes.

### Fixed

* Fixed compilation error in templating library affecting web build
- Fixed compilation error in templating library affecting web build

## [0.2.4](https://github.com/billiam/cncjs-pendant-streamdeck/compare/0.2.3...0.2.4) (2022-08-13)

### Fixed

* Fixed spindle/rapid/feedrate overrides being unavailable while job is running
- Fixed spindle/rapid/feedrate overrides being unavailable while job is running

## [0.2.3](https://github.com/billiam/cncjs-pendant-streamdeck/compare/0.2.2...0.2.3) (2022-08-07)

### Fixed

* Fixed issue where rapid jog actions could trigger an absolute position move instead, depending on latency
* [Stream Deck only] Updated [stream deck library](https://github.com/julusian/node-elgato-stream-deck) to add support
for Stream Deck Mini
- Fixed issue where rapid jog actions could trigger an absolute position move instead, depending on latency
- [Stream Deck only] Updated [stream deck library](https://github.com/julusian/node-elgato-stream-deck) to add support
for Stream Deck Mini

### Chore

* Updated dependencies
- Updated dependencies

## [0.2.2](https://github.com/billiam/cncjs-pendant-streamdeck/compare/0.2.1...0.2.2) (2022-08-06)

### Fixed

* Fix missing 100% height, causing squashed icons in some browsers
* Fix missing error class during connection failure
- Fix missing 100% height, causing squashed icons in some browsers
- Fix missing error class during connection failure

## [0.2.1](https://github.com/billiam/cncjs-pendant-streamdeck/compare/0.2.0...0.2.1) (2022-07-21)

### Fixed

* Fix Stream Deck connection failing before commandline arguments were parsed
* Fix incorrect default text line height
- Fix Stream Deck connection failing before commandline arguments were parsed
- Fix incorrect default text line height

# [0.2.0](https://github.com/billiam/cncjs-pendant-streamdeck/compare/0.1.0...0.2.0) (2022-07-20)

Expand All @@ -142,28 +142,28 @@ On a slow system (Raspberry Pi 3b+), reduced processing time from 43 seconds to

### Added

* New option: `ui.throttle` - Limit the draw frequency for a given button (_Stream Deck only_)
* New option: `ui.gcodeLimit` - Limit the number of lines of gcode that will be processed for slower systems,
affecting both gcode rendering, and gcode dimension display (_Stream Deck only_)
- New option: `ui.throttle` - Limit the draw frequency for a given button (_Stream Deck only_)
- New option: `ui.gcodeLimit` - Limit the number of lines of gcode that will be processed for slower systems,
affecting both gcode rendering, and gcode dimension display (_Stream Deck only_)

### Changed

* Commandline options for Stream Deck service now override config.json values
* Faster error when no streamdeck devices are connected (no longer waits for other initialization steps)
* Exit from service (quickly) if initial websocket connection to cncjs fails
* Updated socket-io.client
* Reduce data transferred from gcode processor
* Much faster, and less strict, gcode processing
* Cache images loaded from disk
- Commandline options for Stream Deck service now override config.json values
- Faster error when no streamdeck devices are connected (no longer waits for other initialization steps)
- Exit from service (quickly) if initial websocket connection to cncjs fails
- Updated socket-io.client
- Reduce data transferred from gcode processor
- Much faster, and less strict, gcode processing
- Cache images loaded from disk

### Fixed

* Fixed websocket connection ignoring configured socket port
* Fixed missing license and readme in web build
* Fixed incorrect dependency for canvas module
* Adding missing 'Home' workflow state
* When smooth jogging, fix soft limits generating a backlog of unacknowledged moves, resulting in unexpected movement later
* Reduced unnecessary re-rendering for some button states
* Fixed very small gcode files not rendering correctly
- Fixed websocket connection ignoring configured socket port
- Fixed missing license and readme in web build
- Fixed incorrect dependency for canvas module
- Adding missing 'Home' workflow state
- When smooth jogging, fix soft limits generating a backlog of unacknowledged moves, resulting in unexpected movement later
- Reduced unnecessary re-rendering for some button states
- Fixed very small gcode files not rendering correctly

# [0.1.0](https://github.com/billiam/cncjs-pendant-streamdeck/compare/7874c7dd1bacaccfb1fcd04e93f9926dcf712344...0.1.0) (2022-07-17)
58 changes: 29 additions & 29 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,22 @@ a handful from [Font Awesome](https://github.com/FortAwesome/Font-Awesome).

## Features

* Works with or without a Stream Deck, either as CLI process or web pendant
* Linux-friendly, does not use default Stream Deck software
* Unlimited pages
* Arbitrary grid dimensions for web version
* _Excessively_ customizable
* Execute one or more actions on press, release, and/or button hold
* Support up to 6 axes
* Multi axis smooth jogging
* Templated text for
* Lots of included icons, or add your own
* Display and animate gcode
* Run macros
* Run cncjs custom commands (ex: to restart the system or update packages)
* Manage alarms, hold, and pause events (like macro-triggered tool changes)
* Custom configuration is [well documented](https://billiam.github.io/cncjs-pendant-streamdeck/)
* [Configuration validator](https://billiam.github.io/cncjs-pendant-streamdeck/validator/)
- Works with or without a Stream Deck, either as CLI process or web pendant
- Linux-friendly, does not use default Stream Deck software
- Unlimited pages
- Arbitrary grid dimensions for web version
- _Excessively_ customizable
- Execute one or more actions on press, release, and/or button hold
- Support up to 6 axes
- Multi axis smooth jogging
- Templated text for
- Lots of included icons, or add your own
- Display and animate gcode
- Run macros
- Run cncjs custom commands (ex: to restart the system or update packages)
- Manage alarms, hold, and pause events (like macro-triggered tool changes)
- Custom configuration is [well documented](https://billiam.github.io/cncjs-pendant-streamdeck/)
- [Configuration validator](https://billiam.github.io/cncjs-pendant-streamdeck/validator/)

## Compatibility

Expand All @@ -54,14 +54,14 @@ Full documentation can be found at <https://billiam.github.io/cncjs-pendant-stre
2. Rename `config.example.json` to `config.json`
3. Update the `config.json` file with your connection information in the [`cncjs`](https://billiam.github.io/cncjs-pendant-streamdeck/docs/configure#cncjs) section.
4. Edit your `~/.cncrc` file, adding a mount point for this pendant
```
"mountPoints": [
{
"route": "grid",
"target": "/home/pi/cncjs-pendant-streamdeck"
}
]
```
```
"mountPoints": [
{
"route": "grid",
"target": "/home/pi/cncjs-pendant-streamdeck"
}
]
```
5. Restart CNCjs

### Streamdeck
Expand All @@ -74,7 +74,7 @@ You can skip the `cncrc` step if you do not need the web interface.
_Instructions borrowed from https://github.com/julusian/node-elgato-stream-deck_

On linux, the udev subsystem blocks access to the StreamDeck without some special configuration.
Save the following to `/etc/udev/rules.d/50-elgato.rules` and reload the rules with
Save the following to `/etc/udev/rules.d/50-elgato.rules` and reload the rules with
`sudo udevadm control --reload-rules`

```
Expand Down Expand Up @@ -121,14 +121,14 @@ cncjs-pendant-streamdeck --directory /home/my-name/cncjs-pendant-streamdeck

## To-do

* Config builder
- Config builder

## Licenses and credits

Several icon sets have been added for convenience

* [czottmann -
- [czottmann -
streamdeck-iconpack-fluentui-system-icons - MIT](https://github.com/czottmann/streamdeck-iconpack-fluentui-system-icons/blob/main/LICENSE.md)
* [czottmann - streamdeck-iconpack-system-uicons - MIT](https://github.com/czottmann/streamdeck-iconpack-system-uicons/blob/main/LICENSE.md)
* [fontawesome - CC BY 4.0](https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/LICENSE.txt)
- [czottmann - streamdeck-iconpack-system-uicons - MIT](https://github.com/czottmann/streamdeck-iconpack-system-uicons/blob/main/LICENSE.md)
- [fontawesome - CC BY 4.0](https://raw.githubusercontent.com/FortAwesome/Font-Awesome/6.x/LICENSE.txt)
Alterations: SVG images have been converted to PNG
8 changes: 5 additions & 3 deletions src/assets/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,17 @@
font-weight: normal;
}

body, html {
body,
html {
height: -webkit-fill-available;
}
body {
color: var(--color-text);
background: var(--color-background);
line-height: 1.6;
font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu,
Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
Oxygen, Ubuntu, Cantarell, 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
font-size: 15px;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
Expand Down
2 changes: 1 addition & 1 deletion src/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const run = async () => {
try {
;[, streamdeck] = await Promise.all([bootstrap.start(), getStreamdeck()])
} catch (e) {
console.error("Connection error", e)
console.error('Connection error', e)
process.kill(process.pid, 'SIGINT')
}

Expand Down
4 changes: 3 additions & 1 deletion src/lib/cnc-api.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ export default (token, host, port, secure) => {
token,
...params,
})
return `${secure ? 'https' : 'http' }://${host}:${port}/api/${path}?${queryParams}`
return `${
secure ? 'https' : 'http'
}://${host}:${port}/api/${path}?${queryParams}`
}

const apiFetch = async (path, params) => {
Expand Down
2 changes: 1 addition & 1 deletion src/lib/connection.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ proto.connect = function () {
this.validate()

return new Promise((resolve, reject) => {
const url = `${secure ? 'wss' : 'ws' }://${socketAddress}:${socketPort}/`
const url = `${secure ? 'wss' : 'ws'}://${socketAddress}:${socketPort}/`

const socket = io.connect(url, {
query: `token=${this.token}`,
Expand Down

0 comments on commit c7f1bd5

Please sign in to comment.