#garfield Logs

Dec 05 2021

#garfield Calendar

12:09 AM aandrew: why are you trying to stay awake?
12:44 AM rue_mohr: I cant build things in my sleep
12:50 AM rue_mohr: ...
12:51 AM rue_mohr: no i'm going to stay with that
09:27 AM Tom_L: sleep won
01:28 PM rue_bed2: I'm awake
01:28 PM rue_bed2: this thing needs a new network cable...
01:29 PM rue_bed2: oh dear, whats the list for today...
01:29 PM rue_bed2: the training software I did for the robot arms is messed up
01:29 PM rue_bed2: the console interface stuff isn't working right
05:33 PM rue_mohr: 1197...
05:33 PM rue_mohr: er 1997
05:33 PM rue_mohr: gone up for sure
05:33 PM rue_mohr: not sure how stable it'll be
05:33 PM rue_mohr: (doesn't matter)
06:29 PM Tom_shop: it must
06:29 PM Tom_shop is now known as Tom_L
06:37 PM rue_mohr: no fake points
06:37 PM rue_mohr: no, fake points :)
07:12 PM Tom_L: making a couple more chip guards
07:12 PM Tom_L: maybe these won't crack by the screws like the first ones did
07:13 PM rue_mohr: lexan?
07:13 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/cnc/Mill_Steel/Assembly/Final/Vise_parts/Table_side_brackets1.jpg
07:13 PM Tom_L: http://tom-itx.no-ip.biz:81/~webpage/cnc/Mill_Steel/Assembly/Final/Vise_parts/Table_side_brackets2.jpg
07:13 PM Tom_L: yes
07:13 PM Tom_L: those should help the cracking
07:13 PM Tom_L: polycarbonate
07:14 PM rue_mohr: I'v found that stuff can just shatter on its own
07:14 PM rue_mohr: I'v seen holes start to spider 7 years after they were drilled
07:14 PM rue_mohr: ?
07:15 PM Tom_L: the screw puts alot more stress on it and that should eliminate that
07:16 PM Tom_L: polycarbonate is better than plexiglass
07:16 PM rue_mohr: wtf with the console, none of the raw mode code is working
07:16 PM rue_mohr: I mean holes with nothing bolted into them
07:16 PM rue_mohr: just holes
07:16 PM Tom_L: yeah
07:16 PM Tom_L: probably drilled too fast
07:16 PM rue_mohr: oh is polycarbonate now plexiglass
07:16 PM Tom_L: stressed it
07:16 PM rue_mohr: then whats lexan?
07:16 PM Tom_L: i'm not sure
07:17 PM Tom_L: plexi i think
07:17 PM rue_mohr: no
07:17 PM Tom_L: but i dunno
07:17 PM rue_mohr: lexan is not plexi
07:17 PM Tom_L: ok then it's poly
07:17 PM rue_mohr: you can bend it, and as worst it tears
07:17 PM Tom_L: it's way more flexible than plexi
07:17 PM rue_mohr: its clear tho
07:17 PM rue_mohr: its the bullet proof glass stuff
07:17 PM Tom_L: that's what i got but i doubt it's bullet proof
07:17 PM rue_mohr: "bullet proof'
07:18 PM rue_mohr: why doesn't ANY of this console code work anymore?
07:18 PM Tom_L: newer libs?
07:18 PM rue_mohr: lots of stuff changed, but this is pretty basic operation stuff
07:20 PM Tom_L: not anymore
07:22 PM rue_mohr: oh god, I think I see the mess I had to do last time
07:22 PM rue_mohr: char checkStdin(void) {
07:22 PM rue_mohr: int rv, i;
07:22 PM rue_mohr: int fsmo;
07:22 PM rue_mohr: char cp;
07:22 PM rue_mohr: fd_set rfds;
07:22 PM rue_mohr: struct timeval tv;
07:22 PM rue_mohr: int n;
07:22 PM rue_mohr: tv.tv_sec = 0 ; tv.tv_usec = 250000;
07:22 PM rue_mohr: FD_ZERO(&rfds);
07:22 PM rue_mohr: FD_SET(STDIN_FILENO, &rfds);
07:22 PM rue_mohr: rv = select(STDIN_FILENO+1, &rfds, NULL, NULL, &tv);
07:22 PM rue_mohr: if (0) {
07:22 PM rue_mohr: } else if (rv == -1) {
07:22 PM rue_mohr: perror("select()");
07:22 PM rue_mohr: } else if (FD_ISSET(STDIN_FILENO, &rfds)){
07:22 PM rue_mohr: rv = read(STDIN_FILENO, &cp, 1); // get character
07:22 PM rue_mohr: }
07:22 PM rue_mohr:
07:22 PM rue_mohr: }
07:22 PM rue_mohr: ^^ get a character from the console
07:23 PM rue_mohr: ugh, that works
07:23 PM rue_mohr: wtf
07:41 PM aandrew: yeah that'll work reasonably well, is 250ms enough granularity for you though? I'd usually give it 1 or 10ms to do background processing if I have to avoid threading (which is usually a good idea)
07:44 PM rue_mohr: I turned it down to 1
07:44 PM rue_mohr: us
07:44 PM rue_mohr: I'm polling cuase i need the loop for other things
07:45 PM rue_mohr: when I was writing the editor I had a whole mess of things I went thru to interface with the console, and I wrapped it all into a library
07:45 PM rue_mohr: which does more than I need, but
07:45 PM rue_mohr: the state machine needed to work out WTF a key is, it awefull
07:45 PM aandrew: 1us? that's pretty fast
07:46 PM rue_mohr: its just "do we have a key, or not?"
07:46 PM rue_mohr: your supposed to be able to change the times for a default read to basically 0 and the byte count to 1, but it doesn't work
07:47 PM rue_mohr: // raw.c_cc[VMIN] = 0;
07:47 PM rue_mohr: // raw.c_cc[VTIME] = 1;
07:47 PM rue_mohr: ^^ those currently do nothing
07:47 PM rue_mohr: 5 years ago they worked fine
07:47 PM rue_mohr: someone broke something and nobody has noticed
07:47 PM aandrew: yeah I think various systems implement the fancy stuff very sporatically if at all
07:58 PM rue_mohr: everything on the internet says to do non-blocking reads, you set those two values via termios
08:05 PM aandrew: *shrugs*
08:05 PM aandrew: when I wrote my magnetic tracker debugger utility I had a pretty sweet little thing going on
08:07 PM aandrew: it opened two serial devices (the two controllers), and listened on a bunch of network sockets too. devices and connections could come and go and it'd properly tear down/pick up new ones, and then it'd parse out the data from the receivers and spit different bits of what it pulled in to different network sockets: one for raw data, one for just s3 data, one for position/orientation, etc., etc.
08:07 PM aandrew: jso you could have this connected to the hardware and then on your laptop or whatever you could make a network connection and draw the position/orientation on the screen
08:07 PM aandrew: I wonder if I have any videos of that still
08:08 PM aandrew: oh adn you could also record the data and play it back to the same utility so you could try an algo, then re-run the exact same data with a different algo and see the differences
08:15 PM aandrew: https://mixdown.ca/dump/viz2.mp4 is an earlier version of it
08:15 PM rue_mohr: that sounds cool
08:17 PM aandrew: I keep coming back to that code because I did such a good job on it, I really shoudl create a library from it though
08:19 PM rue_mohr: :)
10:01 PM aandrew: you guys might like this: https://robustcircuitdesign.com/signal-chain-explorer/noise-distribution-considerations-for-a-multi-stage-audio-amplifier/
10:11 PM rue_mohr: https://worldradiohistory.com/UK/Practical-Electronics/70s/Practical-Electronics-1970-10.pdf
10:11 PM rue_mohr: check out pdf page 32
10:11 PM rue_mohr: they cant be making this up
10:11 PM rue_mohr: its the second time its surfaced in these magazines
10:18 PM rue_mohr: 300Hz!?
10:28 PM rue_mohr: 2-2.5khz