dial and button issues on some cams - General Discussion and Assistance - CHDK Forum supplierdeeply

dial and button issues on some cams

  • 5 Replies
  • 93 Views
*

Offline reyalp

  • ******
  • 12536
dial and button issues on some cams
« on: 25 / May / 2020, 21:39:47 »
Advertisements
From @Caefix in the sd980 thread: https://chdk.setepontos.com/index.php?topic=4228.msg143504#msg143504
:) ..., except when FW update is used, yes. (My_fw=101c)

There´s another jogdial issue: :o
Ix200 & S110 ignore the wheels, S90 & Ix300 the clicks, (Ix870 takes them all.)
Code: [Select]
--[[
@title jogdial test
@chdk_version 1.4
]]

set_console_layout(0,0,25,10)

play_sound(4)
wheel_right()
print("wheel_right()", 1)
 sleep(2000)
 play_sound(4)
click "right"
print("click 'right'", 2)
 sleep(2000)
 play_sound(4)
wheel_left()
print("wheel_left()", 3)
 sleep(2000)
 play_sound(4)
click "left"
print("click 'left'", 4)
sleep(2000)
play_sound(5)

JogDialTest.Lua should perform 4 moves in the wheel-click combo, not 2.
Clicks allone work.
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 12536
Re: dial and button issues on some cams
« Reply #1 on: 25 / May / 2020, 21:41:02 »
I don't really understand what the issue is, or what the script is supposed to do.

Do wheel_left() and wheel_right() work by themselves?
Don't forget what the H stands for.

*

Offline Caefix

  • ***
  • 187
  • Sorry, busy deleting test shots...
Re: dial and button issues on some cams
« Reply #2 on: Yesterday at 12:42:06 »
Once a mystic man tried to reinvent the wheel, that´s why we have the triangle. :lol

Wheel works in menues, textbox() & file_browser().

In upper script (playmode) I would expect no sense but shifting 2 pics >> & 2 pics <<, like Sx200,Sx280,Ix870,... do.
But SX 230,260, Ix200 & S110, ... eat the wheels,
S90 & Ix300, ?... the following clicks.

Because of the cams without jogdial at all I avoid the wheel_ statements in scripts, but there is the manual...
« Last Edit: Yesterday at 15:11:29 by Caefix »
All lifetime is a loan from eternity.

*

Offline Caefix

  • ***
  • 187
  • Sorry, busy deleting test shots...
Re: dial and button issues on some cams
« Reply #3 on: Yesterday at 15:09:25 »
 :xmas Last line outdated!
Code: [Select]
/usr/bin/sh: svnversion: command not found

.../ubasic/ubasic.c  // factors


  case TOKENIZER_WHEEL_LEFT:
      accept(TOKENIZER_WHEEL_LEFT);
      r=get_jogdial_direction()==JOGDIAL_LEFT ? 1:0;
flag_yield=1;
    break;
  case TOKENIZER_WHEEL_RIGHT:
      accept(TOKENIZER_WHEEL_RIGHT);
      r=get_jogdial_direction()==JOGDIAL_RIGHT ? 1:0;
flag_yield=1;
    break;
( ( ( ( :-X
Code: [Select]
@title jogdial.bas
@chdk_version 1.4

do
print -wheel_left,-wheel_right
sleep 111
print , wheel_right,wheel_left
sleep 222
until 1>2
end
All lifetime is a loan from eternity.


*

Offline reyalp

  • ******
  • 12536
Re: dial and button issues on some cams
« Reply #4 on: Yesterday at 18:50:48 »
:xmas Last line outdated
I'm sorry. I don't understand what you are trying to communicate.

wheel_left() and wheel_right() send wheel events to the Canon firmware. They do not return anything, and are not expected to affect get_jogdial_direction()

get_jogdial_direction() is completely separate code which receives wheel changes (usually from hardware MMIO) to allow CHDK to respond to wheel inputs.

If you want to test the wheel_ functions, you can use chdkptp. Put the camera in a mode where using the physical wheel adjusts something, like Tv mode, or a menu, and then use
Code: [Select]
=wheel_left()
If the firmware responds the same as it does to physically turning the wheel one click, then it's ok.
Don't forget what the H stands for.

*

Offline Caefix

  • ***
  • 187
  • Sorry, busy deleting test shots...
Re: dial and button issues on some cams
« Reply #5 on: Today at 11:03:42 »
In modes without jogdial-function it´s nice on the parameter side. 8)
Code: [Select]
// tokenizer.c
  {"get_wheel",               TOKENIZER_GET_WHEEL},
 
// tokenizer.h
  TOKENIZER_GET_WHEEL,
 
// ubasic.c
  case TOKENIZER_GET_WHEEL:
      accept(TOKENIZER_GET_WHEEL);
      r=get_jogdial_direction();
  if (r==0) break;
      r=r==JOGDIAL_LEFT ? -1:1; // left=-1 | right=1
flag_yield=1;
    break;
Code: [Select]
@title jogdial.bas
@chdk_version 1.4
@param J Use Jogdial
@default J 1
@range J 0 1

do
if J=1 then j=get_wheel
if j=-1 then print j, "wheel_left"
if j=1  then print j, "wheel_right"
sleep 111
until 1>2
end
All lifetime is a loan from eternity.

 

Related Topics