Merge pulse-loeb-component.nut into pulse-common-func.gnut

This commit is contained in:
okvdai
2023-09-03 15:15:33 +02:00
parent d56b2878a2
commit 0f0d89c9c3
4 changed files with 14 additions and 36 deletions
@@ -32,11 +32,13 @@ bool function pulseRequestData(string givenURL, table parameterTable, string tab
}
} else {
pulsePrintt(format("%s, %s is unreachable.", response.statusCode, givenURL))
pulseLockStats()
}
}
void functionref (HttpRequestFailure) onFailure = void function(HttpRequestFailure failure) : (givenURL)
{
pulsePrintt(format("Something went wrong, %s is unreachable", givenURL))
pulseLockStats()
}
foreach (key, value in parameterTable)
{
@@ -61,6 +63,11 @@ int function pulseParse(...) //Returns data from our pulseData table.
return result
}
void function pulseLockStats()
{
loebSetLockedButton(Localize("#MENU_TITLE_STATS"), true)
}
string function HammerToMeterString(float value)
{
return value > 0 && int((1.905 * value ))/100 > 0 ? string(int((1.905 * value ) )/100) + "m" : "0";