Skip to content

Commit

Permalink
changes in icon creation
Browse files Browse the repository at this point in the history
  • Loading branch information
BenAhrdt committed Mar 23, 2024
1 parent 67e7bfa commit c91cf2e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/modules/directorieshandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ class directorieshandlerClass {
* ******************************************************************/

getIconPath(topic,message,icontype){
const activeFunction = "getIcon";
const activeFunction = "getIconPath";
try{
// Select search in case of origin
switch(this.adapter.config.origin){
Expand Down Expand Up @@ -501,13 +501,13 @@ class directorieshandlerClass {
* ******************************************************************/

getTtnIconPath(topic,message,icontype){
const activeFunction = "getTtnIcon";
const activeFunction = "getTtnIconPath";
try{
this.adapter.log.silly(`icontype ${icontype} is requested for ttn`);
switch(icontype){
case this.icons.wifi:
if(message.uplink_message.settings.data_rate.lora.spreading_factor &&
message.uplink_message.rx_metadata[0].rssi){
if(message.uplink_message?.settings.data_rate.lora.spreading_factor &&
message.uplink_message?.rx_metadata[0].rssi){
return this.analyseConnection(message.uplink_message.settings.data_rate.lora.spreading_factor,message.uplink_message.rx_metadata[0].rssi);
}
return "";
Expand Down Expand Up @@ -594,13 +594,13 @@ class directorieshandlerClass {
* ******************************************************************/

getChirpstackIconPath(topic,message,icontype){
const activeFunction = "getTtnIcon";
const activeFunction = "getChirpstackIconPath";
try{
this.adapter.log.silly(`icontype ${icontype} is requested for ttn`);
switch(icontype){
case this.icons.wifi:
if(message.txInfo.modulation.lora.spreadingFactor &&
message.rxInfo[0].rssi){
if(message.txInfo?.modulation.lora.spreadingFactor &&
message.rxInfo[0]?.rssi){
return this.analyseConnection(message.txInfo.modulation.lora.spreadingFactor,message.rxInfo[0].rssi);
}
else{
Expand Down

0 comments on commit c91cf2e

Please sign in to comment.