Jump to: navigation, search

FG Int Objects Modules

1,530 bytes added, 20:58, 19 June 2017
FG Interface Module
* [[FG interface]]
== Modules in FG interface are Object Class , as like a map, to build a new object. You have learned about HT16K33 and MCP23017 classes, they are Modules, special Modules named in FG Interface Module world '''Devices'''. I make this difference to split and make the difference between switch , displays .. etc and the hardware driver chip.<br />All Modules Classes are loaded into the interface, ready to be used and can be requested with the getModule() Interface Method. To be loaded, the module need to be declared.For memory, the main config file : <syntaxhighlight lang="ini">[INT]intname=RADIOPANELdeviceconf=/opt/fgint/Config/devices.cfg [MODULES]module01=FGIntHT16K33,HT16K33module02=FGIntMCP23017,MCP23017module03=FGIntSegDisplay,SegDisplaymodule04=FGIntSwitch,Switch [AUXCONF]displays=/opt/fgint/Config/displays.cfgswitches=/opt/fgint/Config/switches.cfg</syntaxhighlight> In the '''MODULES''' section, you can see all modules that will be loaded.Here We are loading HT16K33 from module file Same thing for the MCP23017 Module in the and with the SegDisplay Class Some Module file can handle more than one Class, as like where you can find different Class for different switch own the folling classes : * '''Switch''' : Single switch 2 states* '''DoubleSwitch''' : Single switch 3 states* '''RotarySwitch''' : Use to manage a rotary switch (variable nb position){{WIP}}* '''ToogleSwitch''' : Single Push button that will switch between 2 states at each push

Navigation menu