Go to advanced search

by davenull
Sat Nov 07, 2015 2:21 pm
Forum: C/C++
Topic: memset problem
Replies: 8
Views: 2266

Re: memset problem

g++ -Wall -I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/vcos/pthreads -c "enc0001.c" -lshapes -lpthread -lrt -lwiringPi (im Verzeichnis: /home/pi/programs/test/encoder) enc0001.c: In function ‘void setup()’: enc0001.c:89:38: error: invalid conver...
by davenull
Sat Nov 07, 2015 2:16 pm
Forum: C/C++
Topic: About encoder output "jump"
Replies: 76
Views: 11501

Re: About encoder output "jump"

I need 2 tasks
1 high priority for encoder pins and computation

1 normal priority for screen output.

perhaps additionally 1 mutex then for the high pri task.

how to do it?
by davenull
Sat Nov 07, 2015 2:12 pm
Forum: C/C++
Topic: About encoder output "jump"
Replies: 76
Views: 11501

Re: About encoder output "jump"

no delay even worse!, almost hangs up completely
by davenull
Sat Nov 07, 2015 2:11 pm
Forum: C/C++
Topic: About encoder output "jump"
Replies: 76
Views: 11501

Re: About encoder output "jump"

delay(1) is also faulty. now I try no delay at all.....
by davenull
Sat Nov 07, 2015 2:08 pm
Forum: C/C++
Topic: About encoder output "jump"
Replies: 76
Views: 11501

Re: About encoder output "jump"

we had this discusion before, but even if I get quicker pin readings, nevertheless the encoder value computation is done exactly quite as slow as before (CMIIW)

is the loop cycle perhaps slowed down by terminal output?

I also assumed that delay is a non-busy wait... :-/
by davenull
Sat Nov 07, 2015 2:05 pm
Forum: C/C++
Topic: memset problem
Replies: 8
Views: 2266

memset problem

hey'all,

I have

Code: Select all

#define MAXMOTORS 4
volatile long   motenc[MAXMOTORS];
volatile int8_t ISRab[MAXMOTORS];

memset(motenc, 0, sizeof(motenc));
memset(ISRab, 0, sizeof(ISRab));
but get compiler errors

what's wrong?
by davenull
Sat Nov 07, 2015 1:44 pm
Forum: C/C++
Topic: About encoder output "jump"
Replies: 76
Views: 11501

Re: About encoder output "jump"

