Go to advanced search

by ab1jx
Tue Oct 09, 2018 1:56 am
Forum: Beginners
Topic: resizing partitions
Replies: 8
Views: 2042

Re: resizing partitions

You might want to use Piclone to back up the SD in question before you use this advice. With some tools like fdisk programs and gparted you can resize a partition to fill the whole device by just deleting it then creating a new one. DON'T format it if there's data in there. It works because the star...
by ab1jx
Tue Oct 09, 2018 1:23 am
Forum: Troubleshooting
Topic: fdisk changes doesn't seem to stick
Replies: 18
Views: 5477

Re: fdisk changes doesn't seem to stick

Interesting. A couple things: 1 a partition table is just a disk sector like any other. https://en.wikipedia.org/wiki/Master_boot_record If you're really stuck you can wipe it by dding some (512?) bytes from /dev/zero to the root of the drive. Some operating systems put additional stuff in there whi...
by ab1jx
Sun Oct 07, 2018 4:43 pm
Forum: General discussion
Topic: Simple/quick/easy way to mount a UFS partition on a Pi over USB?
Replies: 5
Views: 168

Re: Simple/quick/easy way to mount a UFS partition on a Pi over USB?

I actually have a running OpenBSD on one of the laptops, but no way to physically connect the desktop drive to it. Well, duh, now that I have the USB adapter that should work. In theory I should be able to plug both of my USB-adapted drives into it at the same time and just copy stuff under OpenBSD....
by ab1jx
Sun Oct 07, 2018 3:23 pm
Forum: General discussion
Topic: Simple/quick/easy way to mount a UFS partition on a Pi over USB?
Replies: 5
Views: 168

Re: Simple/quick/easy way to mount a UFS partition on a Pi over USB?

Alright, I now have a ufs.ko, but I'm having trouble getting it recognized. -------------- There's some endian problem with the rtl8192cu driver source and I am using that driver from the previous version. It was bad enough to stop the build a few times. So I went into menuconfig and disabled trying...
by ab1jx
Sat Oct 06, 2018 6:32 pm
Forum: General discussion
Topic: Simple/quick/easy way to mount a UFS partition on a Pi over USB?
Replies: 5
Views: 168

Re: Simple/quick/easy way to mount a UFS partition on a Pi over USB?

For about 15 years I used OpenBSD on i386/686 Do you not have any Intel compatible PC anymore? Only a couple laptops and this is a 3.5 inch drive. Most were also too old to have SATA. So I guess I'm building the whole kernel. From my notes: Started with https://github.com/notro/rpi-source/wiki The ...
by ab1jx
Sat Oct 06, 2018 2:20 am
Forum: General discussion
Topic: Simple/quick/easy way to mount a UFS partition on a Pi over USB?
Replies: 5
Views: 168

Simple/quick/easy way to mount a UFS partition on a Pi over USB?

For about 15 years I used OpenBSD on i386/686 machines as my main operating system. Then I got a few Pis and gradually switched some things over. Except my 10 year old Dell died about a year ago and I'd just put a 1 TB SATA drive in it. So I just got a StarTech adapter to make that drive into a USB ...
by ab1jx
Thu Oct 04, 2018 10:04 pm
Forum: Graphics, sound and multimedia
Topic: omxplayer volume keys stop working
Replies: 0
Views: 69

omxplayer volume keys stop working

I wrote this then almost scrapped it. My volume keys don't work when Num Lock is in the wrong position. Maybe somebody else will find it useful. I think the keycodes change, for me the volume keys only work when the Num Lock light is on. Full sized US keyboard ------------------------ The keypad +/-...
by ab1jx
Sun Sep 30, 2018 11:58 pm
Forum: Off topic discussion
Topic: USB - UAS over BOT ?
Replies: 5
Views: 2815

Re: USB - UAS over BOT ?

But the UASP part is what i was looking to find out about. I don't get any hits when I search for it in the raspberrypi.org forums. I'm looking at buying a StarTech S3510BMU33 adapter with UASP or for $5 less a S3510SMU33 without it. I think it will revert to conventional mode if UASP isn't supporte...
by ab1jx
Sat Sep 15, 2018 6:23 pm
Forum: General discussion
Topic: The Raspberry Pi 3 Model B Q&A thread
Replies: 457
Views: 179864

