FG Int Objects Modules: Difference between revisions

m
no edit summary
m (Radio Panel main configuration update)
mNo edit summary
Line 28: Line 28:


In the '''MODULES''' section, you can see all modules that will be loaded.
In the '''MODULES''' section, you can see all modules that will be loaded.
Here We are loading '''HT16K33''' from module file '''FGIntHT16K33.py'''. Same thing for the '''MCP23017''' Module in the '''FGIntMCP23017.py''' and '''FGIntSegDisplay.py''' with the '''SegDisplay''' Class
Here We are loading '''HT16K33''' from module file '''FGIntHT16K33.py'''. Same thing for the '''MCP23017''' Module in the '''FGIntMCP23017.py''', '''FGIntSegDisplay.py''' with the '''SegDisplay''' Class


Some Module file can handle more than one Class, as like '''FGIntSwitch.py''' where you can find different Class for different switch types.
Some Module file can handle more than one Class, as like '''FGIntSwitch.py''' where you can find different Class for different switch types.
Line 36: Line 36:
* '''RotarySwitch''' : Use to manage a rotary switch (variable nb position)
* '''RotarySwitch''' : Use to manage a rotary switch (variable nb position)
* '''ToogleSwitch''' : Single Push button that will switch between 2 states at each push
* '''ToogleSwitch''' : Single Push button that will switch between 2 states at each push
As the radio panel had lots of push button, we need to load the '''ToogleSwitch''' Class.<br />
We add it to the configuration file.
<syntaxhighlight lang="ini">
[INT]
intname=RADIOPANEL
deviceconf=/opt/fgint/Config/devices.cfg
[MODULES]
module01=FGIntHT16K33,HT16K33
module02=FGIntMCP23017,MCP23017
module03=FGIntSegDisplay,SegDisplay
module04=FGIntSwitch,Switch
module04=FGIntSwitch,ToogleSwitch
[AUXCONF]
displays=/opt/fgint/Config/displays.cfg
switches=/opt/fgint/Config/switches.cfg
</syntaxhighlight>
534

edits