Getting ready to check the first part of this pig in (a couple minutes to check some addresses * 80+ firmware variants .
)
New script functions:
lua and ubasic:
set_record(state)
if state is 0 (or false) the camera is set to play mode. If 1 or true, the camera is set to record mode.
notes:
* in ubasic, get_mode returns 0 for record, 1 for play and 2 for movie. If you want to restore the original mode, you must modify the value accordingly
* get_mode() in C or script may return incorrect values after forcing the mode on some cameras, mostly those with a physical play/rec switch. This will be corrected in future versions
lua only (this is essentially unchanged from the earlier patch):
name,id,param = get_levent_def(event)
event is an event id (number) or name (string)
returns nil if event is not found
index=get_levent_index(event)
event is an event id (number) or name (string)
returns index or nil if not found
name,id,param = get_levent_def_by_index(event_index)
event_index is number index into the event table
returns nil if event is not found
post_levent_to_ui(event[,unk])
post_levent_for_npt(event[,unk])
post the event with PostLogicalEventToUI or PostLogicaEventForNotPowerType
This sends the event. The difference between functions isn't clear.
event is an event id (number) or name (string).
unk is an optional number whose meaning is unknown, defaults to zero.
Based on code, other values would probably be a pointer.
This is NOT the 3rd item in the event table.
set_levent_active(event,state)
event is an event id (number) or name (string)
state is a numeric or boolean state. true or non zero numbers turn on zero, false or nil turn off
exact meaning is unknown, but it has something to do with the delivery of the specified event.
set_levent_script_mode(state)
state is numeric or boolean state. true or non zero numbers turn on zero, false or nil turn off
exact meaning is unknown, but it has something to do with the behavior of events and/or SetLogicalEventActive.