Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
/*
*
* LCD Options
//these options need to be modified epending on the resulting positioning/size
options.segmentWidth = options.segmentWidth || 0.06; // how wide are the segments in % so 50% = 0.5
options.segmentInterval = options.segmentInterval || 0.11; // spacing between the segments in % so 50% = 0.5
options.strokeWidth = options.strokeWidth || 0.11; // spacing between the segments in % so 50% = 0.5
//default display settings
options.elements = options.elements || 3; // how many elements in the display. or how many characters can be displayed.
options.display = options.display || 321; // what should be displayed before anything is set
options.elementSpacing = options.spacing || 4; // spacing between each element
options.elementPadding = options.padding || 2; // how far away from the edges to put the elements
//coloring
options.color = options.color || "white";
*/
const lcdLineOne = grid.set(0, 9, 2, 3, contrib.lcd,
{
label: 'LCD Test',
segmentWidth: 0.06,
segmentInterval: 0.11,
strokeWidth: 0.1,
elements: 5,
display: 3210,
elementSpacing: 4,
elementPadding: 2,
},
)
const errorsLine = grid.set(0, 6, 4, 3, contrib.line, {
style: {
line: 'red',
text: 'white',
/*
*
* LCD Options
//these options need to be modified epending on the resulting positioning/size
options.segmentWidth = options.segmentWidth || 0.06; // how wide are the segments in % so 50% = 0.5
options.segmentInterval = options.segmentInterval || 0.11; // spacing between the segments in % so 50% = 0.5
options.strokeWidth = options.strokeWidth || 0.11; // spacing between the segments in % so 50% = 0.5
//default display settings
options.elements = options.elements || 3; // how many elements in the display. or how many characters can be displayed.
options.display = options.display || 321; // what should be displayed before anything is set
options.elementSpacing = options.spacing || 4; // spacing between each element
options.elementPadding = options.padding || 2; // how far away from the edges to put the elements
//coloring
options.color = options.color || "white";
*/
const lcdLineOne = grid.set(0, 9, 2, 3, contrib.lcd,
{
label: 'LCD Test',
segmentWidth: 0.06,
segmentInterval: 0.11,
strokeWidth: 0.1,
elements: 5,
display: 3210,
elementSpacing: 4,
elementPadding: 2,
},
)
const errorsLine = grid.set(0, 6, 4, 3, contrib.line, {
style: {
line: 'red',
text: 'white',
//
// curState - Current state of heat transfer device
//
// Type: Enum (heating|cooling|stopped)
// Units: N/A
// Read Only
//
var deviceMonitorState = {
intTemp: 72,
extTemp: 45,
curState: 'stopped'
};
var networkEnabled = true;
var lcd1 = grid.set(1, 1, 2, 3, contrib.lcd, {
label: 'Setpoint',
segmentWidth: 0.06,
segmentInterval: 0.11,
strokeWidth: 0.1,
elements: 3,
elementSpacing: 4,
elementPadding: 2,
color: 'green'
});
var lcd2 = grid.set(3, 1, 2, 3, contrib.lcd, {
label: 'Interior',
segmentWidth: 0.06,
segmentInterval: 0.11,
strokeWidth: 0.1,
var networkEnabled = true;
var lcd1 = grid.set(1, 1, 2, 3, contrib.lcd, {
label: 'Setpoint',
segmentWidth: 0.06,
segmentInterval: 0.11,
strokeWidth: 0.1,
elements: 3,
elementSpacing: 4,
elementPadding: 2,
color: 'green'
});
var lcd2 = grid.set(3, 1, 2, 3, contrib.lcd, {
label: 'Interior',
segmentWidth: 0.06,
segmentInterval: 0.11,
strokeWidth: 0.1,
elements: 3,
elementSpacing: 4,
elementPadding: 2,
color: 'white'
});
var lcd3 = grid.set(5, 1, 2, 3, contrib.lcd, {
label: 'Exterior',
segmentWidth: 0.06,
segmentInterval: 0.11,
strokeWidth: 0.1,
elements: 3,
getWidgetOpts(opts) {
return new Component_1.WidgetOpts(contrib.lcd, {
label: this.ignoreTickerChange ? `Live (${this.tickerId})` : "Live",
strokeWidth: 2,
elements: 7,
display: "0000.00",
});
}
setWidget(widget) {
getWidgetOpts(opts) {
return new Component_1.WidgetOpts(contrib.lcd, {
label: "",
strokeWidth: 2,
elements: 7,
display: "------",
});
}
setWidget(widget) {
public getWidgetOpts(opts?: any): WidgetOpts {
return new WidgetOpts(contrib.lcd,
{
label: this.ignoreTickerChange ? `Live (${this.tickerId})` : "Live",
strokeWidth: 2,
elements: 7,
display: "0000.00",
});
}
public getWidgetOpts(opts?: any): WidgetOpts {
return new WidgetOpts(contrib.lcd,
{
label: "",
strokeWidth: 2,
elements: 7,
display: "------",
});
}