Code Monkey home page Code Monkey logo

servomaster's People

Contributors

climategadgets avatar dependabot[bot] avatar

Stargazers

 avatar

Watchers

 avatar

servomaster's Issues

Restore the transition controller at the end of the demo

Starting any demo clears any transition controllers attached to the servos, and doesn't restore it when the demo is stopped (but doesn't change the state of the transition controller dropdown, either).

Need to restore transition controllers (or, optionally, not clear them at the beginning of the demo).

Genericise AbstractServoController#portName

This variable was put in place before generics came out (2000 vs 2004), long obsolete. Need to make it a generic type and make all concrete implementations provide their own specific constraints.

Refactor SilentHelper

It is outright ugly. Also, silent operation now needs to be supported on per-servo level.

Handle setPosition() failure in the same way whether sync or async

Currently, Servo#setPosition() throws IOException. However, this will not properly if the position is changed asynchronously, either via hardware means (limited speed or acceleration) or transition controllers.

Need to communicate a failure to the caller in an identical way whether the transition is instantaneous, or delayed.

This is related to #30.

Implement TB6612 driver for Raspberry Pi

Adafruit DC & Stepper Motor HAT for Raspberry Pi - Mini Kit provides a very reproducible and standard stepper controller solution for Raspberry Pi, it would be a shame not to support it.

This enhancement is much more complicated than #6, though. Steppers, unlike servos, do not have inherent limits, and if a stepper is used as a servo, there will have to be solutions put in place to allow limit detection (limit switches and torque sensors, to name a couple). In addition, stepper positioning model (discrete steps) is different from servo positioning model (floating point 0 to 1 with adjustable ranges and limits), so some extra work will need to be done.

Provide facility to de-energize servos on exit

As it stands now, servo controllers will stay in their current state when Servomaster code is shut down (i.e. if they were issuing servo pulse, they will keep doing so, and if they weren't, they won't, or whatever else the firmware is programmed to do).

It would be a good idea to provide a convenience method to ServoController to put the servos into de-energized state, to save energy, wear and tear, and improve hardware maintenanceability (it's nice not to have to struggle with servos that want to stay where they were, not necessarily where one wants them to be).

Implement SilentDevice on per-servo basis

Currently, silent support is implemented only on per-controller basis. However, these days most controllers implement disabling the servo pulse per servo. Need this supported.

Change Console demo button behavior

Currently, in order to stop the test, the mouse needs to be moved. Need to change the behavior in such a way that the demo can be started and stopped without moving the mouse.

Make TransitionController failure aware

Currently, if an error happens in the middle of a transition, it is just logged, and that's it.

However, the way Servo#setPosition() communicates the status allows to pass it to a TransitionController and further to Servo#setPosition() caller.

Remove deprecated settings from Gradle build files

Current Gradle build issues this warning:

Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/4.9/userguide/command_line_interface.html#sec:command_line_warnings

Integrate with GitLab CI/CD

As an application maintainer, I want to integrate the build with GitLab CI/CD so that sanity checks are done in the background regardless of whether I forget to run unit tests or not.

Acceptance criteria: GitLab CI/CD successfully builds the project.

Make sure polymorphic instantiation doesn't use uninitialized values

At least OpenJDK 1.8 performs instantiation in such a way that an object instantiated via abstract method call may use not yet initialized variable values, resulting in erroneous values being used. Case in point these two together result in zero "servo/precision" property upon instantiation:


properties.put("servo/precision", Integer.toString(position_max - position_min));

Add test coverage calculation to CI

As an Application Maintainer, I want to enable test coverage calculation as a build pipeline so that I can have an idea about what code can be (somewhat) trusted.

Protect the controller and servos from their listeners

Current implementation of silentStatusChanged() (in the controller and the servo),exception() (in the controller and the servo), positionChanged() and actualPositionChanged() allows the listeners to sabotage the servo by either throwing an exception or getting stuck. Need to fire a set of messengers to all listeners and notify them asynchronously, in correct order. Further need to protect the messenger queue from a listener getting stuck, and log a message about that.

Make the debug console usable without any hardware

Console class was created specifically for showcasing any driver's abilities. However, it will work only with specific classes, and the secret of invoking it is long lost.

Need to create a simple harness that would be a one-line no-brainer Console invocation for someone that sees Servomaster for the first time in their life and has no Java proficiency.

Make build artifacts available from well known repositories

Expected Result

Other projects hosted anywhere can use this project as a dependency without jumping through hoops

Actual Result

Build artifacts are not published anywhere

Corrective Action

Modify CI/CD pipelines so that build artifacts are published

Move touch/wakeUp from setActualPosition() to setPosition()

Currently, touch() and/or wakeUp() are called from driver specific servo implementations. Need to make the call uniform and move it to setPosition() where it would be called regardless of whether a particular class supports silent operation - simplicity wins over [negligible] performance hit.

Make Swing demo only use the servos that are enabled

Currently, the Swing demo enumerates all the servos supported by the connected controller. That may be too much (who would connect 16 servos to the test bench?) Need to skip the servos that aren't enabled at the Console.

Propagate servo range adjustments to position sliders

Currently, the precision and range are read at instantiation and are not updated if the servo range is adjusted, which causes the actual position slider, and requested position ticks to be off after range adjustments.

Add ErrorProne support to build

As an Application Maintainer, I want local and CI/CD builds to produce ErrorProne reports so that they can be available on the spot without jumping through the hoops with IDE plugins.

Acceptance Criteria: the build composes ErrorProne report.

Refactor the module and library artifact layout

Existing Behavior

  • servomaster-common - contains things that don't belong there, and the name doesn't match currently accepted conventions
  • servomaster-serial
  • servomaster-usb
  • servomaster-raspberry-pi

Desired Behavior

  • servomaster-api - must contain everything necessary to interface with abstractions but none of the implementations
  • servomaster-serial
  • servomaster-usb
  • servomaster-raspberry-pi
  • servomaster-console

Sort out the class instantiation

Original code was written before dependency injection became commonplace. Need to update the behavior - it shouldn't be possible to change the object heritage once it's been instantiated.

Right now, there's a mess with calling init() from constructors causing all sorts of instantiation race conditions - there's no sensible solution other than a total separation of instantiation, initialization, and use.

Migrate Gradle build to Kotlin DSL

Task Definition

As an Application Maintainer, I need to migrate build scripts from Groovy to Kotlin so that they are written in a well known language learning which has other benefits than just being able to write Gradle build scripts.

Acceptance Criteria

Gradle build files are written in Kotlin DSL.

Integrate with Travis CI

As an application maintainer, I want to integrate the build with Travis CI so that sanity checks are done in the background regardless of whether I forget to run unit tests or not.

Acceptance criteria: Travis CI successfully builds the project.

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.