Advertisement
Guest User

Untitled

a guest
Jan 17th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Go 0.99 KB | None | 0 0
  1. func loFreq(kaFreq int64, gateway bool) (loFreq int64) {
  2.     if !gateway {
  3.         if kaFreq >= 17800 && kaFreq < 18350 {
  4.             loFreq = 16800
  5.         }
  6.         if kaFreq >= 18350 && kaFreq < 25000 {
  7.             loFreq = 17400
  8.         }
  9.         if kaFreq >= 25000 && kaFreq < 28150 {
  10.             loFreq = 26600
  11.         }
  12.         if kaFreq >= 28150 && kaFreq < 32000 {
  13.             loFreq = 27200
  14.         }
  15.     } else {
  16.         if kaFreq >= 17800 && kaFreq < 25000 {
  17.             loFreq = 16850
  18.         }
  19.         if kaFreq >= 25000 && kaFreq < 32000 {
  20.             loFreq = 26650
  21.         }
  22.     }
  23.  
  24.     return
  25. }
  26.  
  27. func loLabel(kaFreq int64, gateway bool) (label string) {
  28.     if !gateway {
  29.         if kaFreq >= 17800 && kaFreq < 18350 {
  30.             label = "Low"
  31.         }
  32.         if kaFreq >= 18350 && kaFreq < 25000 {
  33.             label = "High"
  34.         }
  35.         if kaFreq >= 25000 && kaFreq < 28150 {
  36.             label = "Low"
  37.         }
  38.         if kaFreq >= 28150 && kaFreq < 32000 {
  39.             label = "High"
  40.         }
  41.     } else {
  42.         if kaFreq >= 17800 && kaFreq < 25000 {
  43.             label = "Gateway-Down"
  44.         }
  45.         if kaFreq >= 25000 && kaFreq < 32000 {
  46.             label = "Gateway-Up"
  47.         }
  48.     }
  49.  
  50.     return
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement