Comments (7)
fixed via db3ef55
I don't know why console.getkey() was waiting for return on Linux machines...
Now tested on Linux/Windows. Feel free to eventually cleanup getkey function for Linux, this is a copy/past from stackoverflow.
from misoc.
Thanks for the quick fix. But can you please commit only clean code to misoc? The termios calls can be done only once at startup/termination of the program (as the C flterm did). The character
function can also be removed and replaced with e.g. self.serial.read().decode()
.
from misoc.
I only tried to help you figuring out what was wrong (different behaviour of console.getkey() between machines). Thanks for your comment, I'm aware this is dirty, I'll see if I can improve that when I'll have more time for this.
from misoc.
After reviewing flterm a bit more, I found many other problems (see IRC log). I could fix them myself, but I would like you to do it as an exercise and learn about e.g. Python's bytes
and str
. When you propose or commit code like this without being careful (I am convinced that this is carelessness or laziness, as you seem very capable), the code quality of Migen/MiSoC definitely suffers as I cannot catch every single problem when reviewing.
You probably have much insight yourself into where the issues are. For example, I'm pretty sure you did not really understand Python's bytes
when pyserial returned you some, and you did not want to learn about them, so instead you hacked together messy/buggy code, did some cursory testing and called it a day. Please make the effort to understand how your program works in detail and write proper code, as myself and other contributors to migen/misoc/artiq do.
from misoc.
I just did a first cleanup pass. There is still the getkey functions(termios) and threads to cleanup. If you still see problems around bytes/str, can you report it to me?
from misoc.
Much better, thanks!
I don't actually understand how the thread starting/stopping is supposed to work but (1) threads are generally awful in Python in ways that often cannot be fixed (2) we will replace this part of the code when switching pyserial to asyncio. So the current solution is okay-ish.
from misoc.
Thanks for the comments, I did another cleanup. OK for the threads. I'll look at termios later.
from misoc.
Related Issues (20)
- Wrong version in `setup.py`
- different clocking of differentiator and integrator HOT 3
- misoc@2022-04-07 fail with either latest migen built from source (2022-09-02) and with migen 0.9.2 HOT 1
- pip install of tag 0.12 fails HOT 5
- fix liteeth error counter atomicity problem HOT 2
- liteeth: remove dw parameterization HOT 2
- liteeth: rename dv to rx_dv
- liteeth: remove MII clock output
- clean up memory regions, names, offsets
- kasli/spi_flash: investigate and implement quad i/o read
- DDR3-related error in Vivado timing report for Ultrascale HOT 1
- spi: first half-cycle (setup period) of a chained, pure read uses the write divider instead of the read divider
- Record.connect return value not used HOT 3
- Binutils compilation
- Standard 1 bit SPI mode for spi_flash not available? HOT 2
- software not rebuilt after gateware change
- fix or remove Ultrascale SDRAM init HOT 4
- Wanted to Build a small SoC HOT 1
- CSRStorage with write_from_dev=True seems broken in simulation HOT 3
- register_rom weirdness HOT 2
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 misoc.