Also the DUE (and even the Mega optionally) is running by multitasking plus Hardware and Timer Interrupts, but I agree: bare metal, not Linux. I googled and read a lot in the web but all the RASPI libs are either confusing or don't work at all or don't work reliably (like my own approach and the one...
by davenull
Sat Nov 07, 2015 1:35 pm
Forum: C/C++
Topic: how to AND a variable by bit coded values (e.g. B00001100) ?
Replies: 19
Views: 4611

Re: how to AND a variable by bit coded values (e.g. B0000110

why don't you stop arguing and spamming and trolling?
I need it just for 1 special purpose, and I'm fine for this unique special purpose!

It' finally my code, and 0b0001100 works, so what ?? :evil:
by davenull
Sat Nov 07, 2015 1:13 pm
Forum: C/C++
Topic: C/C++ crosscompiler on a Windows PC ?
Replies: 33
Views: 8746

Re: C/C++ crosscompiler on a Windows PC ?

ps,
slowly I'm really despairing having to work for compile and all that on the Raspi itself..



Image A KINGDOM OF HEAVEN FOR A CROSS COMPILER !! Image
by davenull
Sat Nov 07, 2015 12:49 pm
Forum: C/C++
Topic: HDMI graphic lib: openvg syntax questions
Replies: 91
Views: 11941

Re: HDMI graphic lib: openvg syntax questions

yes, I think it's this way - but I think I won't use that lib anyway, it's too confusing with those structure instances. but about Geany: I will stick to it, never using make, but then compellingly having to endure these tons of parameters :( *sigh* how awesome it was to work with the Ardiuino IDE i...
by davenull
Sat Nov 07, 2015 12:33 pm
Forum: C/C++
Topic: how to AND a variable by bit coded values (e.g. B00001100) ?
Replies: 19
Views: 4611

Re: how to AND a variable by bit coded values (e.g. B0000110

no, the binary thing is fine and I want to keep the code compatible to my Arduino code which works absolutely perfect and accurate!

0b0001100 is absolutely ok now!
by davenull
Sat Nov 07, 2015 12:27 pm
Forum: C/C++
Topic: About encoder output "jump"
Replies: 76
Views: 11501

Re: About encoder output "jump"

I cant make this lib working. but I tried my own code which is working fine on Arduino Mega (by AVR timer IRQs) and on Arduino DUE (by quick DueTimer Loops of 100µs).. The good news: for extremely slow rotations (<100 encoder ticks / sec) it works by the Raspi. The bad news: for normal rotation spee...
by davenull
Sat Nov 07, 2015 11:23 am
Forum: C/C++
Topic: how to AND a variable by bit coded values (e.g. B00001100) ?
Replies: 19
Views: 4611

Re: how to AND a variable by bit coded values (e.g. B0000110

yes, thank you a lot,
0b00001100
works absolutely fine!

8-)
by davenull
Sat Nov 07, 2015 11:16 am
Forum: C/C++
Topic: how to AND a variable by bit coded values (e.g. B00001100) ?
Replies: 19
Views: 4611

Re: how to AND a variable by bit coded values (e.g. B0000110

a pity!
also not a lib for binary representation available?

otherwise FTM I would take as workaround

#define B00001100 12

would that be correct?
by davenull
Sat Nov 07, 2015 10:29 am
Forum: C/C++
Topic: how to AND a variable by bit coded values (e.g. B00001100) ?
Replies: 19
Views: 4611

how to AND a variable by bit coded values (e.g. B00001100) ?

how can I do this on my Raspi? altAB &= B00001100; It works fine on my Arduino! #define pin_encA 4 #define pin_encB 5 volatile int8_t altAB; int8_t schrittTab[16] = {0,0,0,0,1,0,0,-1, 0,0,0,1,0,0,-1,0}; in32_t encval; void compenc { altAB <<= 2; altAB &= B00001100; altAB |= (digitalRead(pin_...
by davenull
Sat Nov 07, 2015 10:03 am
Forum: Deutsch
Topic: preiswerte Raspi-kompatible kabellose QWERTZ Tastatur+Maus ?
Replies: 32
Views: 6588

Re: preiswerte Raspi-kompatible kabellose QWERTZ Tastatur+Ma

ganz schön traurig!

BTW, OT:
gibt es auch eine Möglichkeit, den WLAN-Zugriff schneller zu machen?
1 Seitenaufbau von Iceweasel mit Edimax stick dauert 1 geschlagene Minute, während der selbe Stick im selben Netz an einem PC mit Firefox die Seite in 1-5 Sekunden aufbaut !!!
echt zum Ko***** :evil:
by davenull
Sat Nov 07, 2015 9:03 am
Forum: C/C++
Topic: pthread questions
Replies: 30
Views: 8925

Re: pthread questions

pls what?
could you pls just answer the 3 questions quick, short, and simple?
by davenull
Sat Nov 07, 2015 8:53 am
Forum: C/C++
Topic: pthread questions
Replies: 30
Views: 8925

Re: pthread questions

update: 2) is it useful to link by -D_REENTRANT additionally for Raspberry Pi? 3) how is it possible to immediately stop or kill 1 task by main() or by another task ? (e.g., a) immediately in case of emergency stop (no cleaning required necessarily) or b) by a higher-priority task (in this case a cl...
by davenull
Sat Nov 07, 2015 7:57 am
Forum: C/C++
Topic: HDMI graphic lib: openvg syntax questions
Replies: 91
Views: 11941

Re: HDMI graphic lib: openvg syntax questions

1st, about the color codes: but if you don't use #include, would it be possible then to access colors by color identifiers like e.g., MAGENTA DARKMAGENTA ROSE PURPLE PINK DEEPPINK and nevertheless, will it be then also possible to #define one's own proprietary colors like, e.g. PALEEGGSHELL or INDIA...
by davenull
Sat Nov 07, 2015 7:47 am
Forum: C/C++
Topic: About encoder output "jump"
Replies: 76
Views: 11501

Re: About encoder output "jump"

how exactly are the download and install commands?
by davenull
Fri Nov 06, 2015 8:21 pm
Forum: C/C++
Topic: About encoder output "jump"
Replies: 76
Views: 11501

Re: About encoder output "jump"

nobody got any quick guide availble ?
by davenull
Fri Nov 06, 2015 7:22 pm
Forum: Deutsch
Topic: preiswerte Raspi-kompatible kabellose QWERTZ Tastatur+Maus ?
Replies: 32
Views: 6588

Re: preiswerte Raspi-kompatible kabellose QWERTZ Tastatur+Ma

dann hätte man aber eigentlich einen Hersteller- oder Händler-Hinweis erwarten können müssen...
insb. von Pollin, denen ich ja geschrieben habe, dass ichs für nen Raspi brauche und mich extra nach Kompatibilität vorher erkundigt habe! :evil:
by davenull
Fri Nov 06, 2015 7:08 pm
Forum: C/C++
Topic: HDMI graphic lib: openvg syntax questions
Replies: 91
Views: 11941

Re: HDMI graphic lib: openvg syntax questions

is it not possible to drop all those parameters for compile and build? why is it not possible to just #include <openvg.h> and nothing else, and use them system-wide? not like this medium-sized novel: g++ -Wall -I/opt/vc/include -I/opt/vc/include/interface/vmcs_host/linux -I/opt/vc/include/interface/...
by davenull
Fri Nov 06, 2015 6:55 pm
Forum: Deutsch
Topic: preiswerte Raspi-kompatible kabellose QWERTZ Tastatur+Maus ?
Replies: 32
Views: 6588

Re: preiswerte Raspi-kompatible kabellose QWERTZ Tastatur+Ma

danke, habe es zwar schon zur Retoure fertig gemacht, kann es aber Montag vorher nochmal kurz testen!
by davenull
Fri Nov 06, 2015 6:34 pm
Forum: C/C++
Topic: About encoder output "jump"
Replies: 76
Views: 11501

Re: About encoder output "jump"

ok, I start trying.

1st, how can I download and install the rotary encoder libs on my SD card?
1 step after the other

they must be available system-wide from either working directory

Go to advanced search