Go to advanced search

by PeterO
Fri Sep 21, 2018 1:04 pm
Forum: Official Foundation Display
Topic: GTK3 Comboboxes unusable on touch display
Replies: 4
Views: 95

Re: GTK3 Comboboxes unusable on touch display

Worked around problem using a GtkMenuButton and a GtkPopover, which works nicely :-)
Image
PeterO
by PeterO
Thu Sep 20, 2018 11:53 am
Forum: Official Foundation Display
Topic: GTK3 Comboboxes unusable on touch display
Replies: 4
Views: 95

Re: GTK3 Comboboxes unusable on touch display

Combobox is unusable. Install the demo and try it yourself. The "Items with icons" example won't allow the selection to be changed from "Warning" With a mouse the selection highlighting follows the mouse pointer, but with the touch screen the selection won't change. And it is inconsistent too. Once ...
by PeterO
Thu Sep 20, 2018 10:26 am
Forum: Official Foundation Display
Topic: GTK3 Comboboxes unusable on touch display
Replies: 4
Views: 95

GTK3 Comboboxes unusable on touch display

I've discovered that the combobox in GTK3 is unusable on a touch screen like the official 7" display. First found the problem in my own code then found the combobox demo code in gtk3-demo has the same problems. gtk3-demo comes from the gtk-3-examples package and can can be install with sudo apt-get ...
by PeterO
Mon Sep 17, 2018 3:26 pm
Forum: Troubleshooting
Topic: Running into problems with serial over USB
Replies: 8
Views: 191

Re: Running into problems with serial over USB

"...put the tty into raw mode"... Not sure what you mean by this. I have a serial device which I am accessing using libserialport. There are two functions sp_read and sp_write which allow me to send and receive data over the chosen port. what would putting the tty into raw mode do for me? I have no...
by PeterO
Mon Sep 17, 2018 7:03 am
Forum: Troubleshooting
Topic: Running into problems with serial over USB
Replies: 8
Views: 191

Re: Running into problems with serial over USB

First thought, have you put the tty into raw mode ?

PeterO
by PeterO
Sat Sep 15, 2018 10:20 am
Forum: Graphics programming
Topic: gcc error: main.c No such file or directory
Replies: 4
Views: 125

Re: gcc error: main.c No such file or directory

gcc is telling you there is no file called main.c in the current working directory.

In which subdirectory have you put the main.c file ?

Oh and why do you think you need to use sudo ?

PeterO
by PeterO
Fri Sep 14, 2018 4:45 pm
Forum: Off topic discussion
Topic: What was your first computer?
Replies: 370
Views: 85616

Re: What was your first computer?

What's more telling is that, before I even got my first home computer, I trained on an IBM 1966 mainframe, learning true machine code (even some binary programming) and went on to cut my teeth using COBOL on an IBM 2966 at British Aerospace. If I'd been smart (and not employed otherwise) in 1999, I...
by PeterO
Sun Sep 09, 2018 9:19 am
Forum: Other programming languages
Topic: Bash script for read .txt
Replies: 11
Views: 218

Re: Bash script for read .txt

Try

Code: Select all

echo -n "Hello World" > led.txt
The "-n" will remove the new line character from the end of the string.

PeterO
by PeterO
Sun Sep 09, 2018 6:41 am
Forum: C/C++
Topic: Getting nonsense from GCC floats (doubles too)
Replies: 9
Views: 331

Re: Getting nonsense from GCC floats (doubles too)

My advice, never test anything to do with FFTs with "live" data. Always force a simple waveform in at the earliest possible stage so that your code is working with a known signal and a known spectrum. Trying to debug numerical problems with random data is a nightmare !

PeterO
by PeterO
Sat Sep 08, 2018 8:19 pm
Forum: Troubleshooting
Topic: Seagate hdd problem.
Replies: 13
Views: 267

Re: Seagate hdd problem.

For some reason, if I have a USB booting Raspbian, after the boot process has finished and the GUI loads etc, when I plug in the expansion drive, the system stops working. I think that the HDD somehow unmounted the USB boot drive. I expect the initial current taken by the HDD is more than the PI PS...
by PeterO
Sat Sep 08, 2018 7:31 pm
Forum: Troubleshooting
Topic: Seagate hdd problem.
Replies: 13
Views: 267

Re: Seagate hdd problem.

For some reason, if I have a USB booting Raspbian, after the boot process has finished and the GUI loads etc, when I plug in the expansion drive, the system stops working. I think that the HDD somehow unmounted the USB boot drive. I expect the initial current taken by the HDD is more than the PI PS...
by PeterO
Fri Sep 07, 2018 9:27 am
Forum: General discussion
Topic: Glade control panel
Replies: 5
Views: 149

Re: Glade control panel

picandies wrote:
Fri Sep 07, 2018 9:18 am
Has anyone on the rpi forum used Glade to make a hardware control app?
Yes. But I can't find the code at the moment :oops:

