Giter Site home page Giter Site logo

jacknewman12 / koradmote Goto Github PK

View Code? Open in Web Editor NEW
4.0 4.0 1.0 1.83 MB

A simple control server for Korad power supplies

License: MIT License

HTML 4.31% CSS 6.56% Rust 50.08% TypeScript 38.07% Shell 0.99%
farnell korad powersupply remote stamos tenma velleman

koradmote's Issues

Add more compile targets

Note: Use musl for linux so we can ignore the libudev dependency.

I think the target matrix should be:

x86_64-unknown-linux-musl
x86_64-pc-windows-gnu
arm-unknown-linux-musleabihf
- Whatever the Mac OS one is - 

Add -v debugging

The -v flag currently does nothing.

Would probably be nice to dump the serial ports + settings, rocket mounts, etc.

Changing threading implementation

Original feature just splits the database (containing the serial port + current status) and the combines it again once the threads are complete.

Task is to change it so that each thread takes the serial port permanently and pushes the status results to a mpsc. The receiver thread can then push the changes to the status dict (and maybe also trigger a websocket push once its implemented).

This should make it a little easier to recreate serial devices if something goes wrong with them (im looking at you windows) and means we can just poll the PSUs as fast as possible without hurting the web interface speed.

Improve Toggle / Status update error handling

Should probably make the update_state and set_power function return a Result. Currently is very rare to fail, and its mostly harmless (the next UI update will probably show the real state).

Also adding a with_context({psu_name}) would be nice

TODO: Should we retry the update? Push some information back up to the user?

Forward the entire PSU Status struct

Should be very simple to import the entire Status from the Ka3005p driver:
{"voltage":0.0, "current":0.0, "power":false}
to
{"voltage":0.0, "current":0.0, "channel1": "CV","channel2": "CV","beep": "On","lock": Unlocked,"output": "On"}

Note this ticket doesn't involve updating the web interface to show all this data. (Is this extra data even useful for the user?)
This is simply so we don't have to redefine the state struct ourselves.

Merge to Warp to compare features / overhead

I think warp might be better than rocket for such a small project.

TODO: Merge over to warp and see if it reduces the memory footprint (its only 2mb atm).
Also just curious how that library compares in features.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.