Skip to content

Commit

Permalink
Code cleanup for release
Browse files Browse the repository at this point in the history
  • Loading branch information
jakebullet70 committed Nov 9, 2023
1 parent 31909f5 commit 877f114
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 18 deletions.
26 changes: 10 additions & 16 deletions OctoTouchController.b4a
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,8 @@ Version=12.5
@EndOfDesignText@
#Region Project Attributes
#ApplicationLabel: OctoTC
#VersionCode: 50
#VersionName: 2.0.3
#VersionCode: 51
#VersionName: 2.0.0
#SignKeyFile: ..\keystore\release.keystore
#SignKeyPassword: !!OctoTC!!

Expand Down Expand Up @@ -313,18 +313,6 @@ Sub Activity_Create(FirstTime As Boolean) 'ignore
tmrScreen.Initialize("tmrScreenPower",15000) '--- init, will be reset later
End If


' #if release
' Dim fcheck As Long = 3000
' #else
' Dim fcheck As Long = 8000
' #End If
' '--- TODO add
' If tmrFilesCheckChange.IsInitialized = False Then
' tmrFilesCheckChange.Initialize("tmrFilesCheckChange",fcheck) '--- printer files check change
' End If


If tmrMain.IsInitialized = False Then
tmrMain.Initialize("tmrMain",2100) '--- main loop
End If
Expand Down Expand Up @@ -611,7 +599,7 @@ Public Sub Dim_ActionBar_Off
End Sub


Public Sub Restart_App
'Public Sub Restart_App
' ' TODO, errors out, needs work
' guiHelpers.Show_toast("Re-Starting Application...",2000)
' Activity.Finish
Expand All @@ -624,7 +612,7 @@ Public Sub Restart_App
' r.Target = I
' r.RunMethod2("addFlags", 67108864, "java.lang.int")
' StartActivity(I)
End Sub
'End Sub



Expand Down Expand Up @@ -745,3 +733,9 @@ End Sub
Public Sub SetObj_Null(obj As Object)
obj = Null
End Sub


Public Sub Show_Unhandled_Error (Error As Exception, StackTrace As String) As Boolean
MsgboxAsync(StackTrace, Error)
Return False
End Sub
3 changes: 2 additions & 1 deletion src/main/Starter.bas
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ Sub Application_Error (Error As Exception, StackTrace As String) As Boolean
B4XPages.MainPage.oMasterController.oWS.wSocket.Close
Catch
End Try 'ignore
CallSub(Main,"Restart_App") '--- this code is there but seems to fail
CallSub3("Main", "Show_Unhandled_Error", Error, StackTrace)
'CallSub(Main,"Restart_App") '--- this code is there but seems to fail
Return False
#end if
End Sub
Expand Down
2 changes: 1 addition & 1 deletion src/octoPrint/WebSocketParse.bas
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Public Sub EventAdd(name As String,CallbackObj As Object, CallbackSub As String)
End Sub

Public Sub Event_Parse(msg As String)
Log(msg)
'Log(msg)

Dim parser As JSONParser : parser.Initialize(msg)

Expand Down

0 comments on commit 877f114

Please sign in to comment.