Re: The Raspberry Pi 3 Model B Q&A thread

Old thread, I know. Go through the official sellers that you can find at https://www.raspberrypi.org/products/, they charge the official (lowest) price. I think I've seen the Pi 3b being resold for as much as $50 when the official price is $35. There are a lot of resellers making profits off unsuspe...
by ab1jx
Wed Sep 12, 2018 3:12 pm
Forum: C/C++
Topic: Commenting out a comment
Replies: 11
Views: 660

Re: Commenting out a comment

I was poking around in X header files (the source of most knowledge) and wanted to quote this section in my program code until I get it working. Compiles fine. #if (0) extern void XSetWMName( Display* /* display */, Window /* w */, XTextProperty* /* text_prop */ ); which calls: extern void XSetTextP...
by ab1jx
Mon Sep 10, 2018 12:24 am
Forum: C/C++
Topic: Getting nonsense from GCC floats (doubles too)
Replies: 9
Views: 500

Re: Getting nonsense from GCC floats (doubles too)

Thank you, you're absolutely right, wwidth and splitat don't belong together at all, they're X and Y. Going with this for now: oldy = splitat - (((dpybuf[i]-min) / yrange)* (splitat* 1.0)); Maybe I'll assign some intermediate variables. The fraction (dpybuf -min) / yrange) is what fraction of full s...
by ab1jx
Sun Sep 09, 2018 8:09 pm
Forum: C/C++
Topic: Getting nonsense from GCC floats (doubles too)
Replies: 9
Views: 500

Re: Getting nonsense from GCC floats (doubles too)

Hmm so I'd have to do (uint16_t)(everything else)? That works the same as no cast finally. I thought a cast applied to everything to the right of it, like a funnel sideways into the type you wanted on the other side of the =. I don't usually use them. But a significant problem here is that an XSegme...
by ab1jx
Sun Sep 09, 2018 5:36 pm
Forum: C/C++
Topic: Getting nonsense from GCC floats (doubles too)
Replies: 9
Views: 500

Re: Getting nonsense from GCC floats (doubles too)

Something doesn't make sense to me with your code, its the y axis that has problems and this is the y axis. oldy = (uint16_t) splitat - ((((dpybuf[i]-min) * 1.0) / (wwidth * 1.0)) * splitat); That basically says oldy = splitat - some value * splitat; somevalue = some subtract calculation / wwidth T...
by ab1jx
Sun Sep 09, 2018 4:53 pm
Forum: C/C++
Topic: Getting nonsense from GCC floats (doubles too)
Replies: 9
Views: 500

Re: Getting nonsense from GCC floats (doubles too)

Yes, Peter, I remember. I still had an old sinewave file around, wrong number of points, so I generated a new one and ran it. Not sure why it looks like a double peak but I am scaling a 4096 point FFT into 640 pixel width here. I hope to eventually have a zoom button that goes to 1 pixel/FFT point s...
by ab1jx
Sun Sep 09, 2018 4:13 am
Forum: C/C++
Topic: Getting nonsense from GCC floats (doubles too)
Replies: 9
Views: 500

Getting nonsense from GCC floats (doubles too)

I'm working on this program which has threads, and uses Xlib. My GCC is 6.3, it's a Pi 3B up to date as of an hour ago. It's an SDR program, handles thousands of data points per second coming in from an RTL2832 dongle. One thread runs the dongle, puts the data into a queue of packets, locks a mutex ...
by ab1jx
Sat Sep 08, 2018 1:23 pm
Forum: C/C++
Topic: So when does xlib actually do work?
Replies: 7
Views: 403

Re: So when does xlib actually do work?

Xlib has known about threads since x11r6, there's an XInitThreads() you call first, then you can use XLockDisplay(). I haven't tried that, you can also get a file descriptor for the Display https://www.linuxquestions.org/questions/showthread.php?p=2431345#post2431345 which you can use with select()....
by ab1jx
Fri Sep 07, 2018 6:39 pm
Forum: C/C++
Topic: So when does xlib actually do work?
Replies: 7
Views: 403

