Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- func loFreq(kaFreq int64, gateway bool) (loFreq int64) {
- if !gateway {
- if kaFreq >= 17800 && kaFreq < 18350 {
- loFreq = 16800
- }
- if kaFreq >= 18350 && kaFreq < 25000 {
- loFreq = 17400
- }
- if kaFreq >= 25000 && kaFreq < 28150 {
- loFreq = 26600
- }
- if kaFreq >= 28150 && kaFreq < 32000 {
- loFreq = 27200
- }
- } else {
- if kaFreq >= 17800 && kaFreq < 25000 {
- loFreq = 16850
- }
- if kaFreq >= 25000 && kaFreq < 32000 {
- loFreq = 26650
- }
- }
- return
- }
- func loLabel(kaFreq int64, gateway bool) (label string) {
- if !gateway {
- if kaFreq >= 17800 && kaFreq < 18350 {
- label = "Low"
- }
- if kaFreq >= 18350 && kaFreq < 25000 {
- label = "High"
- }
- if kaFreq >= 25000 && kaFreq < 28150 {
- label = "Low"
- }
- if kaFreq >= 28150 && kaFreq < 32000 {
- label = "High"
- }
- } else {
- if kaFreq >= 17800 && kaFreq < 25000 {
- label = "Gateway-Down"
- }
- if kaFreq >= 25000 && kaFreq < 32000 {
- label = "Gateway-Up"
- }
- }
- return
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement