Conversation
|
LGTM, want to see testing. Add examples of how it would be used. Like the idea of starting a 'lib2202' submodule/maven dependency/folder we copy every year |
|
Needs examples for simple data types: double/int/string. |
|
Rather than extending SubsystemBase could it be handled through an implements instead? Also see if you can make it take a type template Apply , should reduce the code and work for anything that has Supplier |
|
@dlaufen I only added the I added a demo to the example going forward, the subsystem I wrote doesn't need to be used when writing new ones, that subsystem takes care of updating the values. So like in the demo. class State {
@NtInput(name = "set")
public double SetPoint = 0;
@NtOutput(name = "err")
public double Error = 0;
// @NtInput()
}
State left = NtBind.getInstance().bind(new State(), "left", this::onChanged);
State right = NtBind.getInstance().bind(new State(), "right", this::onChanged);
void onChanged() {
System.out.println("SetPoint: " + left.SetPoint + ", err: " + left.Error);
System.out.println("SetPoint: " + right.SetPoint + ", err: " + right.Error);
}using the static instance of |
|
Code should be well commented Something like this
|
No description provided.