Changeset 467
- Timestamp:
- 08/05/08 09:39:29 (5 years ago)
- Location:
- branches/juciphox
- Files:
-
- 2 edited
-
core/luascript.c (modified) (4 diffs)
-
version.inc (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/juciphox/core/luascript.c
r427 r467 479 479 } 480 480 481 482 483 static int luaCB_get_moviestate( lua_State* L ) 481 static int luaCB_get_movie_status( lua_State* L ) 484 482 { 485 483 lua_pushnumber( L, movie_status ); 486 484 return 1; 485 } 486 487 static int luaCB_set_movie_status( lua_State* L ) 488 { 489 int to; 490 to = luaL_checknumber( L, 1 ); 491 if (to==1) { 492 if (movie_status == 4) { 493 movie_status = 1; 494 }} 495 if (to==2) { 496 if (movie_status == 1) { 497 movie_status = 4; 498 } 499 } 500 if (to==3) { 501 if (movie_status == 1 || 4) { 502 movie_status = 5; 503 }} 504 return 0; 487 505 } 488 506 … … 593 611 } 594 612 613 static int luaCB_play_sound( lua_State* L ) 614 { 615 play_sound(luaL_checknumber( L, 1 )); 616 return 0; 617 } 618 619 static int luaCB_get_temperature( lua_State* L ) 620 { 621 int which = (luaL_checknumber( L, 1 )); 622 int temp; 623 switch (which) 624 { 625 case 0: 626 temp = get_optical_temp(); 627 break; 628 case 1: 629 temp = get_ccd_temp(); 630 break; 631 case 2: 632 temp = get_battery_temp(); 633 break; 634 } 635 lua_pushnumber( L, temp ); 636 return 1; 637 } 595 638 596 639 void register_lua_funcs( lua_State* L ) … … 672 715 FUNC(is_pressed); 673 716 FUNC(is_key); 674 #if defined (CAMERA_g7) 717 #if defined (CAMERA_g7) || defined (CAMERA_sx100is) 675 718 FUNC(wheel_right); 676 719 FUNC(wheel_left); … … 698 741 FUNC(get_orientation_sensor); 699 742 FUNC(get_nd_present); 700 FUNC(get_moviestate); 743 FUNC(get_movie_status); 744 FUNC(set_movie_status); 701 745 702 746 FUNC(get_histo_range); 703 747 FUNC(shot_histo_enable); 704 } 748 FUNC(play_sound); 749 FUNC(get_temperature); 750 } -
branches/juciphox/version.inc
r464 r467 1 BUILD_NUMBER := 0.2. 11 BUILD_NUMBER := 0.2.2
Note: See TracChangeset
for help on using the changeset viewer.