Comments (2)
I hate to say this, but this is the expected behavior. The IPython kernel is executed in the main thread, so if your script blocks it for a significant amount of time, you will get all kinds of weird and wonderful glitches.
There are two solutions:
- Move the IPython kernel into a separate process or thread. This involves much refactoring and hair pulling, so I'm not planning to do that anytime soon (however, a pull request is always welcome).
- Use only asynchronous code. Seeing as you come from procedural background, it may require some getting used to. Your code can be refactored into async alternative roughly as follows (I didn't have a chance to test it) (there is also about one million other ways to do this):
i = 470
t = -1
def run_once():
global i, t
i *= 0.99
c = int(i) + (1000 if t < 0 else 0)
t = -t
print('command', c)
broadcast(uavcan.equipment.hardpoint.Command(hardpoint_id=1, command=c))
if i > 20:
node.defer(0.3, run_once)
node.defer(0, run_once)
from gui_tool.
http://uavcan.org/GUI_Tool/User_guide/#programming-tips
from gui_tool.
Related Issues (20)
- Integrate Sentry
- Plotter time axis issue HOT 7
- CAN serial ports are renamed to "n/a" (by Qt?!) HOT 2
- Add some documentation about plotter widgets HOT 1
- Plotter HIDE-SHOW button HOT 1
- Plotter filter for uavcan.protocol.debug.KeyValue HOT 1
- Custom DSDL types are not shown in the data type selection menus HOT 3
- Launch GUI tool macOS HOT 2
- Dependency PyQt5 uses GPL3 license HOT 18
- PyQt5/QtCore.so: undefined symbol: “PySlice_AdjustIndices” HOT 4
- Vendor-specific data types are not accessible from the bus monitor and plotter processes
- Add support to select Socket can interfaces HOT 2
- Any new function update for this gui? HOT 1
- Creating panels with package that is not in gui tool python environment HOT 1
- Certificate error HOT 10
- Not compatible with KDE Breeze dark theme HOT 1
- uavcan V1 compatible ? HOT 1
- Error with switching to a new library name HOT 4
- Logger illumination HOT 2
- v0 REPO has moved... https://github.com/dronecan/gui_tool and is now called DroneCan! HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gui_tool.