Skip to content

Commit

Permalink
v2.9.0.0 (17 October, 2018)
Browse files Browse the repository at this point in the history
* Change: Enhancement for status update on GitHub
* Change: Update interval time for cgm-remote-monitor

Signed-off-by: Matze1985 <mathias_noack@t-online.de>
  • Loading branch information
Matze1985 committed Oct 17, 2018
1 parent b820972 commit 4553f88
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 18 deletions.
32 changes: 17 additions & 15 deletions GlucoTT.au3
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#AutoIt3Wrapper_Icon=Icon.ico
#AutoIt3Wrapper_UseX64=n
#AutoIt3Wrapper_Res_Description=A simple discrete glucose tooltip for Nightscout under Windows
#AutoIt3Wrapper_Res_Fileversion=2.8.5.0
#AutoIt3Wrapper_Res_Fileversion=2.9.0.0
#AutoIt3Wrapper_Res_LegalCopyright=Mathias Noack
#AutoIt3Wrapper_Res_Language=1031
#AutoIt3Wrapper_Run_Tidy=y
Expand Down Expand Up @@ -161,7 +161,7 @@ Func _Tooltip()

; Match result variables from page
Local $sSecondTextLine = StringReplace($sReturnedPageCount, $sReturnedPageCountCurrent, "")
If Not @Compiled Then ConsoleWrite("@@ Debug(" & @ScriptLineNumber & ") : " & $sLogTime & " : 2nd line : " & $sSecondTextLine)
If Not @Compiled Then ConsoleWrite("@@ Debug(" & @ScriptLineNumber & ") : " & $sLogTime & " : 2nd line : " & $sSecondTextLine & @CRLF)
Local $sCountMatch = "([2].*[0-9]{13}|.[0-9]{4}|\b[a-z].*)"
Local $sText = StringRegExpReplace($sReturnedPageCountCurrent, $sCountMatch, " ")
Local $sLastText = StringRegExpReplace($sSecondTextLine, $sCountMatch, " ")
Expand Down Expand Up @@ -326,16 +326,10 @@ Func _Tooltip()
ToolTip(" " & $s_fDelta & " " & @CR & " " & $iLastReadingGlucoseMin & " min", @DesktopWidth - $sInputDesktopWidth, @DesktopHeight - $sInputDesktophHeight, " " & $i_fGlucoseResult & " " & $sTrend & " ", $iAlarm, 2)
EndIf

; Check for a cgm-remote-monitor update when the update window not exists
Global $sUpdateWindowTitle = "Nightscout-Update"

If Not WinExists($sUpdateWindowTitle) Then
_CgmUpdateCheck()
EndIf

; Check TTS option
; Check TTS option and locals and globals
Local $oSapi = _SpeechObject_Create()
Local $sGlucoseTextToSpeech = StringReplace($i_fGlucoseResult, ".", ",")
Global $sUpdateWindowTitle = "Nightscout-Update"

; Sleep
If $bMod = True Then
Expand All @@ -346,6 +340,10 @@ Func _Tooltip()
EndIf
EndIf
Sleep($iReadInterval)
; Check for a cgm-remote-monitor update when the update window not exists (Important: API update 60 requests per hour!)
If Not WinExists($sUpdateWindowTitle) Then
_CgmUpdateCheck()
EndIf
EndIf

; Close WinHttp
Expand Down Expand Up @@ -432,12 +430,12 @@ Func _Settings()
EndFunc

Func _CgmUpdateCheck()

; Check GitHub update for cgm-remote-monitor
Local $iCheckMerge, $iRetCheckUpdateValue, $hConnectCgmUpdateCompare, $hRequestCgmUpdateCompare, $sReturnedCgmUpdateCompare
Local $sCheckGithubStatus = '("status":"diverged")' ; diverged (update available), behind (after update)
Local $sCheckGithubStatus = '("status":"(diverged|ahead)")' ; ahead, diverged (update available), behind (after update)
Local $sUpdateWindowButtons = "Update | Close"
Local $sUpdateWindowMsg = "Update on GitHub available!" & @CRLF & @CRLF & "1. Login " & @CRLF & "2. Create pull request" & @CRLF & "3. Merge and confirm pull request" & @CRLF & "4. Deploy branch on Heruko or Azure" & @CRLF & @CRLF & "Step 4 is not checked!"
Local $sUpdateWindowMsg = "Update on GitHub available!"
Local $sUpdateWindowMsgHelp = "Help for update on GitHub!" & @CRLF & @CRLF & "1. Login " & @CRLF & "2. Create pull request" & @CRLF & "3. Merge and confirm pull request" & @CRLF & "4. Deploy branch on Heruko or Azure" & @CRLF & @CRLF & "Step 4 is not checked!"
Local $iCheckVersionDev = StringRegExp($sNightscoutVersion, "(dev)")
If Not @Compiled Then ConsoleWrite("@@ Debug(" & @ScriptLineNumber & ") : " & $sLogTime & " : Check GitHub dev : " & $iCheckVersionDev & @CRLF)
Local $iCheckVersionRelease = StringRegExp($sNightscoutVersion, "(release)")
Expand All @@ -456,8 +454,10 @@ Func _CgmUpdateCheck()
Switch $iRetCheckUpdateValue
Case 1
ShellExecute("https://github.com/" & $sInputGithubAccount & "/cgm-remote-monitor/compare/dev...nightscout:dev")
Sleep(500)
_ExtMsgBox($EMB_ICONINFO, "Close", $sUpdateWindowTitle, $sUpdateWindowMsgHelp)
Case 2
Exit
;Exit
EndSwitch
EndIf
EndIf
Expand All @@ -471,8 +471,10 @@ Func _CgmUpdateCheck()
Switch $iRetCheckUpdateValue
Case 1
ShellExecute("https://github.com/" & $sInputGithubAccount & "/cgm-remote-monitor/compare/master...nightscout:master")
Sleep(500)
_ExtMsgBox($EMB_ICONINFO, "Close", $sUpdateWindowTitle, $sUpdateWindowMsgHelp)
Case 2
Exit
;Exit
EndSwitch
EndIf
EndIf
Expand Down
Binary file modified GlucoTT.exe
Binary file not shown.
4 changes: 4 additions & 0 deletions Update/ChangeLog.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
ChangeLog

Summarized history of the changes:
v2.9.0.0 (17 October, 2018)
Change: Enhancement for status update on GitHub
Change: Update interval time for cgm-remote-monitor

v2.8.5.0 (15 October, 2018)
Change: Fix speech and play alarm bug
Change: Better update check logic for cgm-remote-monitor
Expand Down
6 changes: 3 additions & 3 deletions Update/CheckUpdate.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[GlucoTT.exe]
version=2.8.5.0
date=2018/10/15 16:42
version=2.9.0.0
date=2018/10/17 21:34
Filesize=1164800
CRC=0176BE1F
CRC=E50FEE74
download=https://github.com/Matze1985/GlucoTT/raw/master/GlucoTT.exe
changes=https://raw.githubusercontent.com/Matze1985/GlucoTT/master/Update/ChangeLog.txt

0 comments on commit 4553f88

Please sign in to comment.