mirror of
https://github.com/cmur2/miflorad.git
synced 2026-10-17 16:39:36 +02:00
munin-miflora: refactor helper into common, add RSSI and timing metrics
This commit is contained in:
1 parent
3b4627f988
commit
c66b3d2f75
4 files changed
+87
-25
No files matched your search
@@ -0,0 +1,14 @@
|
||||
package common
|
||||
|
||||
import (
|
||||
"regexp"
|
||||
"strings"
|
||||
)
|
||||
|
||||
const peripheralAddressAllowedChars = "[^a-z0-9]+"
|
||||
|
||||
var peripheralAddressAllowedCharsPattern = regexp.MustCompile(peripheralAddressAllowedChars)
|
||||
|
||||
func MifloraGetAlphaNumericID(peripheralAddress string) string {
|
||||
return peripheralAddressAllowedCharsPattern.ReplaceAllString(strings.ToLower(peripheralAddress), "")
|
||||
}
|
||||
Reference in new issue
Block a user