-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HubCentral / Portview based on AppData and StartUserProgram slot parameter in protocol v1.4.0 #2315
base: master
Are you sure you want to change the base?
Conversation
Update from master
Issues/topics to clarify: NOW:
NEXT:
LATER:
|
Thanks for taking the time to rework this with the firmware changes!
The hub port view script is still breaking down messages to 19 byte chunks, so we could be seeing this? We could look into using the negotiated MTU on the firmware side so we can send whole messages in one go. I was initially thinking we could send pre-formatted strings, in order to limit the device specific stuff we need to add to Pybricks Code. But if make device specific visualizations anyway, we can look at packing a single port value into a 19 byte message, which should be feasible.
Yes.
The old command
Correct. There is a new feature flag
Since we're providing everything for the device visuals from the Python script, we can include hub type also. I think we'll want to selectively include some of these modules in the firmware if we end up making fancy things for Prime Hub (Like remote-control interfaces), so that we don't increase the other firmware sizes unnecessarily. |
feat: hub center improved visuals fix: boost color and distance sensor fix and improvement
|
See how
This is used to enable the button in |
|
Thank you! I am currently working on releasing the current state of things as beta with all the recent firmware updates. The most relevant firmware issues have now been fixed. Then I plan to turn my attention to the block coding backlog and Pybricks Code.
|
fix: technic/city hub image switch feat: add F7 as a shortcut
To make it easier on me to review, could we first split out the Pybricks Profile 1.4 changes to a separate pull request? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A naive remark and may be out of order.
-
I think I miss the Technic-move motor.
-
How does the Color-Distance sensor show the distance.
All I see is it is getting mode = 0.
Tell me to shut-up if this is all irrelevant.
What a great project this is!
Bert
All ideas are welcome here!
This is a sneak peak of my work-in-progress version. Keep the excitement coming, we have some UI design and review work to be done... |
I was referring to the Technic move hub built-in motors:
I miss something, then. I plug the sensor into the hub, how to change the mode? snipped the picture
Yes, please. Bert |
Hi Attila, It took me quite some fiddling to see why CityHub and TechnicHub only showed pup devices. hub = ThisHub the parens are missing, should be: hub = ThisHub() With the result that hub.battery.voltage() is refused. And other things. Bert |
I think the focus for now is mostly on the PrimeHub, but all hubs except the move hub should be supported. Small addition: def battery_task():
if not hub.battery: return
count = 0
while True:
count += 1
if count % 100:
yield None
else:
# skip cc 10 seconds before sending an update
percentage = round(min(100,(hub.battery.voltage()-6000)/(8300-6000)*100))
voltage = hub.battery.voltage()
status = hub.charger.status()
data = f"pct={percentage}%\tv={voltage}mV\ts={status}"
yield f"battery\t{data}" Not all hubs that support hub.battery also have a charger. |
workaround: hub shutdown action
Implementation and first merge of HubCentral/PortView feature based on the discussion pybricks/support#1708
Slightly modified hubcentral protocol, included _builtin_port_view.py as well for reference.