Skip to content
This repository was archived by the owner on Jul 6, 2020. It is now read-only.

Polar Bear Controller Code #667

Merged
merged 53 commits into from
Feb 28, 2019
Merged

Polar Bear Controller Code #667

merged 53 commits into from
Feb 28, 2019

Conversation

SilentCtrl
Copy link
Contributor

[HIBIKE] PolarBear basic functionality completed
Studentapi bug fixes
Runtime process kill fix

baby-bell and others added 30 commits October 13, 2018 15:14
* Do not crash on invalid COBS data

* Rename hibike_process_async to hibike_process

Remove old hibike_process and replace it with async version. API
compatibility is maintained, so Runtime will not be changed.

* Prevent hibike_tester hang after termination

hibike_tester would hang after terminating hibike_process,
because one of its threads was still running.
We tell the thread to shut down after the process is done
instead of running forever.

* Remove stub file

* Remove send_transport

This function is identical to send, so it doesn't make sense
to keep it around.

* Replace virtual device with async version

The asynchronous version uses less CPU and has saner defaults.

* Remove virtual device dependency on hibike_process

Some parts of the virtual device perform similar functions
to parts of hibike_process, but it is better that the two
implementations be allowed to evolve independently.

* Update tests for async; add read/write tests

Async tests need to deal with the event loop. In addition,
we test that hibike is actually reading and writing to devices
using virtual devices.

* Remove outdated portions of README, update others

* Add explanation for read/write retries

* Add test for nonexistent device errors

As it turns out, we were not sending error messages when a
nonexistent device was accessed; a test should ensure this behavior
stays in.

* Update developer documentation

* Fix lint errors
Now, SmartSensorProtocol automagically registers itself with
Hibike when it connects.

* Fix bugs related to virtual devices

Essentially, we exclude existing serial ports from our
scan for new ones, but this didn't extend to virtual
devices, leading them to be added multiple times.

The other bug was that "connection_lost()" could
get called before a device was identified, triggering
a key error when we tried to take it out of the
devices map. This is now checked for.

Add function to create heartbeat requests
In addition, async virtual devices send heartbeat requests too, although
they don't do anything with the responses.
* Don't block event loop on state queue
* Port process tests to async
* Add hibike_packet as submodule

* Enable use of hibike_packet

Detects whether the extension is installed by trying to import it.

* Update hibike_packet

* Remove process_buffer
@jonathan-j-lee jonathan-j-lee changed the title Hibike/asyncio Polar Bear Controller Code Feb 28, 2019
Copy link
Member

@jonathan-j-lee jonathan-j-lee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants