![]() |
Forum Index : Microcontroller and PC projects : Blit and Gauges
![]() ![]() |
|||||
Author | Message | ||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2932 |
OK - If the fulcrum is centre 397,110, and the pointer is 94 pixels long, then when in the 'south' position, it's tip will hit around x=397, y=204 Your TEXT for DOW$ is at 415,235 with LM 'justification'. This could be your issue - especially if you have moved Time already. Comment out any TEXT DOW$ lines of code (including any that 'clear' the data in that area too! WW |
||||
lew247![]() Guru ![]() Joined: 23/12/2015 Location: United KingdomPosts: 1702 |
I commented out everything to do with time or DOW so there is nothing other than the pictures on the screen, the writing/boxes on the left Nothing in the middle other than the guage and nothing under it or on the right The needle end half of the needle still cuts off for some reason its probably something simple but... |
||||
WhiteWizzard Guru ![]() Joined: 05/04/2013 Location: United KingdomPosts: 2932 |
A bit more drastic, but try commenting out EVERY line of 'main' code apart from Pointer; then check it is ok. If so, then uncomment chunk by chunk. Process of elimination . . . . This is quite quick thanks to the F4, F2 shortcut keys! |
||||
lew247![]() Guru ![]() Joined: 23/12/2015 Location: United KingdomPosts: 1702 |
Tried that but had no luck I've uploaded the updated 2017-08-18_214456_weather2-test.zip program here in case anyone else wants to take a look |
||||
disco4now![]() Guru ![]() Joined: 18/12/2014 Location: AustraliaPosts: 1000 |
Hi Lewis, Sorry the getscanline() stuff I added is not an exact science. I saw the same thing, its to do with that bit of code I added to drawpointer. New values that are working for me are below, alternatively comment out all that new stuff I added or fiddle with the numbers in loop while (k>0 AND k<500) a bit. Its basically trying to stop it refreshing the screen when you are changing the values. Regards Gerry Sub drawpointer(angle as float, offset as integer) local integer last_x, last_y, last_w, last_h, i for i=0 to nt-1 'rotate the pointer into the drawing array for each triangle rotatetriangle(i,pcolour,angle,X_point+X_left,Y_point+Y_top,ptr(0),ptr(1),ptr(2),ptr(3),ptr(4),ptr(5)) NEXT i last_x=x: last_y=y: last_w=w: last_h=h getlimits(x, y, w, h) blit WRITE #1, last_x, last_y, last_w, last_h 'update old rectangle with saved data blit close #1 'free buffer blit read #1, x, y, w, h 'save the new rectangle to memory local integer k do k=getscanline() loop while (k>0 AND k<500) for i=0 to nt-1 'write new triangle for each triangle triangle xx0(i), yy0(i)+offset, xx1(i), yy1(i)+offset, xx2(i), yy2(i)+offset, tcol(i),tcol(i) NEXT i drawpivot(offset) End Sub Latest F4 Latest H7 FotS |
||||
![]() ![]() |
![]() |
![]() |
The Back Shed's forum code is written, and hosted, in Australia. | © JAQ Software 2025 |