Toggle Grids - Script Writing - CHDK Forum supplierdeeply

Toggle Grids

  • 3 Replies
  • 1686 Views
Toggle Grids
« on: 26 / March / 2023, 03:48:41 »
Advertisements
@reyalp

I currently toggle the CHDK grid display in my script via this

Code: [Select]
set_config_value(2140,1-get_config_value(2140,0))

When I exit the script the toggle is clearly working.

If the grid is off and I toggle it on in the script, the grid appears.

If it is on and I try and toggle it off, the grid remains, but on exit it clearly has been toggled off.

It looks like the set_config isn't refreshing the screen.

Is there someone I could do to ensure that toggling the grid does truly swtich it off, ie not display it?

Cheers

Garry

Re: Toggle Grids
« Reply #1 on: 26 / March / 2023, 04:03:40 »
'Fixed'.

Code: [Select]
            set_config_value(2140,1-get_config_value(2140,0))
            exit_alt()
            sleep(100)
            enter_alt()

*

Offline reyalp

  • ******
  • 14118
Re: Toggle Grids
« Reply #2 on: 26 / March / 2023, 15:49:58 »
'Fixed'.

Code: [Select]
            set_config_value(2140,1-get_config_value(2140,0))
            exit_alt()
            sleep(100)
            enter_alt()
I think draw_clear() should be a more concise way of forcing a redraw. Let me know if that doesn't work.
Don't forget what the H stands for.

Re: Toggle Grids
« Reply #3 on: 26 / March / 2023, 17:32:39 »
Confirmed as working.

Cheers


 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal