andreisperid / E-TKT

open source embossed label maker
https://andreisperid.github.io/E-TKT/
MIT License
398 stars 19 forks source link

Support UTF-8 and scroll longer labels on the screen #22

Closed sabeechen closed 1 year ago

sabeechen commented 1 year ago

This PR:

Reviewer notes:

Since the website doesn't support printing labels long enough to trigger the screen scrolling (yet!) you can send labels using the command line, for example: Linux (bash)

curl -vvv -X POST http://192.168.0.145/api/task -H 'Content-Type: application/json' -d '{"parameter":"tag", value:" This♡label☆is♪too€long@to$fit "}'

Windows (powershell)

$data = @{'parameter'='tag';
          'value'=' This♡label☆is♪too€long@to$fit '
}
Invoke-WebRequest -Uri http://192.168.0.145/api/task -Method POST -Body ($data|ConvertTo-Json) -ContentType "application/json"
andreisperid commented 1 year ago

Great work @sabeechen 😀

I've just tested it here and just had a minor issue (invalid conversion from 'char' to 'const char*' [-fpermissive]), but fixed in 3c09061, check it out if it makes sense.

sabeechen commented 1 year ago

That edit looks good, thank you. The E-TKT I do development on (I have two now!) is in rough shape hardware-wise and I have to make a bunch of kludgy code edits to keep it calibrated, which I then have to revert before I make a PR. I'll be more careful about it in the future.

andreisperid commented 1 year ago

Absolutely no problem :)