Re: So when does xlib actually do work?

I took my XFlush(dpy)s out, because they seemed like something you only needed to do it you were in a hurry and X would repaint when it got around to it anyway. (It runs without them) But thank you. I haven't dealt with black and white visuals since maybe 1995 but I did have a few Hercules setups, m...
by ab1jx
Thu Sep 06, 2018 5:45 pm
Forum: C/C++
Topic: So when does xlib actually do work?
Replies: 7
Views: 403

Re: So when does xlib actually do work?

I'm not looking for a pthreads tutorial. I have most of the program working so far, and X is a small part of it I've only recently added. But it's how to shoehorn my realworld events into the X event stream I don't get. X is event-driven, I get that, but it's so busy running in circles I'm not sure ...
by ab1jx
Thu Sep 06, 2018 3:30 am
Forum: C/C++
Topic: So when does xlib actually do work?
Replies: 7
Views: 403

So when does xlib actually do work?

I wasn't entirely happy with the select trick I found before, but I also find hints that select and epoll might be the way to go. I can find this basic event loop: XSelectInput(dpy, win1, ExposureMask | ButtonPressMask | ... ); /* infinite event loop */ while(1) { XEvent xev; XNextEvent(dpy, &xev); ...
by ab1jx
Wed Sep 05, 2018 7:34 pm
Forum: Camera board
Topic: Cheap RC airplane with "outboard" Pi Zero and camera
Replies: 42
Views: 9576

Re: Cheap RC airplane with "outboard" Pi Zero and camera

Yeah, maybe. The Solar Impulse 2 only had 1 wing too. https://www.smithsonianmag.com/innovati ... 180968000/
over_gg_bridge_sf.jpg
over_gg_bridge_sf.jpg (87.35 KiB) Viewed 347 times
by ab1jx
Wed Sep 05, 2018 5:04 pm
Forum: Camera board
Topic: Cheap RC airplane with "outboard" Pi Zero and camera
Replies: 42
Views: 9576

Re: Cheap RC airplane with "outboard" Pi Zero and camera

I wonder if you could bind 2 panes together vertically and make a sort of biplane to get more lifting capability. I thought of similar, connecting my two planes horizontally. Have not tried yet. No, it needs to be vertically, at least for what I'm thinking of. Not even another plane but another win...
by ab1jx
Wed Sep 05, 2018 1:53 pm
Forum: C/C++
Topic: Commenting out a comment
Replies: 11
Views: 660

Re: Commenting out a comment

I think the standard way is something like #if 0 code that is commented out #endif This works because preprocessor defines nest properly as opposed to comment delimiters. This is nice because (maybe) you can have // and /* */ comments inside. /* */ comments are a nuisance because you can't nest the...
by ab1jx
Wed Sep 05, 2018 2:42 am
Forum: C/C++
Topic: Commenting out a comment
Replies: 11
Views: 660

Re: Commenting out a comment

Right, I've gotten the "multiline comment" warning if I have a line continued with a \ at the end then use // at the beginning of both. Commenting only the first line doesn't work, I guess because the \ is ignored after the // is there. I've used /* // old comment old code */ before, I just never ha...
by ab1jx
Tue Sep 04, 2018 10:20 pm
Forum: C/C++
Topic: Commenting out a comment
Replies: 11
Views: 660

Commenting out a comment

I just discovered that this works, never tried it before. If you've got /* some section you want to disable here */ You can add // to change the /* and */ to ///* and //*/ to re-enable the commented out section but leave it marked so it's like. ///* some section you want to disable here (this is now...
by ab1jx
Tue Sep 04, 2018 9:32 pm
Forum: Off topic discussion
Topic: Front panel program?
Replies: 23
Views: 4029

Re: Front panel program?

Decent quick/minimal xlib tutorial. Wish I'd found it a year or so ago when I was starting http://math.msu.su/%7Evvb/2course/Borisenko/CppProjects/GWindow/xintro.html It's old but xlib's about 35 years old now. Stuff written at colleges, particularly as part of background material that everyone shou...

Go to advanced search