From: Bruce W. <br...@mi...> - 2001-03-28 14:03:00
|
> first I must express gratitude for all work being done in getting simple > menus out of mh (LCD,WAP,....). > > I've tested LCDs and they are working quite good. I use 2x16 LCD and 4 > keys and so far it seems working. Great! If you think your LCD code might be useful to others with custom LCD setups, feel free to send it to me and I'll include mh/code. > Now I'd like to use this in form of LCD server, where more more LCD > terminals could access menus. I think maybe creating grand object with > menus and methods and then inherited many smaller objects that would > contain only specific data (menu level, menu_group, key map ) that could > be created for each terminal. One option would be to break your menu files into groups. Then you can read sets of files in for each LCD as appropriate. For example, you could have something like this: $menu_standard = read_file 'standard.menu'; $menu_bedroom = read_file 'bedroom.menu'; $menu_living = read_file 'living.menu'; $menu_all = read_file 'all.menu'; if ($Reread) { menu_parse $menu_bedroom $menu_bedroom . $menu_standard, 'bedroom'; menu_parse $menu_living $menu_living . $menu_standard, 'living'; menu_parse $menu_all $menu_all . $menu_living . $menu_bedroom . $menu_standard, 'all'; $lcd_data{bed1} {menu_group} = 'bedroom'; $lcd_data{living1}{menu_group} = 'living'; $lcd_data{living2}{menu_group} = 'all'; } This would require us to add another dimention to the %lcd_data array, the first entry being the keypad name. Or probably better, as you suggested, we create an LCD object and store the has data there. I currently only have one LCD keypad. I'd be happy to offer you any guidance you would want (probably off list) if you want to take a shot at creating an LCD object. Or if you would rather, I could create one here and send it for you to test. Either way is fine with me. Bruce |