Image

PeterO
by PeterO
Thu Sep 06, 2018 9:36 am
Forum: General discussion
Topic: Glade control panel
Replies: 5
Views: 149

Re: Glade control panel

Using Python with Gtk3 is covered here : https://python-gtk-3-tutorial.readthedocs.io/en/latest/
Specifics on using Glade are here : https://python-gtk-3-tutorial.readthedo ... ilder.html

HTH

PeterO
by PeterO
Tue Aug 28, 2018 4:23 pm
Forum: Other
Topic: Download PROTA OS, new headless-oriented OS for B+ for free
Replies: 30
Views: 8643

Re: Download PROTA OS, new headless-oriented OS for B+ for free

This thread is 3 years old, and product seems to have been dead for just as long.
PeterO
by PeterO
Tue Aug 28, 2018 6:51 am
Forum: Troubleshooting
Topic: RPi3 won't mount external USB drive
Replies: 26
Views: 611

Re: RPi3 won't mount external USB drive

I run similar (*) Seagate drives on PI2s and Pi3s. On a Pi2 with a 4A supply it is plugged directly into the PI's USB port On a Pi3B+ with a 2.5A supply I use the (no longer available) Pimoroni raspberry shaped four port powered hub. Not had any problems with either configuration. PeterO (*) Its har...
by PeterO
Fri Aug 24, 2018 11:33 am
Forum: Advanced users
Topic: Can't manually enable experimental OpenGL driver on "clean" installation
Replies: 6
Views: 269

Re: Can't manually enable experimental OpenGL driver on "clean" installation

Found this old comment by Simon Long... https://www.raspberrypi.org/blog/another-new-raspbian-release/#comment-1252967 Perhaps the reason why the driver is not activated depends on one of these factors... Maybe , but that is over 2 years ago and many things have changed in that time...... I don't k...
by PeterO
Fri Aug 24, 2018 8:45 am
Forum: Raspbian
Topic: Getting Sudo Error
Replies: 10
Views: 300

Re: Getting Sudo Error

I checked the file and the entire line is commented out. I don't think I've edited the file at all from install. Read the manual page ! Other special characters and reserved words The pound sign (‘#’) is used to indicate a comment (unless it is part of a #include directive or unless it occurs in th...
by PeterO
Thu Aug 23, 2018 4:36 pm
Forum: Raspbian
Topic: Getting Sudo Error
Replies: 10
Views: 300

Re: Getting Sudo Error

I checked the file and the entire line is commented out. I don't think I've edited the file at all from install. Read the manual page ! Other special characters and reserved words The pound sign (‘#’) is used to indicate a comment (unless it is part of a #include directive or unless it occurs in th...
by PeterO
Thu Aug 23, 2018 3:28 pm
Forum: Raspbian
Topic: Getting Sudo Error
Replies: 10
Views: 300

Re: Getting Sudo Error

Note it says "near line 27" not "On line 27".

It could be before or after line 27.

PeterO
by PeterO
Tue Aug 21, 2018 8:25 am
Forum: Python
Topic: How to change the value of a variable that is being used in a looped Python script in terminal window?
Replies: 6
Views: 161

Re: How to change the value of a variable that is being used in a looped Python script in terminal window?

Note: The reason I mention "select" is that you usually want to be able to do this without blocking. That is, you have a loop that checks periodically with "select" to see if there's anything on the TCPIP connection; else you can do your regular processing. poll is a better choice these days... htt...
by PeterO
Mon Aug 20, 2018 10:09 pm
Forum: Python
Topic: Help a brother understand this Python code
Replies: 2
Views: 139

Re: Help a brother understand this Python code

<< and >> do the same in Python as they do in C.

https://wiki.python.org/moin/BitwiseOperators

PeterO
by PeterO
Mon Aug 20, 2018 4:29 pm
Forum: C/C++
Topic: Problem while accessing /dev/mem
Replies: 4
Views: 213

Re: Problem while accessing /dev/mem

Or use /dev/gpiomem which doesn't need root permissions.

PeterO
by PeterO
Fri Aug 17, 2018 3:21 pm
Forum: Beginners
Topic: Shutdown command after Button press
Replies: 6
Views: 209

Re: Shutdown command after Button press

davidcoton wrote:
Fri Aug 17, 2018 2:06 pm
FTFY (because I couldn't parse it first time).
You should have seen it before I fixed (some of) the typos. My "space bar thumbs" are often a bit to quick !
PeterO
by PeterO
Fri Aug 17, 2018 1:26 pm
Forum: Beginners
Topic: Shutdown command after Button press
Replies: 6
Views: 209

Re: Shutdown command after Button press

It looks like OP thinks gpiozero can only be used on a PiZero ! Which is understandable and shows the poor choice of library names !

PeterO

Go to advanced search