source: trunk/core/luascript.c @ 545

Revision 545, 18.4 KB checked in by reyalp, 5 years ago (diff)

add get_mode to lua. Returns 3 values: bool record, bool video, number mode
also fixed some formatting in ubasic.c

  • Property svn:eol-style set to native
Line 
1#include "luascript.h"
2#include "../lib/ubasic/camera_functions.h"
3#include "kbd.h"
4#include "platform.h"
5#include "script.h"
6#include "lua.h"
7#include "lualib.h"
8#include "lauxlib.h"
9#include "../include/conf.h"
10#include "shot_histogram.h"
11#include "ubasic.h"
12#include "stdlib.h"
13
14static int luaCB_shoot( lua_State* L )
15{
16  kbd_sched_shoot();
17  return lua_yield( L, 0 );
18}
19
20static int luaCB_sleep( lua_State* L )
21{
22  kbd_sched_delay( luaL_checknumber( L, 1 ) );
23  return lua_yield( L, 0 );
24}
25
26// for press,release and click
27static int luaCB_keyfunc( lua_State* L )
28{
29  long k = keyid_by_name( luaL_checkstring( L, 1 ) );
30  if (k > 0 ) {
31    void* func = lua_touserdata( L, lua_upvalueindex(1) );
32    ((void(*)(long))func)( k );
33  }
34  else
35    luaL_error( L, "unknown key" );
36  return lua_yield( L, 0 );
37}
38
39static int luaCB_cls( lua_State* L )
40{
41  script_console_clear();
42  return 0;
43}
44
45static int luaCB_get_av96( lua_State* L )
46{
47  lua_pushnumber( L, shooting_get_av96() );
48  return 1;
49}
50
51static int luaCB_get_bv96( lua_State* L )
52{
53  lua_pushnumber( L, shooting_get_bv96() );
54  return 1;
55}
56
57static int luaCB_get_day_seconds( lua_State* L )
58{
59  lua_pushnumber( L, shooting_get_day_seconds() );
60  return 1;
61}
62
63static int luaCB_get_disk_size( lua_State* L )
64{
65  lua_pushnumber( L, GetTotalCardSpaceKb() );
66  return 1;
67}
68
69static int luaCB_get_dof( lua_State* L )
70{
71  lua_pushnumber( L, shooting_get_depth_of_field() );
72  return 1;
73}
74
75static int luaCB_get_far_limit( lua_State* L )
76{
77  lua_pushnumber( L, shooting_get_far_limit_of_acceptable_sharpness() );
78  return 1;
79}
80
81static int luaCB_get_free_disk_space( lua_State* L )
82{
83  lua_pushnumber( L, GetFreeCardSpaceKb() );
84  return 1;
85}
86
87static int luaCB_get_focus( lua_State* L )
88{
89  lua_pushnumber( L, shooting_get_subject_distance() );
90  return 1;
91}
92
93static int luaCB_get_hyp_dist( lua_State* L )
94{
95  lua_pushnumber( L, shooting_get_hyperfocal_distance() );
96  return 1;
97}
98
99static int luaCB_get_iso_market( lua_State* L )
100{
101  lua_pushnumber( L, shooting_get_iso_market() );
102  return 1;
103}
104
105static int luaCB_get_iso_mode( lua_State* L )
106{
107  lua_pushnumber( L, shooting_get_iso_mode() );
108  return 1;
109}
110
111static int luaCB_get_iso_real( lua_State* L )
112{
113  lua_pushnumber( L, shooting_get_iso_real() );
114  return 1;
115}
116
117static int luaCB_get_jpg_count( lua_State* L )
118{
119  lua_pushnumber( L, GetJpgCount() );
120  return 1;
121}
122
123static int luaCB_get_near_limit( lua_State* L )
124{
125  lua_pushnumber( L, shooting_get_near_limit_of_acceptable_sharpness() );
126  return 1;
127}
128
129static int luaCB_get_prop( lua_State* L )
130{
131  lua_pushnumber( L, shooting_get_prop( luaL_checknumber( L, 1 ) ) );
132  return 1;
133}
134
135static int luaCB_get_raw_count( lua_State* L )
136{
137  lua_pushnumber( L, GetRawCount() );
138  return 1;
139}
140
141static int luaCB_get_sv96( lua_State* L )
142{
143  lua_pushnumber( L, shooting_get_sv96() );
144  return 1;
145}
146
147static int luaCB_get_tick_count( lua_State* L )
148{
149  lua_pushnumber( L, shooting_get_tick_count() );
150  return 1;
151}
152
153static int luaCB_get_exp_count( lua_State* L )
154{
155  lua_pushnumber( L, get_exposure_counter() );
156  return 1;
157}
158
159static int luaCB_get_tv96( lua_State* L )
160{
161  lua_pushnumber( L, shooting_get_tv96() );
162  return 1;
163}
164
165static int luaCB_get_user_av_id( lua_State* L )
166{
167  lua_pushnumber( L, shooting_get_user_av_id() );
168  return 1;
169}
170
171static int luaCB_get_user_av96( lua_State* L )
172{
173  lua_pushnumber( L, shooting_get_user_av96() );
174  return 1;
175}
176
177static int luaCB_get_user_tv_id( lua_State* L )
178{
179  lua_pushnumber( L, shooting_get_user_tv_id() );
180  return 1;
181}
182
183static int luaCB_get_user_tv96( lua_State* L )
184{
185  lua_pushnumber( L, shooting_get_user_tv_id() );
186  return 1;
187}
188
189static int luaCB_get_vbatt( lua_State* L )
190{
191  lua_pushnumber( L, stat_get_vbatt() );
192  return 1;
193}
194
195static int luaCB_get_zoom( lua_State* L )
196{
197  lua_pushnumber( L, shooting_get_zoom() );
198  return 1;
199}
200
201static int luaCB_set_av96_direct( lua_State* L )
202{
203  shooting_set_av96_direct( luaL_checknumber( L, 1 ), SET_LATER );
204  return 0;
205}
206
207static int luaCB_set_av96( lua_State* L )
208{
209  shooting_set_av96( luaL_checknumber( L, 1 ), SET_LATER );
210  return 0;
211}
212
213static int luaCB_set_focus( lua_State* L )
214{
215    int to = luaL_checknumber( L, 1 );
216    int m=mode_get()&MODE_SHOOTING_MASK;
217    int mode_video=MODE_IS_VIDEO(m);
218
219#if CAM_HAS_MANUAL_FOCUS
220    if (shooting_get_focus_mode() || (mode_video)) shooting_set_focus(to, SET_NOW);
221    else shooting_set_focus(to, SET_LATER);
222#else
223    if (mode_video) shooting_set_focus(to, SET_NOW);
224    else shooting_set_focus(to, SET_LATER);   
225#endif   
226  return 0;
227}
228
229static int luaCB_set_iso_mode( lua_State* L )
230{
231  shooting_set_iso_mode( luaL_checknumber( L, 1 ) );
232  return 0;
233}
234
235static int luaCB_set_iso_real( lua_State* L )
236{
237  shooting_set_iso_real( luaL_checknumber( L, 1 ), SET_LATER);
238  return 0;
239}
240
241static int luaCB_set_led( lua_State* L )
242{
243  int to, to1, to2;
244  to = luaL_checknumber( L, 1 );
245  to1 = luaL_checknumber( L, 2 );
246  to2 = 200;
247  if( lua_isnumber( L, 3 ) )
248    to = lua_tonumber( L, 3 );
249  ubasic_set_led(to, to1, to2);
250  return 0;
251}
252
253static int luaCB_set_nd_filter( lua_State* L )
254{
255  shooting_set_nd_filter_state( luaL_checknumber( L, 1 ), SET_LATER);
256  return 0;
257}
258
259static int luaCB_set_prop( lua_State* L )
260{
261  int to, to1;
262  to = luaL_checknumber( L, 1 );
263  to1 = luaL_checknumber( L, 2 );
264  shooting_set_prop(to, to1);
265  return 0;
266}
267
268static int luaCB_set_raw_nr( lua_State* L )
269{
270  ubasic_camera_set_nr(luaL_checknumber( L, 1 ));
271  return 0;
272}
273
274static int luaCB_get_raw_nr( lua_State* L )
275{
276  lua_pushnumber( L, ubasic_camera_get_nr() );
277  return 1;
278}
279
280static int luaCB_set_raw( lua_State* L )
281{
282  ubasic_camera_set_raw(luaL_checknumber( L, 1 ));
283  return 0;
284}
285
286static int luaCB_get_raw( lua_State* L )
287{
288  lua_pushnumber( L, conf.save_raw );
289  return 1;
290}
291
292static int luaCB_set_sv96( lua_State* L )
293{
294  shooting_set_sv96(luaL_checknumber( L, 1 ), SET_LATER);
295  return 0;
296}
297
298static int luaCB_set_tv96_direct( lua_State* L )
299{
300  shooting_set_tv96_direct(luaL_checknumber( L, 1 ), SET_LATER);
301  return 0;
302}
303
304static int luaCB_set_tv96( lua_State* L )
305{
306  shooting_set_tv96(luaL_checknumber( L, 1 ), SET_LATER);
307  return 0;
308}
309
310static int luaCB_set_user_av_by_id_rel( lua_State* L )
311{
312  shooting_set_user_av_by_id_rel(luaL_checknumber( L, 1 ));
313  return 0;
314}
315
316static int luaCB_set_user_av_by_id( lua_State* L )
317{
318  shooting_set_user_av_by_id(luaL_checknumber( L, 1 ));
319  return 0;
320}
321
322static int luaCB_set_user_av96( lua_State* L )
323{
324  shooting_set_user_av96(luaL_checknumber( L, 1 ));
325  return 0;
326}
327
328static int luaCB_set_user_tv_by_id_rel( lua_State* L )
329{
330  shooting_set_user_tv_by_id_rel(luaL_checknumber( L, 1 ));
331  return 0;
332}
333
334static int luaCB_set_user_tv_by_id( lua_State* L )
335{
336  shooting_set_user_tv_by_id(luaL_checknumber( L, 1 ));
337  return 0;
338}
339
340static int luaCB_set_user_tv96( lua_State* L )
341{
342  shooting_set_user_tv96(luaL_checknumber( L, 1 ));
343  return 0;
344}
345
346static int luaCB_set_zoom_speed( lua_State* L )
347{
348  shooting_set_zoom_speed(luaL_checknumber( L, 1 ));
349  return 0;
350}
351
352static int luaCB_set_zoom_rel( lua_State* L )
353{
354  shooting_set_zoom_rel(luaL_checknumber( L, 1 ));
355  return 0;
356}
357
358static int luaCB_set_zoom( lua_State* L )
359{
360  shooting_set_zoom(luaL_checknumber( L, 1 ));
361  return 0;
362}
363
364static int luaCB_wait_click( lua_State* L )
365{
366  int timeout = luaL_optnumber( L, 1, 0 );
367  ubasic_camera_wait_click(timeout);
368  return lua_yield( L, 0 );
369}
370
371static int luaCB_is_pressed( lua_State* L )
372{
373  lua_pushboolean( L, ubasic_camera_is_pressed(luaL_checkstring( L, 1 )));
374  return 1;
375}
376
377static int luaCB_is_key( lua_State* L )
378{
379  lua_pushboolean( L, ubasic_camera_is_clicked(luaL_checkstring( L, 1 )));
380  return 1;
381}
382
383#if defined (CAMERA_g7) || defined (CAMERA_sx100is)
384static int luaCB_wheel_right( lua_State* L )
385{
386  JogDial_CW();
387  return 0;
388}
389
390static int luaCB_wheel_left( lua_State* L )
391{
392  JogDial_CCW();
393  return 0;
394}
395#endif
396
397static int luaCB_md_get_cell_diff( lua_State* L )
398{
399  lua_pushnumber( L, md_get_cell_diff(luaL_checknumber(L,1),
400                                      luaL_checknumber(L,2)));
401  return 1;
402}
403
404static int luaCB_md_detect_motion( lua_State* L )
405{
406  int columns = (luaL_optnumber(L,1,6));
407  int rows = (luaL_optnumber(L,2,4));
408  int pixel_measure_mode = (luaL_optnumber(L,3,1));
409  int detection_timeout = (luaL_optnumber(L,4,10000));
410  int measure_interval = (luaL_optnumber(L,5,7));
411  int threshold = (luaL_optnumber(L,6,10));
412  int draw_grid = (luaL_optnumber(L,7,1));
413   // arg 8 is the return value in ubasic. We
414   // ignore it here. - AUJ
415  int clipping_region_mode = (luaL_optnumber(L,9,0));
416  int clipping_region_column1 = (luaL_optnumber(L,10,0));
417  int clipping_region_row1 = (luaL_optnumber(L,11,0));
418  int clipping_region_column2 = (luaL_optnumber(L,12,0));
419  int clipping_region_row2 = (luaL_optnumber(L,13,0));
420  int parameters = (luaL_optnumber(L,14,1));
421  int pixels_step = (luaL_optnumber(L,15,6));
422  int msecs_before_trigger = (luaL_optnumber(L,16,0));
423  ubasic_set_variable(0, 0);
424  md_init_motion_detector(
425    columns, rows, pixel_measure_mode, detection_timeout,
426    measure_interval, threshold, draw_grid, 0,
427    clipping_region_mode,
428    clipping_region_column1, clipping_region_row1,
429    clipping_region_column2, clipping_region_row2,
430    parameters, pixels_step, msecs_before_trigger
431  );
432
433  return lua_yield(L, 0);
434}
435
436static int luaCB_autostarted( lua_State* L )
437{
438  lua_pushboolean( L, ubasic_camera_script_autostart() );
439  return 1;
440}
441
442static int luaCB_get_autostart( lua_State* L )
443{
444  lua_pushnumber( L, conf.script_startup );
445  return 1;
446}
447
448static int luaCB_set_autostart( lua_State* L )
449{
450  int to;
451  to = luaL_checknumber( L, 1 );
452  if ( to >= 0 && to <= 2 ) conf.script_startup = to;
453  conf_save();
454  return 0;
455}
456
457static int luaCB_get_usb_power( lua_State* L )
458{
459  if (luaL_optnumber( L, 1, 0 )) lua_pushnumber( L, get_usb_power(1) );
460  else lua_pushnumber( L, get_usb_power(0) );
461  return 1;
462}
463
464static int luaCB_exit_alt( lua_State* L )
465{
466  exit_alt();
467  return 0;
468}
469
470static int luaCB_shut_down( lua_State* L )
471{
472  camera_shutdown_in_a_second();
473  return 0;
474}
475
476static int luaCB_print_screen( lua_State* L )
477{
478 
479  if lua_isboolean( L, 1 ) script_print_screen_statement( lua_toboolean( L, 1 ) );
480  else script_print_screen_statement( luaL_checknumber( L, 1 )+10000 );
481  return 0;
482}
483
484static int luaCB_get_movie_status( lua_State* L )
485{
486  lua_pushnumber( L, movie_status );
487  return 1;
488}
489
490static int luaCB_set_movie_status( lua_State* L )
491{
492  int to;
493  to = luaL_checknumber( L, 1 );
494if (to==1) {
495        if (movie_status == 4) {
496        movie_status = 1;
497}}
498if (to==2) {
499        if (movie_status == 1) {
500        movie_status = 4;
501}
502}
503if (to==3) {
504        if (movie_status == 1 || 4) {
505        movie_status = 5;
506}}
507  return 0;
508}
509
510static int luaCB_get_drive_mode( lua_State* L )
511{
512  lua_pushnumber( L, shooting_get_prop(PROPCASE_DRIVE_MODE) );
513  return 1;
514}
515
516static int luaCB_get_focus_mode( lua_State* L )
517{
518  lua_pushnumber( L, shooting_get_prop(PROPCASE_FOCUS_MODE) );
519  return 1;
520}
521
522static int luaCB_get_flash_mode( lua_State* L )
523{
524  lua_pushnumber( L, shooting_get_prop(PROPCASE_FLASH_MODE) );
525  return 1;
526}
527
528static int luaCB_get_shooting( lua_State* L )
529{
530  lua_pushboolean( L, shooting_get_prop(PROPCASE_SHOOTING) );
531  return 1;
532}
533
534static int luaCB_get_flash_ready( lua_State* L )
535{
536  lua_pushboolean( L, shooting_get_prop(PROPCASE_IS_FLASH_READY) );
537  return 1;
538}
539
540static int luaCB_get_IS_mode( lua_State* L )
541{
542  lua_pushnumber( L, shooting_get_prop(PROPCASE_IS_MODE) );
543  return 1;
544}
545
546static int luaCB_get_orientation_sensor( lua_State* L )
547{
548  lua_pushnumber( L, shooting_get_prop(PROPCASE_ORIENTATION_SENSOR) );
549  return 1;
550}
551
552static int luaCB_get_zoom_steps( lua_State* L )
553{
554  lua_pushnumber( L, zoom_points );
555  return 1;
556}
557
558static int luaCB_get_nd_present( lua_State* L )
559{
560  int to;
561  #if !CAM_HAS_ND_FILTER
562  to = 0;
563  #endif
564  #if CAM_HAS_ND_FILTER && !CAM_HAS_IRIS_DIAPHRAGM
565  to = 1;
566  #endif
567  #if CAM_HAS_ND_FILTER && CAM_HAS_IRIS_DIAPHRAGM
568  to = 2;
569  #endif
570  lua_pushnumber( L, to );
571  return 1;
572}
573
574static int luaCB_get_propset( lua_State* L )
575{
576  lua_pushnumber( L, CAM_PROPSET );
577  return 1;
578}
579
580static int luaCB_get_ev( lua_State* L )
581{
582  lua_pushnumber( L, shooting_get_prop(PROPCASE_EV_CORRECTION_1) );
583  return 1;
584}
585
586static int luaCB_set_ev( lua_State* L )
587{
588  int to;
589  to = luaL_checknumber( L, 1 );
590  shooting_set_prop(PROPCASE_EV_CORRECTION_1, to);
591  shooting_set_prop(PROPCASE_EV_CORRECTION_2, to);
592  return 0;
593}
594
595static int luaCB_get_histo_range( lua_State* L )
596{
597  int from = (luaL_checknumber(L,1));
598  int to = (luaL_checknumber(L,2));
599  if (shot_histogram_enabled) lua_pushnumber( L, (unsigned short)shot_histogram_get_range(from, to) );
600  else lua_pushnumber( L, -1 );
601  return 1;
602}
603
604static int luaCB_shot_histo_enable( lua_State* L )
605{
606  shot_histogram_enabled = luaL_checknumber( L, 1 );
607  return 0;
608}
609
610static int luaCB_play_sound( lua_State* L )
611{
612  play_sound(luaL_checknumber( L, 1 ));
613  return 0;
614}
615
616static int luaCB_get_temperature( lua_State* L )
617{
618  int which = (luaL_checknumber( L, 1 ));
619  int temp = -100; // do something insane if users passes bad value
620  switch (which)
621  {
622    case 0:
623      temp = get_optical_temp();
624      break;
625    case 1:
626      temp = get_ccd_temp();
627      break;
628    case 2:
629      temp = get_battery_temp();
630      break;
631  }
632  lua_pushnumber( L, temp );
633  return 1;
634}
635
636static int luaCB_get_time( lua_State* L )
637{
638  int r = -1;
639  unsigned long t2 = time(NULL);
640  static struct tm *ttm;
641  ttm = localtime(&t2);
642  const char *t = luaL_checkstring( L, 1 );
643  if (strncmp("s", t, 1)==0) r = ( L, ttm->tm_sec );
644  else if (strncmp("m", t, 1)==0) r = ( L, ttm->tm_min );
645  else if (strncmp("h", t, 1)==0) r = ( L, ttm->tm_hour );
646  else if (strncmp("D", t, 1)==0) r = ( L, ttm->tm_mday );
647  else if (strncmp("M", t, 1)==0) r = ( L, ttm->tm_mon+1 );
648  else if (strncmp("Y", t, 1)==0) r = ( L, 1900+ttm->tm_year );
649  lua_pushnumber( L, r );
650  return 1;
651}
652
653static int luaCB_peek( lua_State* L )
654{
655  int addr = (luaL_checknumber(L,1));
656  // must be alligned
657  if (addr & 0x3) {
658        lua_pushnil(L);
659  }
660  else {
661    lua_pushnumber( L, *(unsigned *)(addr) );
662  }
663  return 1;
664}
665
666static int luaCB_poke( lua_State* L )
667{
668  int addr = (luaL_checknumber(L,1));
669  int val = (luaL_checknumber(L,2));
670  if (addr & 0x3) {
671        lua_pushnil(L);
672  }
673  else {
674    *(unsigned *)(addr) = val;
675    lua_pushboolean(L,1);
676  }
677  return 1;
678}
679
680static int luaCB_bitand( lua_State* L )
681{
682  int v1 = (luaL_checknumber(L,1));
683  int v2 = (luaL_checknumber(L,2));
684  lua_pushnumber( L, v1 & v2 );
685  return 1;
686}
687
688static int luaCB_bitor( lua_State* L )
689{
690  int v1 = (luaL_checknumber(L,1));
691  int v2 = (luaL_checknumber(L,2));
692  lua_pushnumber( L, v1 | v2 );
693  return 1;
694}
695
696static int luaCB_bitxor( lua_State* L )
697{
698  int v1 = (luaL_checknumber(L,1));
699  int v2 = (luaL_checknumber(L,2));
700  lua_pushnumber( L, v1 ^ v2 );
701  return 1;
702}
703
704static int luaCB_bitshl( lua_State* L )
705{
706  int val = (luaL_checknumber(L,1));
707  unsigned shift = (luaL_checknumber(L,2));
708  lua_pushnumber( L, val << shift );
709  return 1;
710}
711
712static int luaCB_bitshri( lua_State* L )
713{
714  int val = (luaL_checknumber(L,1));
715  unsigned shift = (luaL_checknumber(L,2));
716  lua_pushnumber( L, val >> shift );
717  return 1;
718}
719
720static int luaCB_bitshru( lua_State* L )
721{
722  unsigned val = (luaL_checknumber(L,1));
723  unsigned shift = (luaL_checknumber(L,2));
724  lua_pushnumber( L, val >> shift );
725  return 1;
726}
727
728static int luaCB_bitnot( lua_State* L )
729{
730  unsigned val = (luaL_checknumber(L,1));
731  lua_pushnumber( L, ~val );
732  return 1;
733}
734
735static void set_string_field(lua_State* L, const char *key, const char *val)
736{
737  lua_pushstring(L, val);
738  lua_setfield(L, -2, key);
739}
740
741static int luaCB_get_buildinfo( lua_State* L )
742{
743  lua_createtable(L, 0, 6);  /* 6 = number of fields */
744  set_string_field( L,"platform", PLATFORM );
745  set_string_field( L,"platsub", PLATFORMSUB );
746  set_string_field( L,"version", HDK_VERSION );
747  set_string_field( L,"build_number", BUILD_NUMBER );
748  set_string_field( L,"build_date", __DATE__ );
749  set_string_field( L,"build_time", __TIME__ );
750  return 1;
751}
752
753static int luaCB_get_mode( lua_State* L )
754{
755  int m = mode_get();
756  lua_pushboolean( L, (m&MODE_MASK) != MODE_PLAY );
757  lua_pushboolean( L, MODE_IS_VIDEO(m) );
758  lua_pushnumber( L, m );
759  return 3;
760}
761
762void register_lua_funcs( lua_State* L )
763{
764#define FUNC( X )                       \
765  lua_pushcfunction( L, luaCB_##X );    \
766  lua_setglobal( L, #X )
767
768  FUNC(shoot);
769  FUNC(sleep);
770  FUNC(cls);
771
772  lua_pushlightuserdata( L, kbd_sched_click );
773  lua_pushcclosure( L, luaCB_keyfunc, 1 );
774  lua_setglobal( L, "click" );
775
776  lua_pushlightuserdata( L, kbd_sched_press );
777  lua_pushcclosure( L, luaCB_keyfunc, 1 );
778  lua_setglobal( L, "press" );
779
780  lua_pushlightuserdata( L, kbd_sched_release );
781  lua_pushcclosure( L, luaCB_keyfunc, 1 );
782  lua_setglobal( L, "release" );
783
784  FUNC(get_av96);
785  FUNC(get_av96);
786  FUNC(get_bv96);
787  FUNC(get_day_seconds);
788  FUNC(get_disk_size);
789  FUNC(get_dof);
790  FUNC(get_far_limit);
791  FUNC(get_free_disk_space);
792  FUNC(get_focus);
793  FUNC(get_hyp_dist);
794  FUNC(get_iso_market);
795  FUNC(get_iso_mode);
796  FUNC(get_iso_real);
797  FUNC(get_jpg_count);
798  FUNC(get_near_limit);
799  FUNC(get_prop);
800  FUNC(get_raw_count);
801  FUNC(get_raw_nr);
802  FUNC(get_raw);
803  FUNC(get_sv96);
804  FUNC(get_tick_count);
805  FUNC(get_tv96);
806  FUNC(get_user_av_id);
807  FUNC(get_user_av96);
808  FUNC(get_user_tv_id);
809  FUNC(get_user_tv96);
810  FUNC(get_vbatt);
811  FUNC(get_zoom);
812  FUNC(get_exp_count);
813
814  FUNC(set_av96_direct);
815  FUNC(set_av96);
816  FUNC(set_focus);
817  FUNC(set_iso_mode);
818  FUNC(set_iso_real);
819  FUNC(set_led);
820  FUNC(set_nd_filter);
821  FUNC(set_prop);
822  FUNC(set_raw_nr);
823  FUNC(set_raw);
824  FUNC(set_sv96);
825  FUNC(set_tv96_direct);
826  FUNC(set_tv96);
827  FUNC(set_user_av_by_id_rel);
828  FUNC(set_user_av_by_id);
829  FUNC(set_user_av96);
830  FUNC(set_user_tv_by_id_rel);
831  FUNC(set_user_tv_by_id);
832  FUNC(set_user_tv96);
833  FUNC(set_zoom_speed);
834  FUNC(set_zoom_rel);
835  FUNC(set_zoom);
836
837  FUNC(wait_click);
838  FUNC(is_pressed);
839  FUNC(is_key);
840#if defined (CAMERA_g7) || defined (CAMERA_sx100is)
841  FUNC(wheel_right);
842  FUNC(wheel_left);
843#endif
844  FUNC(md_get_cell_diff);
845  FUNC(md_detect_motion);
846  FUNC(autostarted);
847  FUNC(get_autostart);
848  FUNC(set_autostart);
849  FUNC(get_usb_power);
850  FUNC(exit_alt);
851  FUNC(shut_down);
852  FUNC(print_screen);
853
854  FUNC(get_focus_mode);
855  FUNC(get_propset);
856  FUNC(get_zoom_steps);
857  FUNC(get_drive_mode);
858  FUNC(get_flash_mode);
859  FUNC(get_shooting);
860  FUNC(get_flash_ready);
861  FUNC(get_IS_mode);
862  FUNC(set_ev);
863  FUNC(get_ev);
864  FUNC(get_orientation_sensor);
865  FUNC(get_nd_present);
866  FUNC(get_movie_status);
867  FUNC(set_movie_status);
868 
869  FUNC(get_histo_range);
870  FUNC(shot_histo_enable);
871  FUNC(play_sound);
872  FUNC(get_temperature);
873  FUNC(peek);
874  FUNC(poke);
875  FUNC(bitand);
876  FUNC(bitor);
877  FUNC(bitxor);
878  FUNC(bitshl);
879  FUNC(bitshri);
880  FUNC(bitshru);
881  FUNC(bitnot);
882
883  FUNC(get_time);
884
885  FUNC(get_buildinfo);
886  FUNC(get_mode);
887}
Note: See TracBrowser for help on using the repository browser.