Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 15:43 03 Jul 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Blit and Gauges

     Page 3 of 3    
Author Message
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2932
Posted: 11:09am 18 Aug 2017
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 1702
Posted: 11:16am 18 Aug 2017
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 2932
Posted: 11:21am 18 Aug 2017
Copy link to clipboard 
Print this post

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 Kingdom
Posts: 1702
Posted: 11:45am 18 Aug 2017
Copy link to clipboard 
Print this post

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: Australia
Posts: 1000
Posted: 01:10pm 18 Aug 2017
Copy link to clipboard 
Print this post

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
 
     Page 3 of 3    
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025