set_config_value(20,0,120) sleep(100) if get_config_value(1060) == 0 then set_config_value(1060,1) else set_config_value(1060,0) end
Code: [Select] set_config_value(20,0,120)
set_config_value(20,0,120)
Quote from: pigeonhill on 18 / March / 2023, 12:47:09Code: [Select] set_config_value(20,0,120)There is no config item with index 20 anymore. Config ID's less than 1000 were from CHDK 1.2 and the mapping to convert to the new ID numbers was removed a while ago.You should load the cnf_xxx.lua files (LUALIB/GEN) and then use named config IDs.Anyway the histo position is id 2020.
--[[@title HisToggle@param x X*10 @default x 10 @range x 0 30@param y Y*10 @default y 0 @range y 0 20@param l Layout @default l 0 @values l _A _Y A_Y R_G_B A_yrgb Y_argb BLEND BLEND_Y@param g Ev-grid @default g 0 @range g 0 1@param a Auto-adjust @default a 0 @range a 0 1@subtitle :...,....1....,....2....,....3....,....4.. // The default X & Y position values below are based on 360x240 size screen display. // The CONF_INFOP macro scales these, at build time, based on the actual camera screen size (CAM_SCREEN_WIDTH & CAM_SCREEN_HEIGHT). CONF_INFOP( 20, conf.histo_pos, CONF_OSD_POS, 45,150), CONF_INFOC( 50, conf.histo_color, CONF_DEF_VALUE, IDX_COLOR_GREY_DK,IDX_COLOR_WHITE,1,1), CONF_INFOC( 51, conf.histo_color2, CONF_DEF_VALUE, IDX_COLOR_RED,IDX_COLOR_WHITE,1,1), CONF_INFO( 60, conf.show_histo, CONF_DEF_VALUE, i:0), CONF_INFO( 61, conf.show_overexp, CONF_DEF_VALUE, i:1), CONF_INFO( 62, conf.histo_mode, CONF_DEF_VALUE, i:0), CONF_INFO( 63, conf.histo_auto_ajust, CONF_DEF_VALUE, i:1), CONF_INFO( 64, conf.histo_ignore_boundary, CONF_DEF_VALUE, i:4), CONF_INFO( 65, conf.histo_layout, CONF_DEF_VALUE, i:0), CONF_INFO( 66, conf.histo_show_ev_grid, CONF_DEF_VALUE, i:0),// Display modes - must match gui_histo_view_modes in gui.cdefine OSD_HISTO_LAYOUT_A 0 // A - RGBdefine OSD_HISTO_LAYOUT_Y 1define OSD_HISTO_LAYOUT_A_Y 2define OSD_HISTO_LAYOUT_R_G_B 3define OSD_HISTO_LAYOUT_A_yrgb 4define OSD_HISTO_LAYOUT_Y_argb 5define OSD_HISTO_LAYOUT_BLEND 6define OSD_HISTO_LAYOUT_BLEND_Y 7]]-- set_config_value(1060,1-get_config_value(1060,0)) set_config_value(1063,a) set_config_value(1065,l) set_config_value(1066,g) set_config_value(2020,x*10,y*10) sleep(100)
Code: [Select]--[[@title HisToggle@param x X*10 @default x 10 @range x 0 30@param y Y*10 @default y 0 @range y 0 20@param l Layout @default l 0 @values l _A _Y A_Y R_G_B A_yrgb Y_argb BLEND BLEND_Y@param g Ev-grid @default g 0 @range g 0 1@param a Auto-adjust @default a 0 @range a 0 1@subtitle :...,....1....,....2....,....3....,....4.. // The default X & Y position values below are based on 360x240 size screen display. // The CONF_INFOP macro scales these, at build time, based on the actual camera screen size (CAM_SCREEN_WIDTH & CAM_SCREEN_HEIGHT). CONF_INFOP( 20, conf.histo_pos, CONF_OSD_POS, 45,150), CONF_INFOC( 50, conf.histo_color, CONF_DEF_VALUE, IDX_COLOR_GREY_DK,IDX_COLOR_WHITE,1,1), CONF_INFOC( 51, conf.histo_color2, CONF_DEF_VALUE, IDX_COLOR_RED,IDX_COLOR_WHITE,1,1), CONF_INFO( 60, conf.show_histo, CONF_DEF_VALUE, i:0), CONF_INFO( 61, conf.show_overexp, CONF_DEF_VALUE, i:1), CONF_INFO( 62, conf.histo_mode, CONF_DEF_VALUE, i:0), CONF_INFO( 63, conf.histo_auto_ajust, CONF_DEF_VALUE, i:1), CONF_INFO( 64, conf.histo_ignore_boundary, CONF_DEF_VALUE, i:4), CONF_INFO( 65, conf.histo_layout, CONF_DEF_VALUE, i:0), CONF_INFO( 66, conf.histo_show_ev_grid, CONF_DEF_VALUE, i:0),// Display modes - must match gui_histo_view_modes in gui.cdefine OSD_HISTO_LAYOUT_A 0 // A - RGBdefine OSD_HISTO_LAYOUT_Y 1define OSD_HISTO_LAYOUT_A_Y 2define OSD_HISTO_LAYOUT_R_G_B 3define OSD_HISTO_LAYOUT_A_yrgb 4define OSD_HISTO_LAYOUT_Y_argb 5define OSD_HISTO_LAYOUT_BLEND 6define OSD_HISTO_LAYOUT_BLEND_Y 7]]-- set_config_value(1060,1-get_config_value(1060,0)) set_config_value(1063,a) set_config_value(1065,l) set_config_value(1066,g) set_config_value(2020,x*10,y*10) sleep(100)
Started by Woodsman Feature Requests
Started by danraymond CHDK Releases
Started by andyroo « 1 2 ... 8 9 » General Discussion and Assistance
Started by fabri22 Script Writing
Started by Microfunguy Script Writing