text,length,is_long_context,metric_val,label_metric "#include-once #include #include #include #region Version and Author(s)...And CREDITS!! #cs -------Version and Author Data------------------------------------------------------------------ ; *************************************************** ; ****ANYGUI.au3 v 2.8 5 MAR 2007************************** ; ************Author: Quaizywabbit******************* ; *Credits: Many thanks to Valik(especially!) and Larry!!!!!!!!!!* ; _TargetSetStyle courtesy of Xenogis!! ; *************************************************** ;Changes in this version: all func's (except _EndTarget) ;have basic error handling(return 0 and set @error) **18 July 2005 added MonthCal and Obj(embedded ActiveX) to the lineup *NOTE: Beta-Only Functions (Graphic, MonthCal, and Obj) are commented for ease of use with the production release!!!! **3 AUG 2005 fixed _TargetSetStyle ""Remove"" to operate properly **7 AUG 2005 Renamed _TargetSetStyle() to _TargetStyle() when called with no params, returns the current Styles and Exstyles changed ""Action"" verbs to ""set"", ""unset"", and ""replace"" **8 AUG 2005 fixed _TargetStyle Select/Case Logic (messed it up from v2.2_____ooops!) **10 AUG 2005 added ""toggle"" to _TargetStyle() **12 AUG 2005 added _WinMenuGetHandle() and _WinMenuSetState() **22 FEB 2007 added _TargetAddDraglist() with associated auxiliary functions, and uncommented previous Beta functions **05 MAR 2007 modified _GuiTarget() to allow passing coord array in place of ControlId(for .net controls that don't play nice) #ce ;------------------------------------------------------------------------------------------------- #endregion #region GuiTarget; ;=============================================================================== ; Function Name: _GuiTarget() ; Description: Targets any existing Window/Control for Control/Child window additions ; Parameter(s): $wintitle - Window Title ; $mode [optional] 1 = ""Single Window""; ; [Default]==> all else = ""Multiple"" ; $wintext [optional] - Text in ""Target"" window ; $controlid [optional] - ""Targeted"" Control in window **OR** array containing x and y coords ; Requirement(s): #include ; Return Value(s): On Success - Mode = 1: Global hWnd to window or control ; - Mode = """", or any value that isn't 1: Local hWnd to _ ; window or control. ; On Failure: returns 0 and @error set to 1 ; Author(s): Quaizywabbit ;=============================================================================== Func _GuiTarget($wintitle, $mode = 0, $wintext = 0, $controlid = 0) Local $hWnd WinWait($wintitle) $hWnd = WinGetHandle($wintitle) If Not ($controlid = 0) Then Select Case IsArray($controlid) $ctlhwnd = DllCall(""user32.dll"", ""hwnd"", ""ChildWindowFromPoint"", ""hwnd"", $hWnd, ""int"", $controlid[0], ""int"", $controlid[1]) If IsHWnd($ctlhwnd[0]) And $ctlhwnd[0] <> 0x00000000 And $ctlhwnd[0] <> $hWnd Then ;checks for valid control hwnd $ID = DllCall(""User32.dll"", ""int"", ""GetDlgCtrlID"", ""hwnd"", $ctlhwnd[0]) ConsoleWrite(""ControlId = "" & $ID[0] & @CRLF) $hWnd = $ctlhwnd[0] Else ConsoleWrite(""invalid coordinates"" & ""("" & $controlid[0] & "" ,"" & $controlid[1] & "")"" & @CRLF) Exit EndIf Case Else $hWnd = ControlGetHandle($wintitle, $wintext, $controlid) EndSelect EndIf If Not IsHWnd($hWnd) Then SetError(1) Select Case @error = 1 ConsoleWrite(""could not get hwnd"" & @CRLF) _EndTarget() Return 0 Case $mode = 1 Global $TargethWnd = $hWnd Return $TargethWnd Case Else Local $LocTargethWnd = $hWnd Return $LocTargethWnd EndSelect EndFunc ;==>_GuiTarget #endregion #region EndTarget; ;=============================================================================== ; Function Name: _EndTarget() ; Description: Resets _GuiTarget GLOBAL variable value to 0 (when used with Mode 1) ; Parameter(s): None ; Requirement(s): #include ; Return Value(s): None ; Author(s): Quaizywabbit ;=============================================================================== Func _EndTarget() Global $TargethWnd = 0 Return $TargethWnd EndFunc ;==>_EndTarget #endregion #region _TargetaddChild; ;=============================================================================== ; Function Name: _TargetaddChild() ; Description: Adds a Child window to the ""Targeted"" existing control/window ; Parameter(s): $text - Child window title text ; $PosX - 'X' horiz. position coordinate ; $PosY - 'Y' vert. position coordinate ; $SizeX - 'X' horiz. Size value ; $SizeY - 'Y' vert. Size value ; $LocTargethWnd [optional] - 'Local' _GuiTarget assigned variable ; Requirement(s): #include ; Return Value(s): On Success - Returns hWnd of Child window ; On Failure - Returns 0 and @error set to 1 ; Author(s): Quaizywabbit ;=============================================================================== Func _TargetaddChild($text, $PosX, $PosY, $SizeX, $SizeY, $LocTargethWnd = 0); If Not ($LocTargethWnd = 0) Then $TargethWnd = $LocTargethWnd Else ConsoleWrite(""invalid or nonexisting target hwnd"" & @CRLF) Return 0 EndIf If IsHWnd($TargethWnd) Then Local $a = GUICreate($text, $SizeX, $SizeY, $PosX, $PosY, $WS_CHILD, -1, $TargethWnd) Else ConsoleWrite(""invalid or nonexisting target hwnd"" & @CRLF) EndIf If $a = 0 Then SetError(1) Return $a EndFunc ;==>_TargetaddChild #endregion #region _TargetaddAvi; ;=============================================================================== ; Function Name: _TargetaddAvi() ; Description: Add Avi to existing control/window ; Parameter(s): $filename - The filename of the video. Only .avi files are supported. ; $subfileid - id of the subfile to be used. If the file only contains one video then use -1. ; $PosX - 'X' horiz. position coordinate ; $PosY - 'Y' vert. position coordinate ; $SizeX - 'X' horiz. Size value ; $SizeY - 'Y' vert. Size value ; $style [optional] - 'style' of Avi control ; $exstyle[optional]- 'exstyle' of Avi control ; $LocTargethWnd [optional] - 'Local' _GuiTarget assigned variable ; Requirement(s): #include ; Return Value(s): On Success - Returns 3 element array: ; $a[0] = ControlId of Avi control ; $a[1] = hWnd of Avi control ; $a[2] = hWnd of Avi controls Child window ; On Failure - returns 0, @error set to 1 ; Author(s): Quaizywabbit ;=============================================================================== Func _TargetaddAvi($filename, $subfileid, $PosX, $PosY, $SizeX, $SizeY, $style = -1, $exstyle = -1, $LocTargethWnd = 0) If Not ($LocTargethWnd = 0) Then $TargethWnd = $LocTargethWnd Local $text = $filename Local $a[3] $a[2] = _TargetaddChild($text, $PosX, $PosY, $SizeX, $SizeY, $TargethWnd) $a[0] = GUICtrlCreateAvi($filename, $subfileid, 0, 0, $SizeX, $SizeY, $style, $exstyle) $a[1] = ControlGetHandle($a[2], """", $a[0]) If $a[2] = 0 Or $a[0] = 0 Or $a[1] = """" Then SetError(1) Return 0 Else Return $a EndIf EndFunc ;==>_TargetaddAvi #endregion #region _TargetaddButton; ;=============================================================================== ; Function Name: _TargetaddButton() ; Description: Add Button to existing control/window ; Parameter(s): $text - text to display on button ; $PosX - 'X' horiz. position coordinate ; $PosY - 'Y' vert. position coordinate ; $SizeX - 'X' horiz. Size value ; $SizeY - 'Y' vert. Size value ; $style [optional] - 'style' of Button control ; $exstyle [optional] - 'exstyle' of Button control ; $LocTargethWnd [optional] - 'Local' _GuiTarget assigned variable ; Requirement(s): #include ; Return Value(s): On Success - Returns 3 element array: ; $a[0] = ControlId of Button control ; $a[1] = hWnd of Button control ; $a[2] = hWnd of Button controls Child window ; On Failure - returns 0, @error set to 1 ; Author(s): Quaizywabbit ;=============================================================================== Func _TargetaddButton($text, $PosX, $PosY, $SizeX, $SizeY, $style = -1, $exstyle = -1, $LocTargethWnd = 0) If Not ($LocTargethWnd = 0) Then $TargethWnd = $LocTargethWnd Local $a[3] $a[2] = _TargetaddChild($text, $PosX, $PosY, $SizeX, $SizeY, $TargethWnd) $a[0] = GUICtrlCreateButton($text, 0, 0, $SizeX, $SizeY, $style, $exstyle) $a[1] = ControlGetHandle($a[2], """", $a[0]) If $a[2] = 0 Or $a[0] = 0 Or $a[1] = """" Then SetError(1) Return 0 Else Return $a EndIf EndFunc ;==>_TargetaddButton #endregion #region _TargetaddCheckbox; ;=============================================================================== ; Function Name: _TargetaddCheckbox() ; Description: Add Checkbox to existing control/window ; Parameter(s): $text - Checkbox label text ; $PosX - 'X' horiz. position coordinate ; $PosY - 'Y' vert. position coordinate ; $SizeX - 'X' horiz. Size value ; $SizeY - 'Y' vert. Size value ; $style [optional] - 'style' of Checkbox control ; $exstyle [optional] - 'exstyle' of Checkbox control ; $LocTargethWnd [optional] - 'Local' _GuiTarget assigned variable ; Requirement(s): #include ; Return Value(s): On Success - Returns 3 element array: ; $a[0] = ControlId of Checkbox control ; $a[1] = hWnd of Checkbox control ; $a[2] = hWnd of Checkbox controls Child window ; On Failure - returns 0, @error set to 1 ; Author(s): Quaizywabbit ;=============================================================================== Func _TargetaddCheckbox($text, $PosX, $PosY, $SizeX, $SizeY, $style = -1, $exstyle = -1, $LocTargethWnd = 0) If Not ($LocTargethWnd = 0) Then $TargethWnd = $LocTargethWnd Local $a[3] $a[2] = _TargetaddChild($text, $PosX, $PosY, $SizeX, $SizeY, $TargethWnd) $a[0] = GUICtrlCreateCheckbox($text, 0, 0, $SizeX, $SizeY, $style, $exstyle) $a[1] = ControlGetHandle($a[2], """", $a[0]) If $a[2] = 0 Or $a[0] = 0 Or $a[1] = """" Then SetError(1) Return 0 Else Return $a EndIf EndFunc ;==>_TargetaddCheckbox #endregion #region _TargetaddCombo; ;=============================================================================== ; Function Name: _TargetaddCombo() ; Description: Add Combo to existing control/window ; Parameter(s): $text - text which will appear in the combo control ; $PosX - 'X' horiz. position coordinate ; $PosY - 'Y' vert. position coordinate ; $SizeX - 'X' horiz. Size value ; $SizeY - 'Y' vert. Size value ; $style [optional] - 'style' of Combo control ; $exstyle [optional] - 'exstyle' of Combo control ; $LocTargethWnd [optional] - 'Local' _GuiTarget assigned variable ; Requirement(s): #include ; Return Value(s): On Success - Returns 3 element array: ; $a[0] = ControlId of Combo control ; $a[1] = hWnd of Combo control ; $a[2] = hWnd of Combo controls Child window ; On Failure - returns 0, @error set to 1 ; Author(s): Quaizywabbit ;=============================================================================== Func _TargetaddCombo($text, $PosX, $PosY, $SizeX, $SizeY, $style = -1, $exstyle = -1, $LocTargethWnd = 0) If Not ($LocTargethWnd = 0) Then $TargethWnd = $LocTargethWnd Local $a[3] $a[2] = _TargetaddChild($text, $PosX, $PosY, $SizeX, $SizeY, $TargethWnd) $a[0] = GUICtrlCreateCombo($text, 0, 0, $SizeX, $SizeY, $style, $exstyle) $a[1] = ControlGetHandle($a[2], """", $a[0]) If $a[2] = 0 Or $a[0] = 0 Or $a[1] = """" Then SetError(1) Return 0 Else Return $a EndIf EndFunc ;==>_TargetaddCombo #endregion #region _TargetaddDate; ;=============================================================================== ; Function Name: _TargetaddDate() ; Description: Add Date control to existing control/window ; Parameter(s): $text - the preselected date ; $PosX - 'X' horiz. position coordinate ; $PosY - 'Y' vert. position coordinate ; $SizeX - 'X' horiz. Size value ; $SizeY - 'Y' vert. Size value ; $style [optional] - 'style' of Date control ; $exstyle [optional] - 'exstyle' of Date control ; $LocTargethWnd [optional] - 'Local' _GuiTarget assigned variable ; Requirement(s): #include ; Return Value(s): On Success - Returns 3 element array: ; $a[0] = ControlId of Date control ; $a[1] = hWnd of Date control ; $a[2] = hWnd of Date controls Child window ; On Failure - returns 0, @error set to 1 ; Author(s): Quaizywabbit ;=============================================================================== Func _TargetaddDate($text, $PosX, $PosY, $SizeX, $SizeY, $style = -1, $exstyle = -1, $LocTargethWnd = 0) If Not ($LocTargethWnd = 0) Then $TargethWnd = $LocTargethWnd Local $a[3] $a[2] = _TargetaddChild($text, $PosX, $PosY, $SizeX, $SizeY, $TargethWnd) $a[0] = GUICtrlCreateDate($text, 0, 0, $SizeX, $SizeY, $style, $exstyle) $a[1] = ControlGetHandle($a[2], """", $a[0]) If $a[2] = 0 Or $a[0] = 0 Or $a[1] = """" Then SetError(1) Return 0 Else Return $a EndIf EndFunc ;==>_TargetaddDate #endregion #region _TargetaddEdit; ;=============================================================================== ; Function Name: _TargetaddEdit() ; Description: Add Edit control to existing control/window ; Parameter(s): $text - the text of the control ; $PosX - 'X' horiz. position coordinate ; $PosY - 'Y' vert. position coordinate ; $SizeX - 'X' horiz. Size value ; $SizeY - 'Y' vert. Size value ; $style [optional] - 'style' of Edit control ; $exstyle [optional] - 'exstyle' of Edit control ; $LocTargethWnd [optional] - 'Local' _GuiTarget assigned variable ; Requirement(s): #include ; Return Value(s): On Success - Returns 3 element array: ; $a[0] = ControlId of Edit control ; $a[1] = hWnd of Edit control ; $a[2] = hWnd of Edit controls Child window ; On Failure - returns 0, @error set to 1 ; Author(s): Quaizywabbit ;=============================================================================== Func _TargetaddEdit($text, $PosX, $PosY, $SizeX, $SizeY, $style = -1, $exstyle = -1, $LocTargethWnd = 0) If Not ($LocTargethWnd = 0) Then $TargethWnd = $LocTargethWnd Local $a[3] $a[2] = _TargetaddChild($text, $PosX, $PosY, $SizeX, $SizeY, $TargethWnd) $a[0] = GUICtrlCreateEdit($text, 0, 0, $SizeX, $SizeY, $style, $exstyle) $a[1] = ControlGetHandle($a[2], """", $a[0]) If $a[2] = 0 Or $a[0] = 0 Or $a[1] = """" Then SetError(1) Return 0 Else Return $a EndIf EndFunc ;==>_TargetaddEdit #endregion #region _TargetaddGraphic; ;=============================================================================== ; Function Name: _TargetaddGraphic() ; Description: Add Graphic to existing control/window ; Parameter(s): $PosX - 'X' horiz. position coordinate ; $PosY - 'Y' vert. position coordinate ; $SizeX - 'X' horiz. Size value ; $SizeY - 'Y' vert. Size value ; $style [optional] - 'style' of Graphic control ; $LocTargethWnd [optional] - 'Local' _GuiTarget assigned variable ; Requirement(s): #include ; Return Value(s): On Success - Returns 3 element array: ; $a[0] = ControlId of Graphic control ; $a[1] = hWnd of Graphic control ; $a[2] = hWnd of Graphic controls Child window ; On Failure - returns 0, @error set to 1 ; Author(s): Quaizywabbit ;=============================================================================== Func _TargetaddGraphic($PosX, $PosY, $SizeX, $SizeY, $style = -1, $LocTargethWnd = 0) If Not ($LocTargethWnd = 0) Then $TargethWnd = $LocTargethWnd Local $a[3] $a[2] = _TargetaddChild("""", $PosX, $PosY, $SizeX, $SizeY, $TargethWnd) $a[0] = GUICtrlCreateGraphic($PosX, $PosY, $SizeX, $SizeY, $style) $a[1] = ControlGetHandle($a[2], """", $a[0]) If $a[2] = 0 Or $a[0] = 0 Or $a[1] = """" Then SetError(1) Return 0 Else Return $a EndIf EndFunc ;==>_TargetaddGraphic #endregion #region _TargetaddGroup; ;=============================================================================== ; Function Name: _TargetaddGroup() ; Description: Add Group control to existing control/window ; Parameter(s): $text - Group label text ; $PosX - 'X' horiz. position coordinate ; $PosY - 'Y' vert. position coordinate ; $SizeX - 'X' horiz. Size value ; $SizeY - 'Y' vert. Size value ; $style [optional] - 'style' of Group control ; $exstyle [optional] - 'exstyle' of Group control ; $LocTargethWnd [optional] - 'Local' _GuiTarget assigned variable ; Requirement(s): #include ; Return Value(s): On Success - Returns 3 element array: ; $a[0] = ControlId of Group control ; $a[1] = hWnd of Group control ; $a[2] = hWnd of Group controls Child window ; On Failure - returns 0, @error set to 1 ; Author(s): Quaizywabbit ;=============================================================================== Func _TargetaddGroup($text, $PosX, $PosY, $SizeX, $SizeY, $style = -1, $exstyle = -1, $LocTargethWnd = 0) If Not ($LocTargethWnd = 0) Then $TargethWnd = $LocTargethWnd Local $a[3] $a[2] = _TargetaddChild($text, $PosX, $PosY, $SizeX, $SizeY, $TargethWnd) $a[0] = GUICtrlCreateGroup($text, 0, 0, $SizeX, $SizeY, $style, $exstyle) $a[1] = ControlGetHandle($a[2], """", $a[0]) If $a[2] = 0 Or $a[0] = 0 Or $a[1] = """" Then SetError(1) Return 0 Else Return $a EndIf EndFunc ;==>_TargetaddGroup #endregion #region _TargetaddIcon; ;=============================================================================== ; Function Name: _TargetaddIcon() ; Description: Add Icon to existing control/window ; Parameter(s): $filename - filename of the icon to be loaded ; $iconID - Icon identifier if the file contain multiple icon. Otherwise -1. ; $PosX - 'X' horiz. position coordinate ; $PosY - 'Y' vert. position coordinate ; $SizeX - 'X' horiz. Size value ; $SizeY - 'Y' vert. Size value ; $style [optional] - 'style' of Icon control ; $exstyle [optional] - 'exstyle' of Icon control ; $LocTargethWnd [optional] - 'Local' _GuiTarget assigned variable ; Requirement(s): #include ; Return Value(s): On Success - Returns 3 element array: ; $a[0] = ControlId of Icon control ; $a[1] = hWnd of Icon control ; $a[2] = hWnd of Icon controls Child window ; On Failure - returns 0, @error set to 1 ; Author(s): Quaizywabbit ;=============================================================================== Func _TargetaddIcon($filename, $iconID, $PosX, $PosY, $SizeX, $SizeY, $style = -1, $exstyle = -1, $LocTargethWnd = 0) If Not ($LocTargethWnd = 0) Then $TargethWnd = $LocTargethWnd Local $a[3] $a[2] = _TargetaddChild("""", $PosX, $PosY, $SizeX, $SizeY, $TargethWnd) $a[0] = GUICtrlCreateIcon($filename, $iconID, 0, 0, $SizeX, $SizeY, $style, $exstyle) $a[1] = ControlGetHandle($a[2], """", $a[0]) If $a[2] = 0 Or $a[0] = 0 Or $a[1] = """" Then SetError(1) Return 0 Else Return $a EndIf EndFunc ;==>_TargetaddIcon #endregion #region _TargetaddInput; ;=============================================================================== ; Function Name: _TargetaddInput() ; Description: Add Input control to existing control/window ; Parameter(s): $text - The text of the control ; $PosX - 'X' horiz. position coordinate ; $PosY - 'Y' vert. position coordinate ; $SizeX - 'X' horiz. Size value ; $SizeY - 'Y' vert. Size value ; $style [optional] - 'style' of Input control ; $exstyle [optional] - 'exstyle' of Input control ; $LocTargethWnd [optional] - 'Local' _GuiTarget assigned variable ; Requirement(s): #include ; Return Value(s): On Success - Returns 3 element array: ; $a[0] = ControlId of Input control ; $a[1] = hWnd of Input control ; $a[2] = hWnd of Input controls Child window ; On Failure - returns 0, @error set to 1 ; Author(s): Quaizywabbit ;=============================================================================== Func _TargetaddInput($text, $PosX, $PosY, $SizeX, $SizeY, $style = -1, $exstyle = -1, $LocTargethWnd = 0) If Not ($LocTargethWnd = 0) Then $TargethWnd = $LocTargethWnd Local $a[3] $a[2] = _TargetaddChild($text, $PosX, $PosY, $SizeX, $SizeY, $TargethWnd) $a[0] = GUICtrlCreateInput($text, 0, 0, $SizeX, $SizeY, $style, $exstyle) $a[1] = ControlGetHandle($a[2], """", $a[0]) If $a[2] = 0 Or $a[0] = 0 Or $a[1] = """" Then SetError(1) Return 0 Else Return $a EndIf EndFunc ;==>_TargetaddInput #endregion #region _TargetaddLabel; ;=============================================================================== ; Function Name: _TargetaddLabel() ; Description: Add Label to existing control/window ; Parameter(s): $text - The text of the control. ; $PosX - 'X' horiz. position coordinate ; $PosY - 'Y' vert. position coordinate ; $SizeX - 'X' horiz. Size value ; $SizeY - 'Y' vert. Size value ; $style [optional] - 'style' of Label control ; $exstyle [optional] - 'exstyle' of Label control ; $LocTargethWnd [optional] - 'Local' _GuiTarget assigned variable ; Requirement(s): #include ; Return Value(s): On Success - Returns 3 element array: ; $a[0] = ControlId of Label control ; $a[1] = hWnd of Label control ; $a[2] = hWnd of Label controls Child window ; On Failure - returns 0, @error set to 1 ; Author(s): Quaizywabbit ;=============================================================================== Func _TargetaddLabel($text, $PosX, $PosY, $SizeX, $SizeY, $style = -1, $exstyle = -1, $LocTargethWnd = 0) If Not ($LocTargethWnd = 0) Then $TargethWnd = $LocTargethWnd Local $a[3] $a[2] = _TargetaddChild($text, $PosX, $PosY, $SizeX, $SizeY, $TargethWnd) $a[0] = GUICtrlCreateLabel($text, 0, 0, $SizeX, $SizeY, $style, $exstyle) $a[1] = ControlGetHandle($a[2], """", $a[0]) If $a[2] = 0 Or $a[0] = 0 Or $a[1] = """" Then SetError(1) Return 0 Else Return $a EndIf EndFunc ;==>_TargetaddLabel #endregion #region _TargetaddList; ;=============================================================================== ; Function Name: _TargetaddList() ; Description: Add List control to existing control/window ; Parameter(s): $text - The text of the control. ; $PosX - 'X' horiz. position coordinate ; $PosY - 'Y' vert. position coordinate ; $SizeX - 'X' horiz. Size value ; $SizeY - 'Y' vert. Size value ; $style [optional] - 'style' of List control ; $exstyle [optional] - 'exstyle' of List control ; $LocTargethWnd [optional] - 'Local' _GuiTarget assigned variable ; Requirement(s): #include ; Return Value(s): On Success - Returns 3 element array: ; $a[0] = ControlId of List control ; $a[1] = hWnd of List control ; $a[2] = hWnd of List controls Child window ; On Failure - returns 0, @error set to 1 ; Author(s): Quaizywabbit ;=============================================================================== Func _TargetaddList($text, $PosX, $PosY, $SizeX, $SizeY, $style = -1, $exstyle = -1, $LocTargethWnd = 0) If Not ($LocTargethWnd = 0) Then $TargethWnd = $LocTargethWnd Local $a[3] $a[2] = _TargetaddChild($text, $PosX, $PosY, $SizeX, $SizeY, $TargethWnd) $a[0] = GUICtrlCreateList($text, 0, 0, $SizeX, $SizeY, $style, $exstyle) $a[1] = ControlGetHandle($a[2], """", $a[0]) If $a[2] = 0 Or $a[0] = 0 Or $a[1] = """" Then SetError(1) Return 0 Else Return $a EndIf EndFunc ;==>_TargetaddList #endregion #region _TargetaddDragList; ;=============================================================================== ; Function Name: _TargetaddDragList() ; Description: Adds DragList control to existing control/window ; Parameter(s): $text - The text of the control. ; $PosX - 'X' horiz. position coordinate ; $PosY - 'Y' vert. position coordinate ; $SizeX - 'X' horiz. Size value ; $SizeY - 'Y' vert. Size value ; $style [optional] - 'style' of List control ; $exstyle [optional] - 'exstyle' of List control ; $LocTargethWnd [optional] - 'Local' _GuiTarget assigned variable ; Requirement(s): #include and ; Return Value(s): On Success - Returns 3 element array: ; $a[0] = ControlId of List control ; $a[1] = hWnd of List control ; $a[2] = hWnd of List controls Child window ; On Failure - returns 0, @error set to 1 ; Author(s): Quaizywabbit ;=============================================================================== Func _TargetaddDragList($text, $PosX, $PosY, $SizeX, $SizeY, $style = -1, $exstyle = -1, $LocTargethWnd = 0) If Not ($LocTargethWnd = 0) Then $TargethWnd = $LocTargethWnd Local $a[3] $a[2] = _TargetaddChild($text, $PosX, $PosY, $SizeX, $SizeY, $TargethWnd) $a[0] = GUICtrlCreateList($text, 15, 2, $SizeX - 15, $SizeY - 2, $style, $exstyle) $a[1] = ControlGetHandle($a[2], """", $a[0]) _Makedraglist($a[1]) If $a[2] = 0 Or $a[0] = 0 Or $a[1] = """" Then SetError(1) Return 0 Else Return $a EndIf EndFunc ;==>_TargetaddDragList #endregion #region _TargetaddListview; ;=============================================================================== ; Function Name: _TargetaddListview() ; Description: Add Listview control to existing control/window ; Parameter(s): $text - definition of column heading. ; $PosX - 'X' horiz. position coordinate ; $PosY - 'Y' vert. position coordinate ; $SizeX - 'X' horiz. Size value ; $SizeY - 'Y' vert. Size value ; $style [optional] - 'style' of Listview control ; $exstyle [optional] - 'exstyle' of Listview control ; $LocTargethWnd [optional] - 'Local' _GuiTarget assigned variable ; Requirement(s): #include ; Return Value(s): On Success - Returns 3 element array: ; $a[0] = ControlId of Listview control ; $a[1] = hWnd of Listview control ; $a[2] = hWnd of Listview controls Child window ; On Failure - returns 0, @error set to 1 ; Author(s): Quaizywabbit ;=============================================================================== Func _TargetaddListview($text, $PosX, $PosY, $SizeX, $SizeY, $style = -1, $exstyle = -1, $LocTargethWnd = 0) If Not ($LocTargethWnd = 0) Then $TargethWnd = $LocTargethWnd Local $a[3] $a[2] = _TargetaddChild($text, $PosX, $PosY, $SizeX, $SizeY, $TargethWnd) $a[0] = GUICtrlCreateListView($text, 0, 0, $SizeX, $SizeY, $style, $exstyle) $a[1] = ControlGetHandle($a[2], """", $a[0]) If $a[2] = 0 Or $a[0] = 0 Or $a[1] = """" Then SetError(1) Return 0 Else Return $a EndIf EndFunc ;==>_TargetaddListview #endregion #region _TargetaddMonthCal; ;=============================================================================== ; Function Name: _TargetaddMonthCal() ; Description: Adds MonthCal control to existing control/window ; Parameter(s): $text - The text of the control. ; $PosX - 'X' horiz. position coordinate ; $PosY - 'Y' vert. position coordinate ; $SizeX - 'X' horiz. Size value ; $SizeY - 'Y' vert. Size value ; $style [optional] - 'style' of MonthCal control ; $exstyle [optional] - 'exstyle' of MonthCal control ; $LocTargethWnd [optional] - 'Local' _GuiTarget assigned variable ; Requirement(s): #include ; Return Value(s): On Success - Returns 3 element array: ; $a[0] = ControlId of MonthCal control ; $a[1] = hWnd of MonthCal control ; $a[2] = hWnd of MonthCal controls Child window ; On Failure - returns 0, @error set to 1 ; Author(s): Quaizywabbit ;=============================================================================== Func _TargetaddMonthCal($text, $PosX, $PosY, $SizeX, $SizeY, $style = -1, $exstyle = -1, $LocTargethWnd = 0) If Not ($LocTargethWnd = 0) Then $TargethWnd = $LocTargethWnd Local $a[3] $a[2] = _TargetaddChild($text, $PosX, $PosY, $SizeX, $SizeY, $TargethWnd) $a[0] = GUICtrlCreateMonthCal($text, 0, 0, $SizeX, $SizeY, $style, $exstyle) $a[1] = ControlGetHandle($a[2], """", $a[0]) If $a[2] = 0 Or $a[0] = 0 Or $a[1] = """" Then SetError(1) Return 0 Else Return $a EndIf EndFunc ;==>_TargetaddMonthCal #endregion #region _TargetaddObj; ;=============================================================================== ; Function Name: _TargetaddObj() ; Description: Adds ActiveX Object control to existing control/window ; Parameter(s): $ObjVar - A variable pointing to a previously opened object ; $PosX - 'X' horiz. position coordinate ; $PosY - 'Y' vert. position coordinate ; $SizeX - 'X' horiz. Size value ; $SizeY - 'Y' vert. Size value ; $LocTargethWnd [optional] - 'Local' _GuiTarget assigned variable ; Requirement(s): #include ; Return Value(s): On Success - Returns 3 element array: ; $a[0] = ControlId of ActiveX Object control ; $a[1] = hWnd of ActiveX Object control ; $a[2] = hWnd of ActiveX Object controls Child window ; On Failure - returns 0, @error set to 1 ; Author(s): Quaizywabbit ;=============================================================================== Func _TargetaddObj($ObjVar, $PosX, $PosY, $SizeX, $SizeY, $LocTargethWnd = 0) If Not ($LocTargethWnd = 0) Then $TargethWnd = $LocTargethWnd Local $a[3] $a[2] = _TargetaddChild(""ActiveXObj"", $PosX, $PosY, $SizeX, $SizeY, $TargethWnd) $a[0] = GUICtrlCreateObj($ObjVar, 0, 0, $SizeX, $SizeY) $a[1] = ControlGetHandle($a[2], """", $a[0]) If $a[2] = 0 Or $a[0] = 0 Or $a[1] = """" Then SetError(1) Return 0 Else Return $a EndIf EndFunc ;==>_TargetaddObj #endregion #region _TargetaddPic; ;=============================================================================== ; Function Name: _TargetaddPic() ; Description: Add Pic to existing control/window ; Parameter(s): $filename - filename of the icon to be loaded. ; $PosX - 'X' horiz. position coordinate ; $PosY - 'Y' vert. position coordinate ; $SizeX - 'X' horiz. Size value ; $SizeY - 'Y' vert. Size value ; $style [optional] - 'style' of Pic control ; $exstyle [optional] - 'exstyle' of Pic control ; $LocTargethWnd [optional] - 'Local' _GuiTarget assigned variable ; Requirement(s): #include ; Return Value(s): On Success - Returns 3 element array: ; $a[0] = ControlId of Pic control ; $a[1] = hWnd of Pic control ; $a[2] = hWnd of Pic controls Child window ; On Failure - returns 0, @error set to 1 ; Author(s): Quaizywabbit ;=============================================================================== Func _TargetaddPic($filename, $PosX, $PosY, $SizeX, $SizeY, $style = -1, $exstyle = -1, $LocTargethWnd = 0) If Not ($LocTargethWnd = 0) Then $TargethWnd = $LocTargethWnd Local $a[3] $a[2] = _TargetaddChild("""", $PosX, $PosY, $SizeX, $SizeY, $TargethWnd) $a[0] = GUICtrlCreatePic($filename, 0, 0, $SizeX, $SizeY, $style, $exstyle) $a[1] = ControlGetHandle($a[2], """", $a[0]) If $a[2] = 0 Or $a[0] = 0 Or $a[1] = """" Then SetError(1) Return 0 Else Return $a EndIf EndFunc ;==>_TargetaddPic #endregion #region _TargetaddProgress; ;=============================================================================== ; Function Name: _TargetaddProgress() ; Description: Add Progress control to existing control/window ; Parameter(s): $PosX - 'X' horiz. position coordinate ; $PosY - 'Y' vert. position coordinate ; $SizeX - 'X' horiz. Size value ; $SizeY - 'Y' vert. Size value ; $style [optional] - 'style' of Progress control ; $exstyle [optional] - 'exstyle' of Progress control ; $LocTargethWnd [optional] - 'Local' _GuiTarget assigned variable ; Requirement(s): #include ; Return Value(s): On Success - Returns 3 element array: ; $a[0] = ControlId of Progress control ; $a[1] = hWnd of Progress control ; $a[2] = hWnd of Progress controls Child window ; On Failure - returns 0, @error set to 1 ; Author(s): Quaizywabbit ;=============================================================================== Func _TargetaddProgress($PosX, $PosY, $SizeX, $SizeY, $style = -1, $exstyle = -1, $LocTargethWnd = 0) If Not ($LocTargethWnd = 0) Then $TargethWnd = $LocTargethWnd Local $a[3] $a[2] = _TargetaddChild("""", $PosX, $PosY, $SizeX, $SizeY, $TargethWnd) $a[0] = GUICtrlCreateProgress($PosX, $PosY, $SizeX, $SizeY, $style, $exstyle) $a[1] = ControlGetHandle($a[2], """", $a[0]) If $a[2] = 0 Or $a[0] = 0 Or $a[1] = """" Then SetError(1) Return 0 Else Return $a EndIf EndFunc ;==>_TargetaddProgress #endregion #region _TargetaddSlider; ;=============================================================================== ; Function Name: _TargetaddSlider() ; Description: Add Slider to existing control/window ; Parameter(s): $PosX - 'X' horiz. position coordinate ; $PosY - 'Y' vert. position coordinate ; $SizeX - 'X' horiz. Size value ; $SizeY - 'Y' vert. Size value ; $style [optional] - 'style' of Slider control ; $exstyle [optional] - 'exstyle' of Slider control ; $LocTargethWnd [optional] - 'Local' _GuiTarget assigned variable ; Requirement(s): #include ; Return Value(s): On Success - Returns 3 element array: ; $a[0] = ControlId of Slider control ; $a[1] = hWnd of Slider control ; $a[2] = hWnd of Slider controls Child window ; On Failure - returns 0, @error set to 1 ; Author(s): Quaizywabbit ;=============================================================================== Func _TargetaddSlider($PosX, $PosY, $SizeX, $SizeY, $style = -1, $exstyle = -1, $LocTargethWnd = 0) If Not ($LocTargethWnd = 0) Then $TargethWnd = $LocTargethWnd Local $a[3] $a[2] = _TargetaddChild("""", $PosX, $PosY, $SizeX, $SizeY, $TargethWnd) $a[0] = GUICtrlCreateSlider(0, 0, $SizeX, $SizeY, $style, $exstyle) $a[1] = ControlGetHandle($a[2], """", $a[0]) If $a[2] = 0 Or $a[0] = 0 Or $a[1] = """" Then SetError(1) Return 0 Else Return $a EndIf EndFunc ;==>_TargetaddSlider #endregion #region _TargetaddTab; ;=============================================================================== ; Function Name: _TargetaddTab() ; Description: Add Tab control to existing control/window ; Parameter(s): $PosX - 'X' horiz. position coordinate ; $PosY - 'Y' vert. position coordinate ; $SizeX - 'X' horiz. Size value ; $SizeY - 'Y' vert. Size value ; $style [optional] - 'style' of Tab control ; $exstyle [optional] - 'exstyle' of Tab control ; $LocTargethWnd [optional] - 'Local' _GuiTarget assigned variable ; Requirement(s): #include ; Return Value(s): On Success - Returns 3 element array: ; $a[0] = ControlId of Tab control ; $a[1] = hWnd of Tab control ; $a[2] = hWnd of Tab controls Child window ; On Failure - returns 0, @error set to 1 ; Author(s): Quaizywabbit ;=============================================================================== Func _TargetaddTab($PosX, $PosY, $SizeX, $SizeY, $style = -1, $exstyle = -1, $LocTargethWnd = 0) If Not ($LocTargethWnd = 0) Then $TargethWnd = $LocTargethWnd Local $a[3] $a[2] = _TargetaddChild("""", $PosX, $PosY, $SizeX, $SizeY, $TargethWnd) $a[0] = GUICtrlCreateTab(0, 0, $SizeX, $SizeY, $style, $exstyle) $a[1] = ControlGetHandle($a[2], """", $a[0]) If $a[2] = 0 Or $a[0] = 0 Or $a[1] = """" Then SetError(1) Return 0 Else Return $a EndIf EndFunc ;==>_TargetaddTab #endregion #region _TargetaddTreeview; ;=============================================================================== ; Function Name: _TargetaddTreeview() ; Description: Add Treeview control to existing control/window ; Parameter(s): $PosX - 'X' horiz. position coordinate ; $PosY - 'Y' vert. position coordinate ; $SizeX - 'X' horiz. Size value ; $SizeY - 'Y' vert. Size value ; $style [optional] - 'style' of Treeview control ; $exstyle [optional] - 'exstyle' of Treeview control ; $LocTargethWnd [optional] - 'Local' _GuiTarget assigned variable ; Requirement(s): #include ; Return Value(s): On Success - Returns 3 element array: ; $a[0] = ControlId of Treeview control ; $a[1] = hWnd of Treeview control ; $a[2] = hWnd of Treeview controls Child window ; On Failure - returns 0, @error set to 1 ; Author(s): Quaizywabbit ;=============================================================================== Func _TargetaddTreeview($PosX, $PosY, $SizeX, $SizeY, $style = -1, $exstyle = -1, $LocTargethWnd = 0) If Not ($LocTargethWnd = 0) Then $TargethWnd = $LocTargethWnd Local $a[3] $a[2] = _TargetaddChild("""", $PosX, $PosY, $SizeX, $SizeY, $TargethWnd) $a[0] = GUICtrlCreateTreeView(0, 0, $SizeX, $SizeY, $style, $exstyle) $a[1] = ControlGetHandle($a[2], """", $a[0]) If $a[2] = 0 Or $a[0] = 0 Or $a[1] = """" Then SetError(1) Return 0 Else Return $a EndIf EndFunc ;==>_TargetaddTreeview #endregion #region _TargetSetStyle; ;=============================================================================== ; Function Name: _TargetStyle() ; Description: Retrieves/Sets/Unsets/Replaces Styles and/or Exstyles of 'targeted' control/window ; When called with no parameters returns the current Styles/Exstyles for the window/control ; Parameter(s): $action[optional] - ""set"", ""unset"", ""toggle"", and ""replace"" ; $Bool[optional] - 1 to Update window/control when finished ; $Style[optional] - New window style (multiple styles can be BitOr'd) ; $ExStyle[optional] - New window exstyle (multiple styles can be BitOr'd) ; $LocTargethWnd[optional] - 'Local' _GuiTarget assigned variable ; Requirement(s): #include ; Return Value(s): On success: $action left blank-returns an array with $array[0] as the current Style and $array[1] as the current Exstyle ; otherwise it returns previous style and exstyle ; If style and exstyle are changed the function will return an array ; with $Array[0] as the previous style and ; $Array[1] as the previous exstyle ; On Error:affected array element returns 0, error flag set to 1 if Style, 2 if ExStyle. ; MsgBox displayed for either. ; Msgbox displayed for incorrect 'action' verb, returns 0 and sets error ; Author(s): Chase/Xenogis- - -Modified by Quaizywabbit ; 3 AUG 2005: corrected ""Remove"" to operate properly(Thanks Valik and Nutster!) ; 7 AUG 2005: changed 'action' verbs to ""set"", ""unset"", and ""replace"" ; 8 AUG 2005 fixed _TargetStyle() Select/Case logic (messed it up from v2.2___ooops!!) ; 10 AUG 2005 added ""toggle"" ; Comments: can only do a single 'verb' during each call, so required Style/Exstyle combinations may require ; additional _TargetStyle() calls with the last call setting $Bool to 1 to update the 'target' ;=============================================================================== Func _TargetStyle($action = 0, $Bool = 0, $style = -1, $exstyle = -1, $LocTargethWnd = 0) If Not ($LocTargethWnd = 0) Then $TargethWnd = $LocTargethWnd Local $ostyle = DllCall(""user32.dll"", ""long"", ""GetWindowLong"", ""hwnd"", $TargethWnd, ""int"", -16);get existing Style Local $oexstyle = DllCall(""user32.dll"", ""long"", ""GetWindowLong"", ""hwnd"", $TargethWnd, ""int"", -20);get existing ExStyle Select Case $action = ""set"" If $style <> -1 Then Local $scall = DllCall(""user32.dll"", ""long"", ""SetWindowLong"", ""hwnd"", $TargethWnd, ""int"", -16, ""long"", BitOR($ostyle[0], $style));add Style to old style If $exstyle <> -1 Then Local $exscall = DllCall(""user32.dll"", ""long"", ""SetWindowLong"", ""hwnd"", $TargethWnd, ""int"", -20, ""long"", BitOR($oexstyle[0], $exstyle));add Exstyle to old exstyle Case $action = ""unset"" If $style <> -1 Then Local $scall = DllCall(""user32.dll"", ""long"", ""SetWindowLong"", ""hwnd"", $TargethWnd, ""int"", -16, ""long"", BitAND($ostyle[0], BitNOT($style)));remove Style from old style If $exstyle <> -1 Then Local $exscall = DllCall(""user32.dll"", ""long"", ""SetWindowLong"", ""hwnd"", $TargethWnd, ""int"", -20, ""long"", BitAND($oexstyle[0], BitNOT($exstyle)));remove Exstyle from old exstyle Case $action = ""toggle"" If $style <> -1 Then Local $scall = DllCall(""user32.dll"", ""long"", ""SetWindowLong"", ""hwnd"", $TargethWnd, ""int"", -16, ""long"", BitXOR($ostyle[0], $style));Toggle Style(s) on or off If $exstyle <> -1 Then Local $exscall = DllCall(""user32.dll"", ""long"", ""SetWindowLong"", ""hwnd"", $TargethWnd, ""int"", -20, ""long"", BitXOR($oexstyle[0], $exstyle));Toggle ExStyle(s) on or off Case $action = ""replace"" If $style <> -1 Then Local $scall = DllCall(""user32.dll"", ""long"", ""SetWindowLong"", ""hwnd"", $TargethWnd, ""int"", -16, ""long"", $style);replace Style If $exstyle <> -1 Then Local $exscall = DllCall(""user32.dll"", ""long"", ""SetWindowLong"", ""hwnd"", $TargethWnd, ""int"", -20, ""long"", $exstyle);replace Exstyle Case Else Dim $ret[2] $ret[0] = $ostyle[0] $ret[1] = $oexstyle[0] Return $ret EndSelect Dim $return[2] If $style <> -1 And $scall[0] <> $ostyle[0] Then SetError(1) $return[0] = 0 MsgBox(4096, ""Error setting Style"", ""Please check your Style settings and try again"") ElseIf $exstyle <> -1 And $exscall[0] <> $oexstyle[0] Then SetError(2) $return[1] = 0 MsgBox(4096, ""Error setting ExStyle"", ""Please check your ExStyle settings and try again"") Else If $style <> -1 Then $return[0] = $scall[0] Else $return[0] = $ostyle[0] EndIf If $exstyle <> -1 Then $return[1] = $exscall[0] Else $return[1] = $oexstyle[0] EndIf EndIf If $Bool = 1 Then _Refresh($TargethWnd) Return $return EndFunc ;==>_TargetStyle #endregion #region _WinMenuGetHandle() ;=============================================================================== ; Function Name: _WinMenuGetHandle() ; Description: Retrieves handle to a Window Menu ; Parameter(s): $hwnd - Window handle ; Requirement(s): none ; Return Value(s): On Success - $ret[0] = Window handle ; $ret[1] = Menu handle ; On Failure: returns 0 and @error set to 1 ; MsgBox shown explaining possible reasons for failure ; Author(s): Quaizywabbit ; Comments: Child windows cannot have menu's. Not all Non-Child windows have menu's. ;=============================================================================== Func _WinMenuGetHandle($window) Local $menu = DllCall(""user32.dll"", ""hwnd"", ""GetMenu"", ""hwnd"", $window) Local $test = DllCall(""user32.dll"", ""int"", ""IsMenu"", ""hwnd"", $menu[0]) If $test[0] <> 0 Then Dim $ret[2] $ret[0] = $window $ret[1] = $menu[0] Return $ret Else SetError(1) MsgBox(4096, ""Error-_WinMenuGetHandle"", ""Could not retrieve Menu handle:window is child, or has no menu"") Return 0 EndIf EndFunc ;==>_WinMenuGetHandle #endregion #region _WinMenuSetState() ;=============================================================================== ; Function Name: _WinMenuSetState() ; Description: 'shows' or 'hides' a Window Menu's visibility ; Parameter(s): $window - initial call = Non-Child Window handle(that has a Menu) ; subsequent calls = returned array variable from initial call ; $state - ""show"" [default] ; ""hide"" ; Requirement(s): _WinMenuGetHandle() ; Return Value(s): On Success(initial call only) - $ret[0] = Window handle ; $ret[1] = Menu handle ; On Failure: returns 0 and @error set to 1 ; MsgBox shown explaining possible reasons for failure ; Author(s): Quaizywabbit ; Comments: Must ""hide"" before ""show"", when ""show""ing use the initial ""hide"" call variable ; Child windows cannot have menu's(""show"" won't work). Not all Non-Child windows have menu's. ;=============================================================================== Func _WinMenuSetState($window, $state = ""show""); ;is this the initial call? If IsArray($window) Then ; 'old call Local $windowhwnd = $window[0] Local $menuhwnd = $window[1] Else Local $get = _WinMenuGetHandle($window); 'new call $windowhwnd = $get[0] $menuhwnd = $get[1] EndIf Select Case $state = ""hide"" Local $menu = 0 Local $menusetsucceed_fail = DllCall(""user32.dll"", ""int"", ""SetMenu"", ""hwnd"", $windowhwnd, ""hwnd"", $menu) If $menusetsucceed_fail[0] = 0 Then SetError(1) MsgBox(4096, ""Error!"", "" 'hide' update failed!"") Return 0 EndIf Case $state = ""show"" Local $menusetsucceed_fail = DllCall(""user32.dll"", ""int"", ""SetMenu"", ""hwnd"", $window[0], ""hwnd"", $window[1]) If $menusetsucceed_fail[0] = 0 Then SetError(1) MsgBox(4096, ""Error!"", ""'show' update failed!"") Return 0 EndIf EndSelect If Not IsArray($window) Then ;( Return only on initial call) Dim $ret[2] $ret[0] = $windowhwnd $ret[1] = $menuhwnd Return $ret EndIf EndFunc ;==>_WinMenuSetState #endregion #region aux-func's ;=============================================================================== ; AUXILIARY FUNCTIONS ;=============================================================================== Const $SWP_NOMOVE = 0x0002, $SWP_NOSIZE = 0x0001, $SWP_NOZORDER = 0x0004, $SWP_FRAMECHANGED = 0x0020 Const $DRAGLISTMSGSTRING = ""commctrl_DragListMsg"" Const $DL_BEGINDRAG = ($WM_USER + 133) Const $DL_DRAGGING = ($WM_USER + 134) Const $DL_DROPPED = ($WM_USER + 135) Const $DL_CANCELDRAG = ($WM_USER + 136) Dim $dragIdx, $dragIdto, $dragging, $sztext, $cursor_old = MouseGetCursor() Func _Makedraglist($window, $text = 0, $controlid = 0) Local $hWnd If Not ($controlid = 0) Then $hWnd = ControlGetHandle($window, $text, $controlid) Else $hWnd = $window EndIf Local $r = DllCall(""comctl32.dll"", ""int"", ""MakeDragList"", ""hwnd"", $hWnd) $draglistmessage = DllCall(""user32.dll"", ""int"", ""RegisterWindowMessage"", ""str"", $DRAGLISTMSGSTRING) $x = GUIRegisterMsg(($draglistmessage[0]), ""_DraglistHandler"") Return $r[0] EndFunc ;==>_Makedraglist Func _DrawInsert($hWnd, $Hlb, $nItem) $r = DllCall(""comctl32.dll"", ""int"", ""DrawInsert"", ""hwnd"", $hWnd, ""hwnd"", $Hlb, ""int"", $nItem) Return $r[0] EndFunc ;==>_DrawInsert Func _LBItemFromPt($Hlb, $Point, $autoscroll = 1) $x = DllStructGetData($Point, 1) $y = DllStructGetData($Point, 2) $r = DllCall(""comctl32.dll"", ""int"", ""LBItemFromPt"", ""hwnd"", $Hlb, ""int"", $x, ""int"", $y, ""int"", $autoscroll) Return $r[0] EndFunc ;==>_LBItemFromPt Func _Refresh($TargethWnd) $r = DllCall(""user32.dll"", ""long"", ""SetWindowPos"", ""hwnd"", $TargethWnd, ""hwnd"", $TargethWnd, _ ""int"", 0, ""int"", 0, ""int"", 0, ""int"", 0, _ ""long"", BitOR($SWP_NOMOVE, $SWP_NOSIZE, $SWP_NOZORDER, $SWP_FRAMECHANGED)) Return $r[0] EndFunc ;==>_Refresh Func _DraglistHandler($hWnd, $msg, $wParam, $lParam) $nID = BitAND($wParam, 0x0000FFFF) Local $DraglistInfo = DllStructCreate(""uint;hwnd;int;int"", $lParam) $nNotifyCode = (DllStructGetData($DraglistInfo, 1)) $Hlb = ""0x"" & Hex(DllStructGetData($DraglistInfo, 2)) $Point = DllStructCreate(""int;int"") DllStructSetData($Point, 1, DllStructGetData($DraglistInfo, 3)) DllStructSetData($Point, 2, DllStructGetData($DraglistInfo, 4)) Select Case $nNotifyCode = $DL_BEGINDRAG $dragIdx = _LBItemFromPt($Hlb, $Point) _Refresh($Hlb) GUICtrlSetCursor($nID, 0);hand cursor $dragging = False Return True; use conditional statements returning true to allow item drag for some items, or false to disallow. Case $nNotifyCode = $DL_CANCELDRAG _Refresh($Hlb) _DrawInsert($hWnd, $Hlb, -1) GUICtrlSetCursor($nID, $cursor_old); back to arrow $dragging = False Case $nNotifyCode = $DL_DRAGGING $dragIdto = _LBItemFromPt($Hlb, $Point) _DrawInsert($hWnd, $Hlb, $dragIdto) $dragging = True Case $nNotifyCode = $DL_DROPPED $dragIdto = _LBItemFromPt($Hlb, $Point) If $dragging = True And $dragIdto <> -1 Then ;$sztext = _GUICtrlListGetText($nID, $dragIdx) $sztext = _GUICtrlListBox_GetText($nID, $dragIdx) ;_GUICtrlListDeleteItem($nID, $dragIdx) _GUICtrlListBox_DeleteString($nID, $dragIdx) ;_GUICtrlListInsertItem($nID, $sztext, $dragIdto) _GUICtrlListBox_InsertString($nID, $sztext, $dragIdto) ;_GUICtrlListSelectIndex($nID, $dragIdto) _GUICtrlListBox_SetCurSel($nID, $dragIdto) _DrawInsert($hWnd, $Hlb, -1) EndIf GUICtrlSetCursor($nID, $cursor_old); back to arrow Case Else Return $GUI_RUNDEFMSG EndSelect EndFunc ;==>_DraglistHandler #endregion #region User Call Tips; Copy and paste these to your ""User CallTips"" #cs;User call tip entries: _GuiTarget(""title""[,Mode- enter 1 for single window mode [,""text""[,ControlId]]]) _EndTarget() _TargetaddChild( ""title"", PosX, PosY, SizeX, SizeY[, hWnd}) _TargetaddAvi( filename, subfileid, PosX, PosY, SizeX, SizeY[, style [,exstyle[, hWnd]]]) _TargetaddButton( ""text"",PosX,PosY,SizeX,SizeY[,style[,exstyle[, hWnd]]]) _TargetaddCheckbox( ""text"", PosX, PosY, SizeX, SizeY[, style[, exstyle[, hWnd]]]) _TargetaddCombo( ""text"", PosX, PosY, SizeX, SizeY[, style[, exstyle[, hWnd]]]) _TargetaddDate( ""text"", PosX, PosY, SizeX, SizeY[, style[, exstyle[, hWnd]]]) _TargetaddEdit(""text"", PosX, PosY, SizeX, SizeY[, style[, exstyle[, hWnd]]]) _TargetaddGraphic( PosX, PosY, SizeX, SizeY[, style[, hWnd]]) _TargetaddGroup( ""text"", PosX, PosY, SizeX, SizeY[, style[, exstyle[, hWnd]]]) _TargetaddIcon( filename, iconID, PosX, PosY, SizeX, SizeY[, style[, exstyle[, hWnd]]]) _TargetaddInput( ""text"", PosX, PosY, SizeX, SizeY[, style[, exstyle[, hWnd]]]) _TargetaddLabel( ""text"", PosX, PosY, SizeX, SizeY[, style[, exstyle[, hWnd]]]) _TargetaddList( ""text"", PosX, PosY, SizeX, SizeY[, style[, exstyle[, hWnd]]]) _TargetaddDragList( ""text"", PosX, PosY, SizeX, SizeY[, style[, exstyle[, hWnd]]]) _TargetaddListview( ""text"", PosX, PosY, SizeX, SizeY[, style[, exstyle[, hWnd]]]) _TargetaddMonthCal( ""text"", PosX, PosY, SizeX, SizeY[, style[, exstyle[, hWnd]]]) _TargetaddObj( ""Object Variable"", PosX, PosY, SizeX, SizeY[, hWnd]) _TargetaddPic( filename, PosX, PosY, SizeX, SizeY[, style[, exstyle[, hWnd]]]) _TargetaddProgress(PosX, PosY, SizeX, SizeY[, style[, exstyle[, hWnd]]]) _TargetaddSlider(PosX, PosY, SizeX, SizeY[, style[, exstyle[, hWnd]]]) _TargetaddTab(PosX, PosY, SizeX, SizeY[, style[, exstyle[, hWnd]]]) _TargetaddTreeview(PosX, PosY, SizeX, SizeY[, style[, exstyle[, hWnd]]]) _TargetStyle([action ""set|unset|toggle|replace""[,Update""1 = yes 0 = no""[,Style[, ExStyle[, hWnd]]]]]) _WinMenuGetHandle(WindowHwnd) _WinMenuSetState($windowhwnd_or_Previous_call$Variable[, $state = ""show|hide""]) #ce #endregion",16176,True,3834.0618677197717,median "; Rishodi's Pindlebot v1.3a for Diablo II v1.10 ; ; AutoIt Version: 3.0 ; Author: Rishodi (Rishodi@yahoo.com) ; Thanks to FallnAngel for the IPB 3.4 script which I based a lot of this on ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; Variable Declarations ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Global $borderWidth = 3 Global $titleHeight = 29 Global $corpseCheck Global $currentHealth Global $gameName[2] Global $magicChar = ""."" Global $temp $gameName[1] = 1 Global $version $version = ""1.3a"" $mercResAttempts = 0 ;only used if NeedMerc=2 $mercAlive = 0 $marker = 0 ;keeps track of whether or not the bot knows where you are in the run $inTemple = 0 ;keeps track of whether or not you are in Nihlathak's Temple in-game $away = 0 ;keeps track of when the away chickmessage needs to be sent $runWasCompleted = 0 ;keeps track of whether or not the last run was completed $pauseTime = 0 ;used to subtract pause time from total run time $restarts = 0 ;used to keep track of multiple D2 restarts in a row, if = 3 then bot will wait for a while before restarting D2 again $currentInterval = 0 ;keeps track of run interval $slotCheck = 0 $stashCount = 0 $quit = 0 $lastRuns = 0 $lastCompleted = 0 $lastDeaths = 0 $lastChickens = 0 $totalRuns = 0 $totalCompleted = 0 $totalDeaths = 0 $totalChickens = 0 $runTime = 0 $lastPotUse = 0 ;used to disable potion use for 1 second after using the last potion $lastGameChicken = 0 ;if 1, then bot chickened out of last game ;the following variables are used in the stashing routine Global $itemHeight Global $itemWidth Global $invLock[40] For $i = 0 to 39 $invLock[$i] = 0 Next Global $spaceCheck[5][2] ;first dimension specifies which pixel # (0-4), second specifies whether x/y (0/1) $spaceCheck[0][0] = 0 $spaceCheck[0][1] = -8 $spaceCheck[1][0] = -8 $spaceCheck[1][1] = 0 $spaceCheck[2][0] = 0 $spaceCheck[2][1] = 0 $spaceCheck[3][0] = 8 $spaceCheck[3][1] = 0 $spaceCheck[4][0] = 0 $spaceCheck[4][1] = 8 ;sets the coordinates to operate within the active window AutoItSetOption(""MouseCoordMode"", 0) AutoItSetOption(""PixelCoordMode"", 0) ;read in user specifications $slotToUse = MyIniRead(""pindlebot.ini"", ""Global"", ""SlotToUse"", """") If (StringLen($slotToUse) = 0) Then $slotToUse = InputBox(""Rishodi's Pindlebot v"" & $version, ""Use which configured slot?"", ""slot1"") If NOT (@error = 0) Then Exit EndIf EndIf TrayTip(""RPB v"" & $version, ""Rishodi's Pindlebot v"" & $version & Chr(10) & ""Reading configuration..."", 6, 17) ;read in specific slot configuration $account = MyIniRead(""pindlebot.ini"", $slotToUse, ""Account"", """") $password = MyIniRead(""pindlebot.ini"", $slotToUse, ""Password"", """") $charPosition = MyIniRead(""pindlebot.ini"", $slotToUse, ""CharPosition"", """") $difficulty = MyIniRead(""pindlebot.ini"", $slotToUse, ""Difficulty"", ""3"") $precast1 = MyIniRead(""pindlebot.ini"", $slotToUse, ""Precast1"", """") $precast2 = MyIniRead(""pindlebot.ini"", $slotToUse, ""Precast2"", """") $teleport = MyIniRead(""pindlebot.ini"", $slotToUse, ""Teleport"", """") $attackSequence = MyIniRead(""pindlebot.ini"", $slotToUse, ""AttackSequence"", """") $needMerc = MyIniRead(""pindlebot.ini"", $slotToUse, ""NeedMerc"", 0) $healLife = Abs(MyIniRead(""pindlebot.ini"", $slotToUse, ""HealLife"", 0)) $chickenLife = Abs(MyIniRead(""pindlebot.ini"", $slotToUse, ""ChickenLife"", 0)) ;global configurations $d2path = MyIniRead(""pindlebot.ini"", ""Global"", ""D2Path"", RegRead(""HKEY_CURRENT_USER\\Software\\Blizzard Entertainment\\Diablo II"", ""InstallPath"")) If (StringRight($d2path, 1) = ""\\"") Then $d2path = StringTrimRight($d2path, 1) EndIf $d2exe = MyIniRead(""pindlebot.ini"", ""Global"", ""D2Exe"", ""Diablo II.exe"") $d2parameters = MyIniRead(""pindlebot.ini"", ""Global"", ""D2Parameters"", """") $d2WinTitle = MyIniRead(""pindlebot.ini"", ""Global"", ""D2WinTitle"", ""Diablo II"") If (StringLen($d2WinTitle) = 0) Then $d2WinTitle = ""D2Loader v1.10b14 Build On Oct 29 2003"" EndIf $gameName[0] = MyIniRead(""pindlebot.ini"", ""Global"", ""GameName"", StringLeft($account, 3)) $pauseButton = MyIniRead(""pindlebot.ini"", ""Global"", ""PauseButton"", ""{PAUSE}"") HotKeySet($pauseButton, ""PauseScript"") ;sets hotkey to pause script $awayMessage = MyIniRead(""pindlebot.ini"", ""Global"", ""AwayMessage"", """") $moveWindow = MyIniRead(""pindlebot.ini"", ""Global"", ""MoveWindow"", ""0"") $usePickit = MyIniRead(""pindlebot.ini"", ""Global"", ""UsePickit"", ""1"") If ($usePickit = 1) Then ;find the magic character $magicChar = FindValue($d2path & ""\\Plugin\\zoid.ini"", ""MagicChar"", ""."") EndIf $noPickup = MyIniRead(""pindlebot.ini"", ""Global"", ""NoPickup"", """") $groundSelect = FindValue($d2path & ""\\Plugin\\zoid.ini"", ""GroundSelect"", ""TRUE"") If (StringLen($noPickup) = 0) Then If (($groundSelect = ""FALSE"") OR ($groundSelect = ""0"")) Then $noPickup = 0 Else $noPickup = 1 EndIf EndIf $runs = MyIniRead(""pindlebot.ini"", ""Global"", ""Runs"", ""-1"") $maxVariance = .01 * MyIniRead(""pindlebot.ini"", ""Global"", ""MaxVariance"", ""20"") $runInterval = MyIniRead(""pindlebot.ini"", ""Global"", ""RunInterval"", ""200"") $intervalVariance = MyIniRead(""pindlebot.ini"", ""Global"", ""IntervalVariance"", ""50"") $sleepTime = MyIniRead(""pindlebot.ini"", ""Global"", ""SleepTime"", ""900"") $sleepVariance = MyIniRead(""pindlebot.ini"", ""Global"", ""SleepVariance"", ""600"") $stash = MyIniRead(""pindlebot.ini"", ""Global"", ""Stash"", ""10"") ;reads in user-configured delays $dMouseClick = MyIniRead(""pindlebot.ini"", ""Delays"", ""dMouseClick"", ""300"") $dStashDelay = MyIniRead(""pindlebot.ini"", ""Delays"", ""dStashDelay"", ""750"") $dGetCorpse = MyIniRead(""pindlebot.ini"", ""Delays"", ""dGetCorpse"", ""1500"") $dPickUpItems = MyIniRead(""pindlebot.ini"", ""Delays"", ""dPickUpItems"", ""4500"") $dCloseD2 = MyIniRead(""pindlebot.ini"", ""Delays"", ""dCloseD2"", ""5000"") ;read in color checks in advanced.ini $loginCheck = MyIniRead(""advanced.ini"", ""ColorChecks"", ""Login"", ""4739160"") $charSelectCheck = MyIniRead(""advanced.ini"", ""ColorChecks"", ""CharSelect"", ""6579300"") $chatCheck = MyIniRead(""advanced.ini"", ""ColorChecks"", ""Chat"", ""4739160"") $inGameCheck = MyIniRead(""advanced.ini"", ""ColorChecks"", ""InGame"", ""4753584"") $inact4 = MyIniRead(""advanced.ini"", ""ColorChecks"", ""InAct4"", ""6842472"") $deathCheck = MyIniRead(""advanced.ini"", ""ColorChecks"", ""Death"", ""1317980"") $mercInAct5 = MyIniRead(""advanced.ini"", ""ColorChecks"", ""MercInAct5"", ""33792"") $stashOpen = MyIniRead(""advanced.ini"", ""ColorChecks"", ""StashOpen"", ""11059396"") $fullRejuv = MyIniRead(""advanced.ini"", ""ColorChecks"", ""FullRejuv"", ""6824048"") $rejuv = MyIniRead(""advanced.ini"", ""ColorChecks"", ""Rejuv"", ""8158332"") $supHeal = MyIniRead(""advanced.ini"", ""ColorChecks"", ""SupHeal"", ""144"") $greaterHeal = MyIniRead(""advanced.ini"", ""ColorChecks"", ""GreaterHeal"", ""5526724"") $supMana1 = MyIniRead(""advanced.ini"", ""ColorChecks"", ""SupMana1"", ""9711664"") $supMana2 = MyIniRead(""advanced.ini"", ""ColorChecks"", ""SupMana2"", ""4739160"") $greaterMana = MyIniRead(""advanced.ini"", ""ColorChecks"", ""GreaterMana"", ""14180388"") ;read in mouse click settings in advanced.ini $portalX = MyIniRead(""advanced.ini"", $slotToUse, ""PortalX"", ""337"") $portalY = MyIniRead(""advanced.ini"", $slotToUse, ""PortalY"", ""230"") $lastTeleX = MyIniRead(""advanced.ini"", $slotToUse, ""LastTeleX"", ""692"") $lastTeleY = MyIniRead(""advanced.ini"", $slotToUse, ""LastTeleY"", ""141"") $attackX = MyIniRead(""advanced.ini"", $slotToUse, ""AttackX"", ""602"") $attackY = MyIniRead(""advanced.ini"", $slotToUse, ""AttackY"", ""138"") $grabClickX = MyIniRead(""advanced.ini"", $slotToUse, ""GrabClickX"", ""612"") $grabClickY = MyIniRead(""advanced.ini"", $slotToUse, ""GrabClickY"", ""145"") ;read in min/max delays in advanced.ini $bnetConnectMin = MyIniRead(""advanced.ini"", ""Delays"", ""BNetConnectMin"", ""800"") $bnetConnectMax = MyIniRead(""advanced.ini"", ""Delays"", ""BNetConnectMax"", ""5000"") $loginMin = MyIniRead(""advanced.ini"", ""Delays"", ""LoginMin"", ""1200"") $loginMax = MyIniRead(""advanced.ini"", ""Delays"", ""LoginMax"", ""6000"") $charSelectMin = MyIniRead(""advanced.ini"", ""Delays"", ""CharSelectMin"", ""400"") $charSelectMax = MyIniRead(""advanced.ini"", ""Delays"", ""CharSelectMax"", ""8000"") $createGameMin = MyIniRead(""advanced.ini"", ""Delays"", ""CreateGameMin"", ""600"") $createGameMax = MyIniRead(""advanced.ini"", ""Delays"", ""CreateGameMax"", ""10000"") $runningMin = MyIniRead(""advanced.ini"", ""Delays"", ""RunningMin"", ""400"") $runningMax = MyIniRead(""advanced.ini"", ""Delays"", ""RunningMax"", ""3000"") $enterPortalMin = MyIniRead(""advanced.ini"", ""Delays"", ""EnterPortalMin"", ""1200"") $exitGameMin = MyIniRead(""advanced.ini"", ""Delays"", ""ExitGameMin"", ""1200"") $exitGameMax = MyIniRead(""advanced.ini"", ""Delays"", ""ExitGameMax"", ""6000"") ;reads in misc delays in advanced.ini $mouseSpeed = MyIniRead(""advanced.ini"", ""Misc"", ""MouseSpeed"", ""1"") $portalMouseSpeed = MyIniRead(""advanced.ini"", ""Misc"", ""PortalMouseSpeed"", ""4"") $stashMouseSpeed = MyIniRead(""advanced.ini"", ""Misc"", ""StashMouseSpeed"", ""6"") $healPeriod = MyIniRead(""advanced.ini"", ""Misc"", ""HealPeriod"", ""250"") ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; General Diablo II Functions ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Func WinSize() If WinActive($d2WinTitle, """") Then $winSize = WinGetPos($d2WinTitle, """") $borderWidth = ($winSize[2] - 800) / 2 $titleHeight = $winSize[3] - 600 - (2 * $borderWidth) Else MsgBox(48, ""Rishodi's Pindlebot v"" & $version, 'Could not locate Diablo II window. Setting offsets to default, or previous values if valid.', 5) EndIf EndFunc Func StartD2() Run($d2path & ""\\"" & $d2exe & "" "" & $d2parameters & ' -title ""' & $d2WinTitle & '""', $d2path) WinWait($d2WinTitle, """", 20) ActivateD2() WinSize() Wait(401, 522, $loginCheck, $bnetConnectMin, $bnetConnectMax) EndFunc Func MyCloseProcess($process) While ProcessExists($process) ProcessClose($process) ProcessWaitClose($process, 5) WEnd EndFunc Func MyCloseWindow($win, $text) While WinExists($win, $text) WinClose($win, $text) WinWaitClose($win, $text, 5) WEnd EndFunc Func CloseD2($delay) MyCloseProcess(""Diablo II.exe"") MyCloseProcess(""D2Loader.exe"") MyCloseProcess(""Game.exe"") MyCloseWindow(""Diablo II"", """") MyCloseWindow(""D2Loader"", """") MyCloseWindow(""Game"", """") MyCloseWindow(""Diablo II Exception"", """") MyCloseWindow(""Diablo II Error"", """") MyCloseWindow(""Loader Error!"", """") MyCloseWindow(""D2Loader Error!"", """") MyCloseWindow(""D2Loader Exception"", """") MyCloseWindow(""D2Loader Error"", """") MyCloseWindow(""Hey guys"", """") MyCloseWindow(""Microsoft Visual C++ Debug Library"", """") MyCloseWindow(""End Program - "" & $d2wintitle, """") MyCloseWindow($d2WinTitle, """") MyCloseProcess($d2WinTitle) MyCloseWindow($d2exe, """") MyCloseProcess($d2exe) MyCloseWindow(""D2stats"", """") MyCloseWindow(""D2stats.exe"", """") MySleep($delay) EndFunc Func Quit() AdlibDisable() CloseD2(1) ;doesn't sleep after closing D2 processes Exit EndFunc Func ActivateD2() MySleep(750) WinActivate($d2WinTitle, """") ;activating window WinWaitActive($d2WinTitle, """", 5) If ($moveWindow = 1) Then WinMove($d2WinTitle, """", 0, 0) EndIf MySleep(1000) EndFunc Func MyIniRead($file, $section, $key, $default) Local $tempValue = IniRead($file, $section, $key, $default) If (StringLen($tempValue) = 0) Then $tempValue = $default EndIf Return $tempValue EndFunc Func MyRMouseClick($button, $x, $y, $xFactor, $yFactor, $speed) MyRMouseMove($x, $y, $xFactor, $yFactor, $speed) MouseClick($button) EndFunc Func MyRMouseMove($x, $y, $xFactor, $yFactor, $speed) MyMouseMove(Random($x - $xFactor, $x + $xFactor), Random($y - $yFactor, $y + $yFactor), $speed) EndFunc Func MyMouseClick($button, $x, $y, $speed) MyMouseMove($x, $y, $speed) MouseClick($button) EndFunc Func MyMouseMove($x, $y, $speed) $x = $x + $borderWidth $y = $y + $titleHeight + $borderWidth MouseMove($x, $y, $speed) EndFunc Func MyPixelGetColor($coordX, $coordY) $coordX = $coordX + $borderWidth $coordY = $coordY + $titleHeight + $borderWidth Return PixelGetColor($coordx, $coordy) EndFunc Func MyPixelSearch($leftX, $topY, $rightX, $bottomY, $tempColor) $leftX = $leftX + $borderWidth $topY = $topY + $titleHeight + $borderWidth $rightX = $rightX + $borderWidth $bottomY = $bottomY + $titleHeight + $borderWidth Return PixelSearch($leftX, $topY, $rightX, $bottomY, $tempColor) EndFunc Func MySleep($delay) If ($maxVariance = 0) Then Sleep($delay) Else Sleep(Random($delay, $delay * (1 + $maxVariance))) EndIf EndFunc Func Modulo($int1, $int2) ;performs the modulo operation: $int1 % $int2 for whole numbers only Return $int1 - $int2 * Int($int1 / $int2) EndFunc Func BotSleep($time) AdlibDisable() CloseD2($dCloseD2) ;$time in seconds For $i = 0 to $time $remaining = $time - $i $hours = Int($remaining/3600) If ($hours < 10) Then $hours = ""0"" & $hours EndIf $minutes = Modulo(Int($remaining/60), 60) If ($minutes < 10) Then $minutes = ""0"" & $minutes EndIf $seconds = Modulo($remaining, 60) If ($seconds < 10) Then $seconds = ""0"" & $seconds EndIf TrayTip(""RPB v"" & $version, ""Script is sleeping."" & Chr(10) & ""Remaining time: "" & $hours & "":"" & $minutes & "":"" & $seconds, 1, 17) Sleep(1000) Next TrayTip(""RPB v"" & $version, ""Resuming script..."", 6, 17) StartD2() AdlibEnable(""GameCheck"", $healPeriod) EndFunc Func PauseScript() ;pauses script due to user action AdlibDisable() If ($marker = 1) Then $pauseStart = TimerStart() EndIf $quit = MsgBox(51, ""Rishodi's Pindlebot v"" & $version, ""RPB script is paused. Do you wish to continue runs?"" & Chr(10) & Chr(10) & ""Press 'Yes' to continue runs, 'No' to immediately exit, or 'Cancel' to quit after finishing the current run. RPB script will automatically resume in 30 seconds."", 30) If ($quit = 7) Then Quit() EndIf ActivateD2() If ($marker = 1) Then $pauseTime = $pauseTime + Int(TimerStop($pauseStart)) EndIf AdlibEnable(""GameCheck"", $healPeriod) EndFunc Func GameCheck() If NOT (WinActive($d2WinTitle, """")) Then If WinExists($d2WinTitle, """") Then Send($pauseButton) EndIf ElseIf ($inTemple = 1) AND ($healLife > 0) Then GetStats() HealthCheck() EndIf EndFunc Func FindValue($ini, $setting, $default) ;opens the $ini file and returns the value of the specified $setting ;returns $default if the setting is not found $file = FileOpen($ini, 0) If ($file = -1) Then Return $default EndIf Local $value = $default While 1 $line = FileReadLine($file) If (@error = -1) Then ExitLoop EndIf $string = StringInStr($line, $setting) If NOT ($string = 0) Then $value = StringTrimLeft($line, StringInStr($line, ""="")) While (StringLeft($value, 1) = "" "") $value = StringTrimLeft($value, 1) WEnd $valueLength = StringInStr($value, "";"") $value = StringLeft($value, $valueLength - 1) While (StringRight($value, 1) = "" "") $value = StringTrimRight($value, 1) WEnd If ((StringLeft($value, 1) == '""') AND (StringRight($value, 1) = '""')) Then $value = StringTrimLeft(StringTrimRight($value, 1), 1) EndIf ExitLoop EndIf WEnd FileClose($file) Return $value EndFunc ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; In-Game Management and Detection Functions ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Func PotionTest($x, $y) ;checks to see if a potion is in the inv or belt at x,y ;returns 1 if it finds a rejuv ;returns 2 if it finds a healing potion ;returns 3 if it finds a mana potion ;returns 0 if it doesn't find a recognizable potion $color = MyPixelGetColor($x, $y) Select Case ($color = $fullRejuv) Return 1 Case ($color = $rejuv) Return 1 Case ($color = $supHeal) Return 2 Case ($color = $greaterHeal) Return 2 Case ($color = $supMana1) AND (MyPixelGetColor($x, $y+1) = $supMana2) Return 3 Case ($color = $greaterMana) Return 3 Case Else Return 0 EndSelect EndFunc Func FindPotInBelt($type) ;if $type is 2 (health) then searches for health or rejuv ;if $type is 3 (mana) then searches for mana or rejuv ;returns the belt slot (1-4) of the nearest viable potion, 0 if none is found $x=437 $y=576 $healSlot=1 While $x < 530 $pot = PotionTest($x, $y) If ($pot = 1) OR ($pot = $type) Then Return $healSlot EndIf $x = $x + 31 $healSlot = $healSlot + 1 WEnd Return 0 EndFunc Func SendHotKey($hotkey) If (StringLeft($hotkey, 1) = ""F"") AND (StringLen($hotkey) > 1) Then Send(""{"" & $hotkey & ""}"") ElseIf ($hotkey = ""NULL"") Then ;don't send a hotkey Else Send($hotkey) EndIf EndFunc Func GetStats() Run(""d2stats.exe"") EndFunc Func HealthCheck() If ($lastPotUse > 0) Then $lastPotUse = $lastPotUse - 1 EndIf $currentHealth = Abs(MyIniRead(""d2stats.ini"", ""Current"", ""Health"", """")) If ($currentHealth < $healLife) AND NOT ($currentHealth = 0) Then If ($currentHealth < $chickenLife) AND ($chickenLife > 0) Then ;chicken out of game ExitGame() TrayTip(""RPB v"" & $version, ""Chickened out of game!"" & Chr(10) & ""Health was at "" & $currentHealth, 6, 17) $lastGameChicken = 1 $inTemple = 0 $totalChickens = MyIniRead(""statistics.ini"", $slotToUse, ""TotalChickens"", ""0"") + 1 $lastChickens = MyIniRead(""statistics.ini"", $slotToUse, ""LastChickens"", ""0"") + 1 IniWrite(""statistics.ini"", $slotToUse, ""TotalChickens"", $totalChickens) IniWrite(""statistics.ini"", $slotToUse, ""LastChickens"", $lastChickens) ElseIf ($lastPotUse = 0) Then $healSlot = FindPotInBelt(2) If NOT ($healSlot = 0) Then Send($healSlot) $lastPotUse = 4 EndIf EndIf ElseIf ($currentHealth = 0) Then ;character is no longer in a game $inTemple = 0 EndIf EndFunc Func MercHealthCheck() If NOT ($needMerc = 0) AND ($mercAlive = 1) AND NOT (MyPixelGetColor(23, 17) = $mercInAct5) Then $healSlot = FindPotInBelt(2) If NOT ($healSlot = 0) Then Send(""+"" & $healSlot) EndIf EndIf EndFunc Func ResMerc() MyRMouseClick(""left"", 97, 511, 2, 2, $mouseSpeed) ;go to wp RunningWait($runningMin, $runningMax) MyRMouseClick(""left"", 222, 511, 2, 2, $mouseSpeed) RunningWait($runningMin, $runningMax) MyRMouseClick(""left"", 311, 352, 32, 17, $mouseSpeed) ;click on wp MySleep(1000) MyRMouseClick(""left"", 303, 78, 24, 7, $mouseSpeed) ;click on ""IV"" tab MySleep($dMouseClick) MyRMouseClick(""left"", 112, 136, 9, 9, $mouseSpeed) ;click on ""Pandemonium Fortress"" MySleep(4000) MyMouseClick(""left"", 216, 202, $mouseSpeed) ;runs up between poles RunningWait($runningMin, $runningMax) MyMouseClick(""left"", 231, 168, $mouseSpeed) ;run to Tyreal RunningWait($runningMin, $runningMax) MyMouseClick(""left"", 368, 215, $mouseSpeed) ;click on Tyreal MySleep(2500) Send(""{UP}"") MySleep(500) Send(""{UP}"") MySleep(500) Send(""n"") ;clears all in-game messages MySleep(500) $tempColor = MyPixelGetColor(23, 17) Send(""{ENTER}"") ;resurrects merc MySleep(3000) Send(""n"") ;clears all in-game messages MySleep(250) If (MyPixelGetColor(23, 17) = $tempColor) Then ;merc was not resurrected, possibly b/c character didn't have enough gold Send(""{ENTER}"") MySleep(1000) If ($needMerc = 2) Then ExitGame() $mercResAttempts = $mercResAttempts + 1 If ($mercResAttempts = 5) Then Quit() EndIf EndIf Else TrayTip(""RPB v"" & $version, ""Mercenary resurrected."", 6, 17) $mercResAttempts = 0 $mercAlive = 1 EndIf MySleep(1000) Send(""{SPACE}"") MySleep(1500) MyMouseClick(""left"", 368, 215, $mouseSpeed) ;click on Tyrael again MySleep(2500) If ($mercAlive = 0) Then Send(""{UP}"") MySleep(500) EndIf Send(""{UP}"") MySleep(500) Send(""{UP}"") ;point to Travel to Harrogath MySleep(500) Send(""{ENTER}"") ;goes back to act 5 MySleep(4000) EndFunc Func GoToActFive() MyRMouseClick(""left"", 707, 51, 50, 20, $mouseSpeed) RunningWait($runningMin, $runningMax) MyRMouseClick(""left"", 364, 78, 25, 9, $mouseSpeed) MySleep(1000) MyRMouseClick(""left"", 112, 136, 10, 10, $mouseSpeed) MySleep(3500) EndFunc Func Precast($precast) If (StringLen($precast) > 0) Then $sequence = StringSplit(StringTrimRight($precast, 1), "";"") For $i = 1 to $sequence[0] ;precast sequence $spell = StringSplit($sequence[$i], "","") ;$spell[1] is the spell hotkey, $spell[2] is the delay If NOT ($spell[1] = ""NULL"") Then SendHotKey($spell[1]) MySleep($dMouseClick) MyRMouseClick(""right"", 397, 271, 150, 100, $mouseSpeed) EndIf MySleep($spell[2]) Next EndIf EndFunc ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; Auto-Delay Functions ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Func Wait($x, $y, $color, $minDelay, $maxDelay) ; sleeps for a maximum delay ($maxDelay) or until the pixel at ($x, $y) is a certain color ($color) ; if $minDelay = $maxDelay then it will sleep for a set period of time If NOT ($maxDelay = $minDelay) Then If ($minDelay > 0) Then MySleep($minDelay - 200) EndIf $maxDelay = ($maxDelay - $minDelay) / 200 $time = 0 Do MySleep(200) $time = $time + 1 If ($time = $maxDelay) Then ExitLoop EndIf Until (MyPixelGetColor($x, $y) = $color) Else Sleep($minDelay) EndIf EndFunc Func RunningWait($minDelay, $maxDelay) ; sleeps for a maximum delay ($maxDelay) or until character no longer appears to be moving ; recommended minimum $maxDelay is 2000 If NOT ($maxDelay = $minDelay) Then If ($minDelay > 0) Then MySleep($minDelay - 200) EndIf $maxDelay = ($maxDelay - $minDelay) / 200 $time = 0 Local $runMatrix[2][4] Do $count = 0 $time = $time + 1 $runMatrix[0][0] = MyPixelGetColor(250, 200) $runMatrix[0][1] = MyPixelGetColor(550, 200) $runMatrix[0][2] = MyPixelGetColor(250, 400) $runMatrix[0][3] = MyPixelGetColor(550, 400) MySleep(200) $runMatrix[1][0] = MyPixelGetColor(250, 200) $runMatrix[1][1] = MyPixelGetColor(550, 200) $runMatrix[1][2] = MyPixelGetColor(250, 400) $runMatrix[1][3] = MyPixelGetColor(550, 400) For $i = 0 to 3 If ($runMatrix[0][$i] = $runMatrix[1][$i]) Then $count = $count + 1 EndIf Next If ($count > 2) Then ExitLoop EndIf Until ($time = $maxDelay) Else Sleep($minDelay) EndIf EndFunc ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; Stashing Functions ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Func GridPos($x, $y) ;returns grid # of space in inventory or stash when given an x, y location If $x > 400 Then ;inventory Return 10*(($y-329)/29) + ($x-433)/29 Else ;stash Return 6*(($y-156)/29) + ($x-168)/29 EndIf EndFunc Func EmptySpace($gridName, $x, $y) For $i = 0 to 4 If NOT (MyPixelGetColor($x + $spaceCheck[$i][0], $y + $spaceCheck[$i][1]) = MyIniRead(""advanced.ini"", $gridName, GridPos($x, $y) & ""_"" & $i, """")) Then Return 0 EndIf Next Return 1 EndFunc Func FindItemSize($x, $y) Select Case $y = 416 $maxHeight = 0 Case $y = 387 $maxHeight = 1 Case $y = 358 $maxHeight = 2 Case $y = 329 $maxHeight = 3 EndSelect $itemHeight = 0 While $itemHeight < $maxHeight If EmptySpace(""Inventory"", $x, $y+29*($itemHeight+1)) Then ExitLoop EndIf $itemHeight = $itemHeight + 1 WEnd If $x = 694 Then $itemWidth = 0 Else If NOT (EmptySpace(""Inventory"", $x + 29, $y)) Then $itemWidth = 1 Else $itemWidth = 0 EndIf EndIf MyMouseClick(""left"", $x, $y, $stashMouseSpeed) MySleep($dStashDelay) MyMouseMove(380, 50, $stashMouseSpeed) MySleep($dStashDelay) If ($itemWidth = 1) AND NOT (EmptySpace(""Inventory"", $x + 29, $y)) Then $itemWidth = 0 EndIf While $itemHeight > 0 If NOT (EmptySpace(""Inventory"", $x, $y+29*$itemHeight)) Then $itemHeight = $itemHeight - 1 Else ExitLoop EndIf WEnd EndFunc Func SpaceFound($stashx, $stashy) $tempHeight = 0 While $tempHeight <= $itemHeight $tempWidth = 0 While $tempWidth <= $itemWidth If NOT (EmptySpace(""Stash"", $stashx+29*$tempWidth, $stashy+29*$tempHeight)) Then Return 0 EndIf $tempWidth = $tempWidth + 1 WEnd $tempHeight = $tempHeight + 1 WEnd Return 1 EndFunc Func StashItem($x, $y) $itemStashed = 0 $stashY = 156 While $stashY <= 359 $stashX = 168 While $stashX <= 313 If EmptySpace(""Stash"", $stashX, $stashY) Then If SpaceFound($stashX, $stashY) Then MyMouseClick(""left"", ($stashX*2+29*$itemWidth)/2, ($stashY*2+29*$itemHeight)/2, $stashMouseSpeed) MySleep($dStashDelay) $itemStashed = 1 ExitLoop(2) EndIf EndIf $stashX = $stashX + 29 WEnd $stashY = $stashY + 29 WEnd If ($itemStashed = 0) Then ;no room for item in stash MyMouseClick(""left"", ($x*2+29*$itemWidth)/2, ($y*2+29*$itemHeight)/2, $stashMouseSpeed) ;puts item back in inventory $tempHeight = 0 For $tempHeight = 0 to $itemHeight $tempWidth = 0 For $tempWidth = 0 to $itemWidth $invLock[GridPos($x+29*$tempWidth, $y+29*$tempHeight)] = 1 ;locks item in inventory Next Next MySleep($dStashDelay) EndIf EndFunc Func Stash() MyRMouseClick(""left"", 493, 462, 10, 9, $mouseSpeed) MySleep($dMouseClick) Send(""{ENTER}"") MySleep($dMouseClick) $y = 329 While $y <= 416 $x = 433 While $x <= 694 MyMouseMove(380, 50, $mouseSpeed) If NOT (EmptySpace(""Inventory"", $x, $y)) AND $invLock[GridPos($x, $y)] = 0 Then FindItemSize($x, $y) StashItem($x, $y) EndIf $x = $x + 29 WEnd $y = $y + 29 WEnd EndFunc ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; Main Loop Functions ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Func Login() MyRMouseClick(""left"", 414, 334, 50, 5, $mouseSpeed) Send(""^a"") Send(""{DEL}"") Send($account, 1) MySleep(100) Send(""{TAB}"") MySleep(100) Send($password, 1) MySleep($dMouseClick) MyRMouseClick(""left"", 401, 469, 105, 9, $mouseSpeed) Wait(557, 486, $charSelectCheck, $loginMin, $loginMax) EndFunc Func CharacterSelect() Select Case $charPosition = 1 MyRMouseClick(""left"", 172, 134, 129, 39, $mouseSpeed) Case $charPosition = 2 MyRMouseClick(""left"", 444, 134, 129, 39, $mouseSpeed) Case $charPosition = 3 MyRMouseClick(""left"", 172, 227, 129, 39, $mouseSpeed) Case $charPosition = 4 MyRMouseClick(""left"", 444, 227, 129, 39, $mouseSpeed) Case $charPosition = 5 MyRMouseClick(""left"", 172, 320, 129, 39, $mouseSpeed) Case $charPosition = 6 MyRMouseClick(""left"", 444, 320, 129, 39, $mouseSpeed) Case $charPosition = 7 MyRMouseClick(""left"", 172, 413, 129, 39, $mouseSpeed) Case $charPosition = 8 MyRMouseClick(""left"", 444, 413, 129, 39, $mouseSpeed) EndSelect Sleep(50) MouseClick(""left"") Wait(555, 461, $chatCheck, $charSelectMin, $charSelectMax) EndFunc Func CreateGame() MyRMouseClick(""left"", 593, 459, 59, 9, $mouseSpeed) MySleep($dMouseClick) MyRMouseClick(""left"", 511, 152, 78, 9, $mouseSpeed) MySleep($dMouseClick) Send($gameName[0]) Send($gameName[1]) $gameName[1] = Modulo($gameName[1] + 1, 100) MySleep($dMouseClick) Send(""{TAB}"") MySleep($dMouseClick) Send(Round(Random(1000, 999999), 0)) MySleep($dMouseClick) MyRMouseClick(""left"", 681, 418, 82, 12, $mouseSpeed) Wait(274, 573, $inGameCheck, $createGameMin, $createGameMax) EndFunc Func PrePindle() ;performs a variety of functions before going to red portal If ($away = 0) AND NOT (StringLen($awayMessage) = 0) Then ;types in away message Send(""{ENTER}"") MySleep($dMouseClick) Send(""/dnd "" & $awayMessage) MySleep($dMouseClick) Send(""{ENTER}"") $away = 1 EndIf If (MyPixelGetColor(529, 311) = $inAct4) Then GoToActFive() ExitGame() Else $totalRuns = MyIniRead(""statistics.ini"", $slotToUse, ""TotalRuns"", ""0"") + 1 $lastRuns = MyIniRead(""statistics.ini"", $slotToUse, ""LastRuns"", ""0"") + 1 IniWrite(""statistics.ini"", $slotToUse, ""TotalRuns"", $totalRuns) IniWrite(""statistics.ini"", $slotToUse, ""LastRuns"", $lastRuns) TrayTip(""RPB v"" & $version & "" Stats"", ""Run #"" & $lastRuns & Chr(10) & ""Runs Completed: "" & $lastCompleted & Chr(10) & ""Success Rate: "" & MyIniRead(""statistics.ini"", $slotToUse, ""LastSuccessRate"", """") & Chr(10) & ""Deaths: "" & $lastDeaths & Chr(10) & ""Chickens: "" & $lastChickens & Chr(10) & ""Last Run Time: "" & Round($runTime/1000, 3), 6, 17) If ($usePickit = 1) Then Send(""{ENTER}"") ;turns off pickit until after attack sequence MySleep($dMouseClick) Send($magicChar & ""set pickit 0"") MySleep($dMouseClick) Send(""{ENTER}"") If ($noPickup = 1) Then MySleep($dMouseClick) Send(""{ENTER}"") MySleep($dMouseClick) Send($magicChar & ""set gselect 0"") MySleep($dMouseClick) Send(""{ENTER}"") EndIf MySleep($dMouseClick) EndIf Send(""i"") MySleep($dMouseClick) MyMouseMove(350, 350, $mouseSpeed) If NOT (MyPixelGetColor(547, 171) = $corpseCheck) AND NOT ($lastCompleted = 0) Then ;character death on last run $totalDeaths = MyIniRead(""statistics.ini"", $slotToUse, ""TotalDeaths"", ""0"") + 1 $lastDeaths = MyIniRead(""statistics.ini"", $slotToUse, ""LastDeaths"", ""0"") + 1 IniWrite(""statistics.ini"", $slotToUse, ""TotalDeaths"", $totalDeaths) IniWrite(""statistics.ini"", $slotToUse, ""LastDeaths"", $lastDeaths) IniWrite(""statistics.ini"", $slotToUse, ""TotalCompleted"", $totalCompleted - 1) IniWrite(""statistics.ini"", $slotToUse, ""LastCompleted"", $lastCompleted - 1) MyRMouseClick(""left"", 200, 281, 2, 5, $mouseSpeed) ;picks up corpse MySleep($dGetCorpse) Send(""{SHIFTDOWN}"") $y = 329 While $y <= 416 ;puts pots back in belt $x = 433 While $x <= 694 If NOT (PotionTest($x, $y) = 0) Then MyRMouseClick(""left"", $x, $y, 5, 5, $mouseSpeed) MySleep($dMouseClick) EndIf $x = $x + 29 WEnd $y = $y + 29 WEnd Send(""{SHIFTUP}"") EndIf $y = 329 While $y <= 416 ;uses pots in inventory $x = 433 While $x <= 694 If NOT (PotionTest($x, $y) = 0) Then MyRMouseClick(""right"", $x, $y, 5, 5, $mouseSpeed) MySleep($dMouseClick) EndIf $x = $x + 29 WEnd $y = $y + 29 WEnd MyMouseMove(350, 350, $mouseSpeed) If ($lastCompleted = 0) Then ;on the first run $corpseCheck = MyPixelGetColor(547, 171) $y = 329 While $y <= 416 $x = 433 While $x <= 694 If NOT (EmptySpace(""Inventory"", $x, $y)) Then $invLock[GridPos($x, $y)] = 1 ;locks charms, etc. in inventory EndIf $x = $x + 29 WEnd $y = $y + 29 WEnd EndIf Send(""i"") MySleep($dMouseClick) If NOT ($needMerc = 0) Then ;resurrects merc if it died If (MyPixelGetColor(23, 17) = $mercInAct5) Then $mercAlive = 1 ;merc is alive, do nothing Else $mercAlive = 0 ResMerc() EndIf EndIf Send(""{SPACE}"") ;makes sure screen is clear, e.g. inv is not still up If ($healLife > 0) Then RunWait(""d2stats.exe"") ;uses a potion from belt, if necessary $currenthealth = Abs(MyIniRead(""d2stats.ini"", ""Current"", ""Health"", """")) If ($currenthealth < $healLife) Then $healSlot = FindPotInBelt(2) Send($healSlot) EndIf EndIf EndIf EndFunc Func MoveToPortal() $stashCount = $stashCount + 1 MyRMouseClick(""left"", 97, 511, 2, 2, $mouseSpeed) ;goes down 1st set of stairs RunningWait($runningMin, $runningMax) MyRMouseClick(""left"", 216, 511, 2, 2, $mouseSpeed) ;goes down 2nd set of stairs RunningWait($runningMin, $runningMax) If ($stashCount = $stash) AND NOT ($stash = 0) Then MyMouseClick(""left"", 681, 336, $mouseSpeed) ;click on stash RunningWait($runningMin, $runningMax) Send(""n"") ;clears all in-game messages Wait(168, 93, $stashOpen, 400, 3000) If (MyPixelGetColor(168, 93) = $stashOpen) Then Stash() $stashCount = 0 Else $stashCount = $stashCount - 1 EndIf Do Send(""{SPACE}"") MySleep($dMouseClick) Until NOT (MyPixelGetColor(168, 93) = $stashOpen) MyRMouseClick(""left"", 148, 223, 2, 2, $mouseSpeed) ;return to normal path RunningWait($runningMin, $runningMax) EndIf MyRMouseClick(""left"", 197, 533, 2, 2, $mouseSpeed) ;runs across wp RunningWait($runningMin, $runningMax) MyRMouseClick(""left"", 202, 536, 2, 2, $mouseSpeed) ;runs to tree RunningWait($runningMin, $runningMax) MyRMouseClick(""left"", 47, 301, 2, 2, $mouseSpeed) ;runs past tree to portal RunningWait($runningMin, $runningMax) EndFunc Func EnterPortal() Precast($precast1) ;precast before entering portal RunWait(""d2stats.exe"") MyRMouseClick(""left"", $portalX, $portalY, 2, 2, $portalMouseSpeed) ;enter portal RunningWait($enterPortalMin, $runningMax) Precast($precast2) ;precast after entering portal EndFunc() Func GoToPindle() $teleTemp = StringSplit(StringTrimRight($teleport, 1), "","") ;$teleTemp[1] is the teleport hotkey, $teleTemp[2] is the delay SendHotKey($teleTemp[1]) ;teleporting to pindleskin MySleep($dMouseClick) MyRMouseClick(""right"", 747, 21, 2, 2, $mouseSpeed) MySleep($teleTemp[2]) MyRMouseClick(""right"", 747, 21, 2, 2, $mouseSpeed) MySleep($teleTemp[2]) MyRMouseClick(""right"", $lastTeleX, $lastTeleY, 2, 2, $mouseSpeed) MySleep($teleTemp[2]) $inTemple = 1 EndFunc Func Attack() $attacks = StringSplit(StringTrimRight($attackSequence, 1), "";"") Local $mouseButton For $i = 1 to $attacks[0] $currentAttack = StringSplit($attacks[$i], "","") ;$currentAttack[1] is the hotkey ;$currentAttack[2] is the # of repeats ;$currentAttack[3] is the mouse button ;$currentAttack[4] is the delay If ($currentAttack[3] = 1) Then $mouseButton = ""left"" ElseIf ($currentAttack[3] = 2) Then $mouseButton = ""right"" EndIf SendHotKey($currentAttack[1]) MySleep($dMouseClick) ;begin attack sequence If ($currentAttack[2] = ""H"") Then MyRMouseMove($attackX, $attackY, 15, 12, $mouseSpeed) MouseDown($mouseButton) MySleep($currentAttack[4]) MouseUp($mouseButton) Else For $n = 1 to $currentAttack[2] If ($currentAttack[3] = 0) Then ;forces a delay if mouse button is 0 MySleep($currentAttack[4]) ElseIf ($currentAttack[3] = 1) Then Send(""{SHIFTDOWN}"") MySleep(20) MyRMouseClick($mouseButton, $attackX, $attackY, 15, 12, $mouseSpeed) Send(""{SHIFTUP}"") Else MyRMouseClick($mouseButton, $attackX, $attackY, 15, 12, $mouseSpeed) EndIf MercHealthCheck() MySleep($currentAttack[4]) Next EndIf Next EndFunc Func PostAttack() MyRMouseClick(""left"", $grabClickX, $grabClickY, 5, 5, $mouseSpeed) ;run over to make sure items are picked up If ($usePickit = 1) Then Send(""{ENTER}"") ;turns pickit back on MySleep($dMouseClick) Send($magicChar & ""set pickit 1{ENTER}"") EndIf MySleep($dPickUpItems) If (MyPixelGetColor(191, 242) = $deathCheck) Then ;checks to see if player died Send(""{ESC}"") MySleep(2000) EndIf EndFunc Func ExitGame() $exitAttempts = 0 While (MyPixelGetColor(274, 573) = $inGameCheck) If ($exitAttempts = 5) Then CloseD2($dCloseD2) ExitLoop EndIf Send(""{ESC}"") ;exit game MyRMouseClick(""left"", 397, 261, 200, 20, $mouseSpeed) MySleep(1000) $exitAttempts = $exitAttempts + 1 WEnd Wait(555, 461, $chatCheck, $exitGameMin, $exitGameMax) EndFunc Func MainLoop() While 1 $marker = 0 $runWasCompleted = 0 If ($currentInterval = 0) AND NOT ($runInterval = 0) Then $currentInterval = Round(Random($runInterval - $intervalVariance, $runInterval + $intervalVariance), 0) ;calculates the run interval length $lastCompletedInterval = 0 EndIf If NOT (WinExists($d2WinTitle, """")) Then StartD2() EndIf If (MyPixelGetColor(401, 522) = $loginCheck) Then Login() $away = 0 EndIf If (MyPixelGetColor(557, 486) = $charSelectCheck) Then CharacterSelect() EndIf If (MyPixelGetColor(555, 461) = $chatCheck) Then CreateGame() EndIf If (MyPixelGetColor(274, 573) = $inGameCheck) Then $startRun = TimerStart() $marker = 1 $pauseTime = 0 $restarts = 0 $lastPotUse = 0 PrePindle() If (MyPixelGetColor(274, 573) = $inGameCheck) Then MoveToPortal() If (MyPixelGetColor(274, 573) = $inGameCheck) Then EnterPortal() If (MyPixelGetColor(274, 573) = $inGameCheck) Then GoToPindle() If (MyPixelGetColor(274, 573) = $inGameCheck) Then Attack() If (MyPixelGetColor(274, 573) = $inGameCheck) Then PostAttack() $runWasCompleted = 1 EndIf EndIf EndIf EndIf EndIf EndIf $inTemple = 0 If ($marker = 0) Then If ($restarts = 3) Then BotSleep(300) Else CloseD2($dCloseD2) EndIf TrayTip(""RPB v"" & $version, ""Restarting Diablo II..."", 6, 17) $restarts = $restarts + 1 ElseIf (MyPixelGetColor(274, 573) = $inGameCheck) Then $runTime = Int(TimerStop($startRun) - $pauseTime) ExitGame() If ($runWasCompleted = 1) Then $lastCompletedInterval = $lastCompletedInterval + 1 ;calculates completed runs in statistics.ini $totalCompleted = MyIniRead(""statistics.ini"", $slotToUse, ""TotalCompleted"", ""0"") + 1 $lastCompleted = MyIniRead(""statistics.ini"", $slotToUse, ""LastCompleted"", ""0"") + 1 IniWrite(""statistics.ini"", $slotToUse, ""TotalCompleted"", $totalCompleted) IniWrite(""statistics.ini"", $slotToUse, ""LastCompleted"", $lastCompleted) ;calculates run times in statistics.ini $bestruntime = MyIniRead(""statistics.ini"", $slotToUse, ""BestRunTime"", """") If (StringLen($bestruntime) = 0) OR ($runTime < $bestruntime) Then IniWrite(""statistics.ini"", $slotToUse, ""BestRunTime"", $runTime) EndIf $averageruntime = MyIniRead(""statistics.ini"", $slotToUse, ""AverageRunTime"", ""0"") $averageruntime = ($averageruntime * ($totalCompleted - 1) + $runTime) / $totalCompleted IniWrite(""statistics.ini"", $slotToUse, ""AverageRunTime"", Round($averageruntime, 0)) EndIf IniWrite(""statistics.ini"", $slotToUse, ""TotalSuccessRate"", Round($totalCompleted * 100 / $totalRuns, 0)) IniWrite(""statistics.ini"", $slotToUse, ""LastSuccessRate"", Round($lastCompleted * 100 / $lastRuns, 0)) If ($lastCompleted = $runs) OR ($quit = 2) Then Quit() ElseIf ($lastCompletedInterval = $currentInterval) AND NOT ($currentInterval = 0) Then $currentInterval = 0 ;re-initializes run interval to 0 BotSleep(Round(Random($sleepTime - $sleepVariance, $sleepTime + $sleepVariance), 0)) EndIf EndIf WEnd EndFunc ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; Begin Script - Configuration Checks ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ TrayTip(""RPB v"" & $version, ""Rishodi's Pindlebot v"" & $version & Chr(10) & ""Validating configuration..."", 6, 17) If (StringLen($attackSequence) = 0) Then ;checks to see if specified slot was found MsgBox(16, ""Rishodi's Pindlebot v"" & $version, ""Invalid slot name ( "" & $slotToUse & "" ). Check your configuration."") Quit() EndIf Dim $temp[3][2] $temp[0][0] = $teleport $temp[0][1] = ""teleport"" $temp[1][0] = $precast1 $temp[1][1] = ""first precast"" $temp[2][0] = $precast2 $temp[2][1] = ""second precast"" $errorMsg = """" For $i = 0 to 2 ;current config to check is $temp[$i][0] If (($i = 0) OR (StringLen($temp[$i][0]) > 0)) Then If NOT (StringRight($temp[$i][0], 1) = "";"") Then $errorMsg = ""Add a semicolon to the end of the sequence."" ExitLoop ElseIf (StringLen($temp[$i][0]) < 4) Then $errorMsg = ""Specify a valid hotkey and delay."" ExitLoop EndIf $j = 1 $split = StringSplit(StringTrimRight($temp[$i][0], 1), "";"") Do $stringCheck = StringSplit($split[$j], "","") If ($stringCheck[0] = 1) Then $errorMsg = ""Invalid delay."" ExitLoop(2) ElseIf ($stringCheck[0] > 2) Then $errorMsg = ""Too many parameters, only two are needed."" ExitLoop(2) ElseIf NOT ((StringLen($stringCheck[1]) > 0) AND (StringLen($stringCheck[2]) > 0)) Then $errorMsg = ""Specify a valid hotkey and delay."" ExitLoop(2) ElseIf NOT (StringRight($temp[$i][0], 1) = "";"") Then $errorMsg = ""Add a semicolon to the end of the sequence."" ExitLoop(2) EndIf $j = $j + 1 Until ($split[0] < $j) EndIf Next If (StringLen($errorMsg) > 0) Then MsgBox(16, ""Rishodi's Pindlebot v"" & $version, ""Invalid "" & $temp[$i][1] & "" sequence: '"" & $temp[$i][0] & ""'"" & Chr(10) & ""The correct format is: 'Hotkey,Delay;'"" & Chr(10) & Chr(10) & ""Error: "" & $errorMsg) Quit() EndIf $temp = 0 $splitAttacks = StringSplit(StringTrimRight($attackSequence, 1), "";"") For $i = 1 to $splitAttacks[0] $oneAttack = StringSplit($splitAttacks[$i], "","") If ($oneAttack[0] < 4) Then $errorMsg = ""Too few parameters, four are needed per attack."" ExitLoop ElseIf ($oneAttack[0] > 4) Then $errorMsg = ""Too many parameters, four are needed per attack."" ExitLoop ElseIf NOT (StringLen($oneAttack[1]) > 0) Then $errorMsg = ""Invalid hotkey."" ExitLoop ElseIf NOT ((StringLen($oneAttack[2]) > 0) AND ($oneAttack[2] > 0) OR ($oneAttack[2] = ""H"")) Then $errorMsg = ""Invalid number of attack repeats."" ExitLoop ElseIf NOT ((($oneAttack[3] = 1) OR ($oneAttack[3] = 2)) AND (StringLen($oneAttack[3]) > 0)) Then $errorMsg = ""Improperly configured mouse button. Acceptable values are 1 (left) and 2 (right)."" ExitLoop ElseIf NOT (StringLen($oneAttack[4]) > 0) Then $errorMsg = ""Invalid attack delay."" ExitLoop EndIf Next If NOT (StringRight($attackSequence, 1) = "";"") Then $errorMsg = ""Add a semicolon to the end of the sequence."" EndIf If (StringLen($errorMsg) > 0) Then MsgBox(16, ""Rishodi's Pindlebot v"" & $version, ""Invalid attack sequence: '"" & $attackSequence & ""'"" & Chr(10) & ""The correct format is: 'Hotkey,Repeats,Button,Delay;'"" & Chr(10) & Chr(10) & ""Error: "" & $errorMsg) Quit() EndIf Dim $temp[3] $temp[0] = ""pindlebot.ini"" $temp[1] = ""advanced.ini"" $temp[2] = ""d2stats.exe"" For $i = 0 to 2 If NOT FileExists(@ScriptDir & ""\\"" & $temp[$i]) AND NOT (($i = 2) AND ($healLife = 0)) Then $errorMsg = $temp[$i] ExitLoop EndIf Next If (StringLen($errorMsg) > 0) Then MsgBox(16, ""Rishodi's Pindlebot v"" & $version, ""Could not find file: "" & $errorMsg & Chr(10) & Chr(10) & ""Please ensure that all RPB files are in the same directory."") Quit() EndIf $temp = 0 If NOT FileExists($d2path & ""\\"" & $d2exe) Then MsgBox(16, ""Rishodi's Pindlebot v"" & $version, ""Could not locate Diablo II executable: "" & $d2path & ""\\"" & $d2exe & Chr(10) & Chr(10) & ""Please ensure that this path is correct."") Quit() EndIf If ($usePickit = 1) Then Dim $temp[3] $temp[0] = $d2path & ""\\Plugin\\zoid.dll"" $temp[1] = $d2path & ""\\Plugin\\zoid.ini"" $temp[2] = $d2path & ""\\Plugin\\zpickit.ini"" For $i = 0 to 2 If NOT FileExists($temp[$i]) Then $errorMsg = $temp[$i] ExitLoop EndIf Next If (StringLen($errorMsg) > 0) Then MsgBox(16, ""Rishodi's Pindlebot v"" & $version, ""Could not find file: "" & $errorMsg & Chr(10) & Chr(10) & ""zPickit should be installed in this directory: "" & $d2path & ""\\Plugin\\"") Quit() EndIf EndIf $temp = 0 If ($healLife <= $chickenLife) Then $chickenLife = 0 ;disables chicken life for an invalid value, i.e. chicken life # is greater than heal life # EndIf ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ; Initialization ;+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ;checks for updates If (MyIniRead(""advanced.ini"", ""Misc"", ""UpdateNotify"", ""0"") = 1) Then TrayTip(""RPB v"" & $version, ""Rishodi's Pindlebot v"" & $version & Chr(10) & ""Checking for updates..."", 6, 17) URLDownloadToFile("" "", ""version.txt"") MySleep(100) $versionFile = FileOpen(""version.txt"", 0) If NOT ($versionFile = -1) Then $newestVersion = FileReadLine($versionFile, 1) If NOT ($newestVersion = $version) Then $update = MsgBox(64, ""Rishodi's Pindlebot v"" & $version, ""A newer version (v"" & $newestVersion & "") is available for download at "") EndIf FileClose(""version.txt"") EndIf FileDelete(""version.txt"") EndIf TrayTip(""RPB v"" & $version, ""Rishodi's Pindlebot v"" & $version & Chr(10) & ""Initializing..."", 6, 17) ;sets statistics.ini for active slot name if it doesn't already exist If (StringLen(MyIniRead(""statistics.ini"", $slotToUse, ""TotalRuns"", """")) = 0) Then IniWrite(""statistics.ini"", $slotToUse, ""TotalRuns"", ""0"") IniWrite(""statistics.ini"", $slotToUse, ""TotalCompleted"", ""0"") IniWrite(""statistics.ini"", $slotToUse, ""TotalSuccessRate"", """") IniWrite(""statistics.ini"", $slotToUse, ""TotalDeaths"", ""0"") IniWrite(""statistics.ini"", $slotToUse, ""TotalChickens"", ""0"") IniWrite(""statistics.ini"", $slotToUse, ""BestRunTime"", """") IniWrite(""statistics.ini"", $slotToUse, ""AverageRunTime"", ""0"") EndIf ;resets last statistics to 0 IniWrite(""statistics.ini"", $slotToUse, ""LastRuns"", ""0"") IniWrite(""statistics.ini"", $slotToUse, ""LastCompleted"", ""0"") IniWrite(""statistics.ini"", $slotToUse, ""LastSuccessRate"", """") IniWrite(""statistics.ini"", $slotToUse, ""LastDeaths"", ""0"") IniWrite(""statistics.ini"", $slotToUse, ""LastChickens"", ""0"") If FileExists(""d2stats.ini"") Then FileDelete(""d2stats.ini"") EndIf ;writes new d2stats.ini file IniWrite(""d2stats.ini"", ""Current"", ""Health"", """") RegWrite(""HKEY_CURRENT_USER\\Software\\Blizzard Entertainment\\Diablo II"", ""Resolution"", ""REG_DWORD"", ""1"") ;makes sure in-game resolution is 800x600 RegWrite(""HKEY_CURRENT_USER\\Software\\Blizzard Entertainment\\Diablo II"", ""DIFF_LEVEL"", ""REG_DWORD"", $difficulty - 1) ;sets difficulty level: 0 = Normal, 1 = Nightmare, 2 = Hell ;AutoItSetOption(""MouseCoordMode"", 1) ;AutoItSetOption(""PixelCoordMode"", 1) ;For $i = 0 to 12 ; MyMouseMove(Random(200,800),Random(200,600)) ; Sleep(300000) ;Next AutoItSetOption(""MouseCoordMode"", 0) AutoItSetOption(""PixelCoordMode"", 0) If NOT (WinActive($d2WinTitle, """")) Then If NOT (WinExists($d2WinTitle, """")) Then StartD2() Else ActivateD2() WinSize() EndIf EndIf AdlibEnable(""GameCheck"", $healPeriod) MainLoop() ;disconnects from internet AutoItSetOption(""MouseCoordMode"", 1) AutoItSetOption(""PixelCoordMode"", 1) MyMouseClick(""left"", 48, 716, $mouseSpeed) MySleep(5000) MyMouseClick(""left"", 273, 456, $mouseSpeed) MySleep(5000) MyMouseClick(""left"", 468, 456, $mouseSpeed) MySleep(5000) MyMouseClick(""left"", 484, 456, $mouseSpeed)",16329,True,3052.8883718923876,median "/* 16x16Font.ino Demonstration for 16x16 pixel fonts. Several fonts are included in the example. Universal 8bit Graphics Library (https://github.com/olikraus/u8g2/) Copyright (c) 2016, olikraus@gmail.com All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #ifdef U8X8_HAVE_HW_SPI #include #endif // Please UNCOMMENT one of the contructor lines below // U8x8 Contructor List // The complete list is available here: https://github.com/olikraus/u8g2/wiki/u8x8setupcpp // Please update the pin numbers according to your setup. Use U8X8_PIN_NONE if the reset pin is not connected //U8X8_NULL u8x8; // null device, a 8x8 pixel display which does nothing //U8X8_SSD1306_128X64_NONAME_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1306_128X64_NONAME_4W_HW_SPI u8x8(/* cs=*/ 6, /* dc=*/ 4, /* reset=*/ 12); // Arduboy (DevKit) //U8X8_SSD1306_128X64_NONAME_4W_HW_SPI u8x8(/* cs=*/ 12, /* dc=*/ 4, /* reset=*/ 6); // Arduboy 10 (Production, Kickstarter Edition) //U8X8_SSD1306_128X64_NONAME_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1306_128X64_NONAME_3W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* reset=*/ 8); //U8X8_SSD1306_128X64_NONAME_3W_HW_SPI u8x8(/* cs=*/ 10, /* reset=*/ 8); //U8X8_SSD1306_128X64_NONAME_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_SSD1306_128X64_ALT0_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); // same as the NONAME variant, but may solve the ""every 2nd line skipped"" problem //U8X8_SSD1306_128X64_NONAME_SW_I2C u8x8(/* clock=*/ 2, /* data=*/ 0, /* reset=*/ U8X8_PIN_NONE); // Digispark ATTiny85 //U8X8_SSD1306_128X64_NONAME_SW_I2C u8x8(/* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // OLEDs without Reset of the Display //U8X8_SSD1306_128X64_VCOMH0_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but maximizes setContrast() range //U8X8_SSD1306_128X64_ALT0_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but may solve the ""every 2nd line skipped"" problem //U8X8_SSD1306_102X64_EA_OLEDS102_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but may solve the ""every 2nd line skipped"" problem //U8X8_SH1106_128X64_NONAME_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SH1106_128X64_NONAME_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_SH1106_128X64_VCOMH0_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but maximizes setContrast() range //U8X8_SH1106_128X64_WINSTAR_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but uses updated SH1106 init sequence //U8X8_SH1106_128X32_VISIONOX_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_SH1106_128X32_VISIONOX_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SH1106_72X40_WISE_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SH1107_64X128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SH1107_128X128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SH1107_128X128_HW_I2C u8x8(/* reset=*/ 8); //U8X8_SH1107_PIMORONI_128X128_HW_I2C u8x8(/* reset=*/ 8); //U8X8_SH1107_SEEED_128X128_SW_I2C u8x8(/* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); //U8X8_SH1107_SEEED_128X128_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_SH1107_SEEED_96X96_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SH1108_160X160_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1306_128X32_UNIVISION_SW_I2C u8x8(/* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // Adafruit Feather ESP8266/32u4 Boards + FeatherWing OLED //U8X8_SSD1306_128X32_UNIVISION_SW_I2C u8x8(/* clock=*/ 21, /* data=*/ 20, /* reset=*/ U8X8_PIN_NONE); // Adafruit Feather M0 Basic Proto + FeatherWing OLED //U8X8_SSD1306_128X32_UNIVISION_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); // Adafruit ESP8266/32u4/ARM Boards + FeatherWing OLED //U8X8_SSD1306_128X32_UNIVISION_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE, /* clock=*/ SCL, /* data=*/ SDA); // pin remapping with ESP8266 HW I2C //U8X8_SSD1306_128X32_WINSTAR_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE, /* clock=*/ SCL, /* data=*/ SDA); // pin remapping with ESP8266 HW I2C //U8X8_SSD1306_64X48_ER_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); // EastRising 0.66"" OLED breakout board, Uno: A4=SDA, A5=SCL, 5V powered //U8X8_SSD1306_48X64_WINSTAR_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_SSD1306_64X32_NONAME_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_SSD1306_64X32_1F_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_SSD1306_96X16_ER_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); // EastRising 0.69"" //U8X8_SSD1306_72X40_ER_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); // EastRising 0.42"" //U8X8_SSD1306_128X64_NONAME_6800 u8x8(13, 11, 2, 3, 4, 5, 6, A4, /*enable=*/ 7, /*cs=*/ 10, /*dc=*/ 9, /*reset=*/ 8); //U8X8_SSD1306_128X64_NONAME_8080 u8x8(13, 11, 2, 3, 4, 5, 6, A4, /*enable=*/ 7, /*cs=*/ 10, /*dc=*/ 9, /*reset=*/ 8); //U8X8_SSD1309_128X64_NONAME0_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1309_128X64_NONAME0_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1309_128X64_NONAME2_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1309_128X64_NONAME2_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1316_128X32_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1316_128X32_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1317_96X96_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // not tested, not confirmed //U8X8_SSD1317_96X96_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // not tested, not confirmed //U8X8_SSD1318_128X96_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1318_128X96_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1320_160X132_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1320_160X132_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1322_NHD_256X64_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1322_NHD_256X64_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1322_NHD_128X64_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1322_NHD_128X64_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1325_NHD_128X64_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1325_NHD_128X64_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD0323_OS128064_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD0323_OS128064_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1326_ER_256X32_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // experimental driver for ER-OLED018-1 //U8X8_SSD1327_SEEED_96X96_SW_I2C u8x8(/* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // Seeedstudio Grove OLED 96x96 //U8X8_SSD1327_SEEED_96X96_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); // Seeedstudio Grove OLED 96x96 //U8X8_SSD1327_EA_W128128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1327_EA_W128128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1327_MIDAS_128X128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1327_MIDAS_128X128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1327_WS_128X128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1327_WS_128X128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1327_VISIONOX_128X96_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1327_VISIONOX_128X96_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1329_128X96_NONAME_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1329_128X96_NONAME_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1329_96X96_NONAME_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1329_96X96_NONAME_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1329_96X96_NONAME_4W_HW_SPI u8x8(/* cs=*/ A4, /* dc=*/ A2, /* reset=*/ U8X8_PIN_NONE); // Adafruit Feather 32u4 Basic Proto //U8X8_SSD1305_128X32_NONAME_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1305_128X32_NONAME_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1305_128X32_ADAFRUIT_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1305_128X32_ADAFRUIT_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1305_128X64_ADAFRUIT_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1305_128X64_ADAFRUIT_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1305_128X64_RAYSTAR_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1305_128X64_RAYSTAR_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_KS0108_128X64 u8x8(8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*dc=*/ 17, /*cs0=*/ 14, /*cs1=*/ 15, /*cs2=*/ U8X8_PIN_NONE, /* reset=*/ U8X8_PIN_NONE); // Set R/W to low! //U8X8_KS0108_ERM19264 u8x8(8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*dc=*/ 17, /*cs0=*/ 14, /*cs1=*/ 15, /*cs2=*/ 16, /* reset=*/ U8X8_PIN_NONE); // Set R/W to low! //U8X8_HD44102_100X64 u8x8(4, 5, 6, 7, 8, 9, 10, 11, /*enable=*/ 2, /*dc=*/ 3, /*cs0=*/ A0, /*cs1=*/ A1, /*cs2=*/ A2, /* reset=*/ U8X8_PIN_NONE); // Set R/W to low! //U8X8_T7932_150X32 u8x8(4, 5, 6, 7, 8, 9, 10, 11, /*enable=*/ 2, /*dc=*/ 3, /*cs0=*/ A0, /*cs1=*/ A1, /*cs2=*/ A2, /* reset=*/ U8X8_PIN_NONE); // Set R/W to low! //U8X8_UC1701_EA_DOGS102_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1701_EA_DOGS102_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_PCD8544_84X48_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Nokia 5110 Display //U8X8_PCD8544_84X48_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Nokia 5110 Display //U8X8_PCF8812_96X65_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Could be also PCF8814 //U8X8_PCF8812_96X65_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Could be also PCF8814 //U8X8_HX1230_96X68_3W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* reset=*/ 8); //U8X8_HX1230_96X68_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7528_ERC16064_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7528_ERC16064_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_EA_DOGM128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_EA_DOGM128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_64128N_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_64128N_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_EA_DOGM132_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); // DOGM132 Shield //U8X8_ST7565_EA_DOGM132_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); // DOGM132 Shield //U8X8_ST7565_ZOLEN_128X64_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_ZOLEN_128X64_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_LM6059_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Adafruit ST7565 GLCD //U8X8_ST7565_LM6059_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Adafruit ST7565 GLCD //U8X8_ST7565_KS0713_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // KS0713 controller //U8X8_ST7565_KS0713_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // KS0713 controller //U8X8_ST7565_LX12864_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_LX12864_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_ERC12864_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_ERC12864_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_ERC12864_ALT_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // contrast improved version for ERC12864 //U8X8_ST7565_ERC12864_ALT_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // contrast improved version for ERC12864 //U8X8_ST7565_NHD_C12832_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_NHD_C12832_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_NHD_C12864_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_NHD_C12864_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_JLX12864_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_JLX12864_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_PI_132X64_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); // Pax Instruments Shield, LCD_BL=6 //U8X8_ST7567_PI_132X64_4W_HW_SPI u8x8(/* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); // Pax Instruments Shield, LCD_BL=6 //U8X8_ST7567_JLX12864_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_JLX12864_4W_HW_SPI u8x8(/* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_OS12864_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_OS12864_4W_HW_SPI u8x8(/* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_ENH_DG128064_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_ENH_DG128064_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_ENH_DG128064I_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_ENH_DG128064I_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_64X32_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_ST7567_HEM6432_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_ST7571_128X128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7571_128X128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7571_128X96_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7571_128X96_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX172104_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX172104_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX19296_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX19296_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256128_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_WO256X128_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_WO256X128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256160_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256160_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256160M_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256160M_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256160_ALT_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256160_ALT_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX240160_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX240160_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX25664_2ND_HW_I2C u8x8(/* reset=*/ 8); // Due, 2nd I2C //U8X8_ST75320_JLX320240_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75320_JLX320240_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_NT7534_TG12864R_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_NT7534_TG12864R_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7588_JLX12864_SW_I2C u8x8(/* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ 5); //U8X8_ST7588_JLX12864_HW_I2C u8x8(/* reset=*/ 5); //U8X8_IST3020_ERC19264_6800 u8x8(44, 43, 42, 41, 40, 39, 38, 37, /*enable=*/ 28, /*cs=*/ 32, /*dc=*/ 30, /*reset=*/ 31); // Connect WR pin with GND //U8X8_IST3020_ERC19264_8080 u8x8(44, 43, 42, 41, 40, 39, 38, 37, /*enable=*/ 29, /*cs=*/ 32, /*dc=*/ 30, /*reset=*/ 31); // Connect RD pin with 3.3V //U8X8_IST3020_ERC19264_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_IST7920_128X128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Round display //U8X8_IST7920_128X128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Round display //U8X8_UC1601_128X32_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1601_128X32_3W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* reset=*/ 8); //U8X8_UC1601_128X64_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1604_JLX19264_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1604_JLX19264_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1608_ERC24064_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Due, SW SPI, ERC24064-1 Test Board //U8X8_UC1608_DEM240064_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Due, SW SPI, ERC24064-1 Test Board //U8X8_UC1608_ERC240120_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1608_240X128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1610_EA_DOGXL160_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8X8_UC1610_EA_DOGXL160_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8X8_UC1611_EA_DOGM240_2ND_HW_I2C u8x8(/* reset=*/ 8); // Due, 2nd I2C, DOGM240 Test Board //U8X8_UC1611_EA_DOGM240_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // SW SPI, Due DOGXL240 Test Board //U8X8_UC1611_EA_DOGXL240_2ND_HW_I2C u8x8(/* reset=*/ 8); // Due, 2nd I2C, DOGXL240 Test Board //U8X8_UC1611_EA_DOGXL240_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // SW SPI, Due DOGXL240 Test Board //U8X8_UC1611_IDS4073_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1611_IDS4073_4W_HW_SPI u8x8( /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1611_EW50850_8080 u8x8(8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 3, /*dc=*/ 16, /*reset=*/ 17); // 240x160, Connect RD/WR1 pin with 3.3V, CS is aktive high //U8X8_UC1611_CG160160_8080 u8x8(8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 3, /*dc=*/ 16, /*reset=*/ 17); // Connect WR1 and CD1 pin with 3.3V, connect CS0 with cs, WR0 with enable, CD with dc //U8X8_UC1617_JLX128128_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1617_JLX128128_4W_HW_SPI u8x8( /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1638_192X96_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1638_192X96_4W_HW_SPI u8x8( /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1638_192X96_SW_I2C u8x8(/* clock=*/ 13, /* data=*/ 11, /* reset=*/ 8); // u8g2 test board: I2C clock/data is same as SPI, I2C default address is 0x78 //U8X8_SSD1606_172X72_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // eInk/ePaper Display //U8X8_SSD1607_200X200_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // eInk/ePaper Display, original LUT from embedded artists //U8X8_SSD1607_GS_200X200_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Good Display //U8X8_SSD1607_WS_200X200_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Waveshare //U8X8_IL3820_296X128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // eInk/ePaper Display, original LUT //U8X8_IL3820_V2_296X128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // eInk/ePaper Display, optimized (lesser screen flicker) //U8X8_ST7511_AVD_320X240_8080 u8x8(13, 11, 2, 3, 4, 5, 6, A4, /*enable/WR=*/ 7, /*cs=*/ 10, /*dc=*/ 9, /*reset=*/ 8); // Connect RD pin with 3.3V/5V //U8X8_S1D15721_240X64_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_S1D15721_240X64_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // End of constructor list void setup(void) { /* U8g2 Project: SSD1306 Test Board */ //pinMode(10, OUTPUT); //pinMode(9, OUTPUT); //digitalWrite(10, 0); //digitalWrite(9, 0); /* U8g2 Project: KS0108 Test Board */ //pinMode(16, OUTPUT); //digitalWrite(16, 0); u8x8.begin(); } void loop(void) { u8x8.setFont(u8x8_font_px437wyse700a_2x2_r); u8x8.drawString(0, 0, ""ABC defg""); u8x8.setFont(u8x8_font_px437wyse700b_2x2_r); u8x8.drawString(0, 2, ""ABC defg""); u8x8.refreshDisplay(); // only required for SSD1606/7 delay(2000); } ",12418,True,3767.381596563952,median "M:lab3servo F:G$SYSCLK_Init$0$0({2}DF,SV:S),C,0,0,0,0,0 F:G$UART0_Init$0$0({2}DF,SV:S),C,0,0,0,0,0 F:G$Sys_Init$0$0({2}DF,SV:S),C,0,0,0,0,0 F:G$putchar$0$0({2}DF,SV:S),C,0,0,0,0,0 F:G$getchar$0$0({2}DF,SC:U),C,0,0,0,0,0 F:G$getchar_nw$0$0({2}DF,SC:U),C,0,0,0,0,0 F:G$main$0$0({2}DF,SV:S),C,0,0,0,0,0 F:G$Port_Init$0$0({2}DF,SV:S),Z,0,0,0,0,0 F:G$XBR0_Init$0$0({2}DF,SV:S),Z,0,0,0,0,0 F:G$PCA_Init$0$0({2}DF,SV:S),Z,0,0,0,0,0 F:G$PCA_ISR$0$0({2}DF,SV:S),Z,0,0,1,9,0 F:G$Steering_Servo$0$0({2}DF,SV:S),Z,0,0,0,0,0 S:Llab3servo.getchar$c$1$10({1}SC:U),R,0,0,[] S:Llab3servo.getchar_nw$c$1$12({1}SC:U),R,0,0,[] S:G$PW_CENTER$0$0({2}SI:U),E,0,0 S:G$PW_RIGHT$0$0({2}SI:U),E,0,0 S:G$PW_LEFT$0$0({2}SI:U),E,0,0 S:G$SERVO_PW$0$0({2}SI:U),E,0,0 S:G$PCA_start$0$0({2}SI:U),E,0,0 S:G$input$0$0({1}SC:U),E,0,0 S:Llab3servo.aligned_alloc$size$1$39({2}SI:U),E,0,0 S:Llab3servo.aligned_alloc$alignment$1$39({2}SI:U),E,0,0 S:Llab3servo.main$input$1$52({1}SC:U),R,0,0,[r7] S:G$P0$0$0({1}SC:U),I,0,0 S:G$SP$0$0({1}SC:U),I,0,0 S:G$DPL$0$0({1}SC:U),I,0,0 S:G$DPH$0$0({1}SC:U),I,0,0 S:G$P4$0$0({1}SC:U),I,0,0 S:G$P5$0$0({1}SC:U),I,0,0 S:G$P6$0$0({1}SC:U),I,0,0 S:G$PCON$0$0({1}SC:U),I,0,0 S:G$TCON$0$0({1}SC:U),I,0,0 S:G$TMOD$0$0({1}SC:U),I,0,0 S:G$TL0$0$0({1}SC:U),I,0,0 S:G$TL1$0$0({1}SC:U),I,0,0 S:G$TH0$0$0({1}SC:U),I,0,0 S:G$TH1$0$0({1}SC:U),I,0,0 S:G$CKCON$0$0({1}SC:U),I,0,0 S:G$PSCTL$0$0({1}SC:U),I,0,0 S:G$P1$0$0({1}SC:U),I,0,0 S:G$TMR3CN$0$0({1}SC:U),I,0,0 S:G$TMR3RLL$0$0({1}SC:U),I,0,0 S:G$TMR3RLH$0$0({1}SC:U),I,0,0 S:G$TMR3L$0$0({1}SC:U),I,0,0 S:G$TMR3H$0$0({1}SC:U),I,0,0 S:G$P7$0$0({1}SC:U),I,0,0 S:G$SCON$0$0({1}SC:U),I,0,0 S:G$SCON0$0$0({1}SC:U),I,0,0 S:G$SBUF$0$0({1}SC:U),I,0,0 S:G$SBUF0$0$0({1}SC:U),I,0,0 S:G$SPI0CFG$0$0({1}SC:U),I,0,0 S:G$SPI0DAT$0$0({1}SC:U),I,0,0 S:G$ADC1$0$0({1}SC:U),I,0,0 S:G$SPI0CKR$0$0({1}SC:U),I,0,0 S:G$CPT0CN$0$0({1}SC:U),I,0,0 S:G$CPT1CN$0$0({1}SC:U),I,0,0 S:G$P2$0$0({1}SC:U),I,0,0 S:G$EMI0TC$0$0({1}SC:U),I,0,0 S:G$EMI0CF$0$0({1}SC:U),I,0,0 S:G$PRT0CF$0$0({1}SC:U),I,0,0 S:G$P0MDOUT$0$0({1}SC:U),I,0,0 S:G$PRT1CF$0$0({1}SC:U),I,0,0 S:G$P1MDOUT$0$0({1}SC:U),I,0,0 S:G$PRT2CF$0$0({1}SC:U),I,0,0 S:G$P2MDOUT$0$0({1}SC:U),I,0,0 S:G$PRT3CF$0$0({1}SC:U),I,0,0 S:G$P3MDOUT$0$0({1}SC:U),I,0,0 S:G$IE$0$0({1}SC:U),I,0,0 S:G$SADDR0$0$0({1}SC:U),I,0,0 S:G$ADC1CN$0$0({1}SC:U),I,0,0 S:G$ADC1CF$0$0({1}SC:U),I,0,0 S:G$AMX1SL$0$0({1}SC:U),I,0,0 S:G$P3IF$0$0({1}SC:U),I,0,0 S:G$SADEN1$0$0({1}SC:U),I,0,0 S:G$EMI0CN$0$0({1}SC:U),I,0,0 S:G$_XPAGE$0$0({1}SC:U),I,0,0 S:G$P3$0$0({1}SC:U),I,0,0 S:G$OSCXCN$0$0({1}SC:U),I,0,0 S:G$OSCICN$0$0({1}SC:U),I,0,0 S:G$P74OUT$0$0({1}SC:U),I,0,0 S:G$FLSCL$0$0({1}SC:U),I,0,0 S:G$FLACL$0$0({1}SC:U),I,0,0 S:G$IP$0$0({1}SC:U),I,0,0 S:G$SADEN0$0$0({1}SC:U),I,0,0 S:G$AMX0CF$0$0({1}SC:U),I,0,0 S:G$AMX0SL$0$0({1}SC:U),I,0,0 S:G$ADC0CF$0$0({1}SC:U),I,0,0 S:G$P1MDIN$0$0({1}SC:U),I,0,0 S:G$ADC0L$0$0({1}SC:U),I,0,0 S:G$ADC0H$0$0({1}SC:U),I,0,0 S:G$SMB0CN$0$0({1}SC:U),I,0,0 S:G$SMB0STA$0$0({1}SC:U),I,0,0 S:G$SMB0DAT$0$0({1}SC:U),I,0,0 S:G$SMB0ADR$0$0({1}SC:U),I,0,0 S:G$ADC0GTL$0$0({1}SC:U),I,0,0 S:G$ADC0GTH$0$0({1}SC:U),I,0,0 S:G$ADC0LTL$0$0({1}SC:U),I,0,0 S:G$ADC0LTH$0$0({1}SC:U),I,0,0 S:G$T2CON$0$0({1}SC:U),I,0,0 S:G$T4CON$0$0({1}SC:U),I,0,0 S:G$RCAP2L$0$0({1}SC:U),I,0,0 S:G$RCAP2H$0$0({1}SC:U),I,0,0 S:G$TL2$0$0({1}SC:U),I,0,0 S:G$TH2$0$0({1}SC:U),I,0,0 S:G$SMB0CR$0$0({1}SC:U),I,0,0 S:G$PSW$0$0({1}SC:U),I,0,0 S:G$REF0CN$0$0({1}SC:U),I,0,0 S:G$DAC0L$0$0({1}SC:U),I,0,0 S:G$DAC0H$0$0({1}SC:U),I,0,0 S:G$DAC0CN$0$0({1}SC:U),I,0,0 S:G$DAC1L$0$0({1}SC:U),I,0,0 S:G$DAC1H$0$0({1}SC:U),I,0,0 S:G$DAC1CN$0$0({1}SC:U),I,0,0 S:G$PCA0CN$0$0({1}SC:U),I,0,0 S:G$PCA0MD$0$0({1}SC:U),I,0,0 S:G$PCA0CPM0$0$0({1}SC:U),I,0,0 S:G$PCA0CPM1$0$0({1}SC:U),I,0,0 S:G$PCA0CPM2$0$0({1}SC:U),I,0,0 S:G$PCA0CPM3$0$0({1}SC:U),I,0,0 S:G$PCA0CPM4$0$0({1}SC:U),I,0,0 S:G$ACC$0$0({1}SC:U),I,0,0 S:G$XBR0$0$0({1}SC:U),I,0,0 S:G$XBR1$0$0({1}SC:U),I,0,0 S:G$XBR2$0$0({1}SC:U),I,0,0 S:G$RCAP4L$0$0({1}SC:U),I,0,0 S:G$RCAP4H$0$0({1}SC:U),I,0,0 S:G$EIE1$0$0({1}SC:U),I,0,0 S:G$EIE2$0$0({1}SC:U),I,0,0 S:G$ADC0CN$0$0({1}SC:U),I,0,0 S:G$PCA0L$0$0({1}SC:U),I,0,0 S:G$PCA0CPL0$0$0({1}SC:U),I,0,0 S:G$PCA0CPL1$0$0({1}SC:U),I,0,0 S:G$PCA0CPL2$0$0({1}SC:U),I,0,0 S:G$PCA0CPL3$0$0({1}SC:U),I,0,0 S:G$PCA0CPL4$0$0({1}SC:U),I,0,0 S:G$RSTSRC$0$0({1}SC:U),I,0,0 S:G$B$0$0({1}SC:U),I,0,0 S:G$SCON1$0$0({1}SC:U),I,0,0 S:G$SBUF1$0$0({1}SC:U),I,0,0 S:G$SADDR1$0$0({1}SC:U),I,0,0 S:G$TL4$0$0({1}SC:U),I,0,0 S:G$TH4$0$0({1}SC:U),I,0,0 S:G$EIP1$0$0({1}SC:U),I,0,0 S:G$EIP2$0$0({1}SC:U),I,0,0 S:G$SPI0CN$0$0({1}SC:U),I,0,0 S:G$PCA0H$0$0({1}SC:U),I,0,0 S:G$PCA0CPH0$0$0({1}SC:U),I,0,0 S:G$PCA0CPH1$0$0({1}SC:U),I,0,0 S:G$PCA0CPH2$0$0({1}SC:U),I,0,0 S:G$PCA0CPH3$0$0({1}SC:U),I,0,0 S:G$PCA0CPH4$0$0({1}SC:U),I,0,0 S:G$WDTCN$0$0({1}SC:U),I,0,0 S:G$TMR0$0$0({2}SI:U),I,0,0 S:G$TMR1$0$0({2}SI:U),I,0,0 S:G$TMR2$0$0({2}SI:U),I,0,0 S:G$RCAP2$0$0({2}SI:U),I,0,0 S:G$TMR3$0$0({2}SI:U),I,0,0 S:G$TMR3RL$0$0({2}SI:U),I,0,0 S:G$TMR4$0$0({2}SI:U),I,0,0 S:G$RCAP4$0$0({2}SI:U),I,0,0 S:G$ADC0$0$0({2}SI:U),I,0,0 S:G$ADC0GT$0$0({2}SI:U),I,0,0 S:G$ADC0LT$0$0({2}SI:U),I,0,0 S:G$DAC0$0$0({2}SI:U),I,0,0 S:G$DAC1$0$0({2}SI:U),I,0,0 S:G$PCA0$0$0({2}SI:U),I,0,0 S:G$PCA0CP0$0$0({2}SI:U),I,0,0 S:G$PCA0CP1$0$0({2}SI:U),I,0,0 S:G$PCA0CP2$0$0({2}SI:U),I,0,0 S:G$PCA0CP3$0$0({2}SI:U),I,0,0 S:G$PCA0CP4$0$0({2}SI:U),I,0,0 S:G$P0_0$0$0({1}SX:U),J,0,0 S:G$P0_1$0$0({1}SX:U),J,0,0 S:G$P0_2$0$0({1}SX:U),J,0,0 S:G$P0_3$0$0({1}SX:U),J,0,0 S:G$P0_4$0$0({1}SX:U),J,0,0 S:G$P0_5$0$0({1}SX:U),J,0,0 S:G$P0_6$0$0({1}SX:U),J,0,0 S:G$P0_7$0$0({1}SX:U),J,0,0 S:G$IT0$0$0({1}SX:U),J,0,0 S:G$IE0$0$0({1}SX:U),J,0,0 S:G$IT1$0$0({1}SX:U),J,0,0 S:G$IE1$0$0({1}SX:U),J,0,0 S:G$TR0$0$0({1}SX:U),J,0,0 S:G$TF0$0$0({1}SX:U),J,0,0 S:G$TR1$0$0({1}SX:U),J,0,0 S:G$TF1$0$0({1}SX:U),J,0,0 S:G$P1_0$0$0({1}SX:U),J,0,0 S:G$P1_1$0$0({1}SX:U),J,0,0 S:G$P1_2$0$0({1}SX:U),J,0,0 S:G$P1_3$0$0({1}SX:U),J,0,0 S:G$P1_4$0$0({1}SX:U),J,0,0 S:G$P1_5$0$0({1}SX:U),J,0,0 S:G$P1_6$0$0({1}SX:U),J,0,0 S:G$P1_7$0$0({1}SX:U),J,0,0 S:G$RI$0$0({1}SX:U),J,0,0 S:G$RI0$0$0({1}SX:U),J,0,0 S:G$TI$0$0({1}SX:U),J,0,0 S:G$TI0$0$0({1}SX:U),J,0,0 S:G$RB8$0$0({1}SX:U),J,0,0 S:G$RB80$0$0({1}SX:U),J,0,0 S:G$TB8$0$0({1}SX:U),J,0,0 S:G$TB80$0$0({1}SX:U),J,0,0 S:G$REN$0$0({1}SX:U),J,0,0 S:G$REN0$0$0({1}SX:U),J,0,0 S:G$SM2$0$0({1}SX:U),J,0,0 S:G$SM20$0$0({1}SX:U),J,0,0 S:G$MCE0$0$0({1}SX:U),J,0,0 S:G$SM1$0$0({1}SX:U),J,0,0 S:G$SM10$0$0({1}SX:U),J,0,0 S:G$SM0$0$0({1}SX:U),J,0,0 S:G$SM00$0$0({1}SX:U),J,0,0 S:G$S0MODE$0$0({1}SX:U),J,0,0 S:G$P2_0$0$0({1}SX:U),J,0,0 S:G$P2_1$0$0({1}SX:U),J,0,0 S:G$P2_2$0$0({1}SX:U),J,0,0 S:G$P2_3$0$0({1}SX:U),J,0,0 S:G$P2_4$0$0({1}SX:U),J,0,0 S:G$P2_5$0$0({1}SX:U),J,0,0 S:G$P2_6$0$0({1}SX:U),J,0,0 S:G$P2_7$0$0({1}SX:U),J,0,0 S:G$EX0$0$0({1}SX:U),J,0,0 S:G$ET0$0$0({1}SX:U),J,0,0 S:G$EX1$0$0({1}SX:U),J,0,0 S:G$ET1$0$0({1}SX:U),J,0,0 S:G$ES0$0$0({1}SX:U),J,0,0 S:G$ES$0$0({1}SX:U),J,0,0 S:G$ET2$0$0({1}SX:U),J,0,0 S:G$EA$0$0({1}SX:U),J,0,0 S:G$P3_0$0$0({1}SX:U),J,0,0 S:G$P3_1$0$0({1}SX:U),J,0,0 S:G$P3_2$0$0({1}SX:U),J,0,0 S:G$P3_3$0$0({1}SX:U),J,0,0 S:G$P3_4$0$0({1}SX:U),J,0,0 S:G$P3_5$0$0({1}SX:U),J,0,0 S:G$P3_6$0$0({1}SX:U),J,0,0 S:G$P3_7$0$0({1}SX:U),J,0,0 S:G$PX0$0$0({1}SX:U),J,0,0 S:G$PT0$0$0({1}SX:U),J,0,0 S:G$PX1$0$0({1}SX:U),J,0,0 S:G$PT1$0$0({1}SX:U),J,0,0 S:G$PS0$0$0({1}SX:U),J,0,0 S:G$PS$0$0({1}SX:U),J,0,0 S:G$PT2$0$0({1}SX:U),J,0,0 S:G$SMBTOE$0$0({1}SX:U),J,0,0 S:G$SMBFTE$0$0({1}SX:U),J,0,0 S:G$AA$0$0({1}SX:U),J,0,0 S:G$SI$0$0({1}SX:U),J,0,0 S:G$STO$0$0({1}SX:U),J,0,0 S:G$STA$0$0({1}SX:U),J,0,0 S:G$ENSMB$0$0({1}SX:U),J,0,0 S:G$BUSY$0$0({1}SX:U),J,0,0 S:G$CPRL2$0$0({1}SX:U),J,0,0 S:G$CT2$0$0({1}SX:U),J,0,0 S:G$TR2$0$0({1}SX:U),J,0,0 S:G$EXEN2$0$0({1}SX:U),J,0,0 S:G$TCLK$0$0({1}SX:U),J,0,0 S:G$RCLK$0$0({1}SX:U),J,0,0 S:G$EXF2$0$0({1}SX:U),J,0,0 S:G$TF2$0$0({1}SX:U),J,0,0 S:G$P$0$0({1}SX:U),J,0,0 S:G$F1$0$0({1}SX:U),J,0,0 S:G$OV$0$0({1}SX:U),J,0,0 S:G$RS0$0$0({1}SX:U),J,0,0 S:G$RS1$0$0({1}SX:U),J,0,0 S:G$F0$0$0({1}SX:U),J,0,0 S:G$AC$0$0({1}SX:U),J,0,0 S:G$CY$0$0({1}SX:U),J,0,0 S:G$CCF0$0$0({1}SX:U),J,0,0 S:G$CCF1$0$0({1}SX:U),J,0,0 S:G$CCF2$0$0({1}SX:U),J,0,0 S:G$CCF3$0$0({1}SX:U),J,0,0 S:G$CCF4$0$0({1}SX:U),J,0,0 S:G$CR$0$0({1}SX:U),J,0,0 S:G$CF$0$0({1}SX:U),J,0,0 S:G$ADLJST$0$0({1}SX:U),J,0,0 S:G$AD0LJST$0$0({1}SX:U),J,0,0 S:G$ADWINT$0$0({1}SX:U),J,0,0 S:G$AD0WINT$0$0({1}SX:U),J,0,0 S:G$ADSTM0$0$0({1}SX:U),J,0,0 S:G$AD0CM0$0$0({1}SX:U),J,0,0 S:G$ADSTM1$0$0({1}SX:U),J,0,0 S:G$AD0CM1$0$0({1}SX:U),J,0,0 S:G$ADBUSY$0$0({1}SX:U),J,0,0 S:G$AD0BUSY$0$0({1}SX:U),J,0,0 S:G$ADCINT$0$0({1}SX:U),J,0,0 S:G$AD0INT$0$0({1}SX:U),J,0,0 S:G$ADCTM$0$0({1}SX:U),J,0,0 S:G$AD0TM$0$0({1}SX:U),J,0,0 S:G$ADCEN$0$0({1}SX:U),J,0,0 S:G$AD0EN$0$0({1}SX:U),J,0,0 S:G$SPIEN$0$0({1}SX:U),J,0,0 S:G$MSTEN$0$0({1}SX:U),J,0,0 S:G$SLVSEL$0$0({1}SX:U),J,0,0 S:G$TXBSY$0$0({1}SX:U),J,0,0 S:G$RXOVRN$0$0({1}SX:U),J,0,0 S:G$MODF$0$0({1}SX:U),J,0,0 S:G$WCOL$0$0({1}SX:U),J,0,0 S:G$SPIF$0$0({1}SX:U),J,0,0 S:G$SYSCLK_Init$0$0({2}DF,SV:S),C,0,0 S:G$UART0_Init$0$0({2}DF,SV:S),C,0,0 S:G$Sys_Init$0$0({2}DF,SV:S),C,0,0 S:G$getchar_nw$0$0({2}DF,SC:U),C,0,0 S:G$_print_format$0$0({2}DF,SI:S),C,0,0 S:G$printf_small$0$0({2}DF,SV:S),C,0,0 S:G$printf$0$0({2}DF,SI:S),C,0,0 S:G$vprintf$0$0({2}DF,SI:S),C,0,0 S:G$sprintf$0$0({2}DF,SI:S),C,0,0 S:G$vsprintf$0$0({2}DF,SI:S),C,0,0 S:G$puts$0$0({2}DF,SI:S),C,0,0 S:G$getchar$0$0({2}DF,SC:U),C,0,0 S:G$putchar$0$0({2}DF,SV:S),C,0,0 S:G$printf_fast$0$0({2}DF,SV:S),C,0,0 S:G$printf_fast_f$0$0({2}DF,SV:S),C,0,0 S:G$printf_tiny$0$0({2}DF,SV:S),C,0,0 S:G$atof$0$0({2}DF,SF:S),C,0,0 S:G$atoi$0$0({2}DF,SI:S),C,0,0 S:G$atol$0$0({2}DF,SL:S),C,0,0 S:G$_uitoa$0$0({2}DF,SV:S),C,0,0 S:G$_itoa$0$0({2}DF,SV:S),C,0,0 S:G$_ultoa$0$0({2}DF,SV:S),C,0,0 S:G$_ltoa$0$0({2}DF,SV:S),C,0,0 S:G$rand$0$0({2}DF,SI:S),C,0,0 S:G$srand$0$0({2}DF,SV:S),C,0,0 S:G$calloc$0$0({2}DF,DX,SV:S),C,0,0 S:G$malloc$0$0({2}DF,DX,SV:S),C,0,0 S:G$realloc$0$0({2}DF,DX,SV:S),C,0,0 S:G$aligned_alloc$0$0({2}DF,DG,SV:S),C,0,0 S:G$free$0$0({2}DF,SV:S),C,0,0 S:G$abs$0$0({2}DF,SI:S),C,0,0 S:G$labs$0$0({2}DF,SL:S),C,0,0 S:G$mblen$0$0({2}DF,SI:S),C,0,0 S:G$mbtowc$0$0({2}DF,SI:S),C,0,0 S:G$wctomb$0$0({2}DF,SI:S),C,0,0 S:G$main$0$0({2}DF,SV:S),C,0,0 S:Flab3servo$__str_0$0$0({39}DA39d,SC:S),D,0,0 S:Flab3servo$__str_1$0$0({97}DA97d,SC:S),D,0,0 S:Flab3servo$__str_2$0$0({79}DA79d,SC:S),D,0,0 S:Flab3servo$__str_3$0$0({49}DA49d,SC:S),D,0,0 S:Flab3servo$__str_4$0$0({80}DA80d,SC:S),D,0,0 S:Flab3servo$__str_5$0$0({14}DA14d,SC:S),D,0,0 ",8345,True,2541.2651003522474,median "#include-once ; #INDEX# ======================================================================================================================= ; Title .........: UI Simple Wrappers ; AutoIt Version : 3.3.14.5 ; UDF Version ...: 0.0.0.1 ; Language ......: English ; Description ...: A collection of functions for using UI Automation. Simply. ; Author(s) .....: Seadoggie01 ; Modified.......: 20210120 (YYYYMMDD) ; Contributors ..: LarsJ (this is based almost entirely off of his examples) ; junkew (without his UDF, I never would've attempted this) ; Resources .....: ; =============================================================================================================================== #include ; This needs to be downloaded elsewhere. I've used the version available here --> https://www.autoitscript.com/forum/topic/201683-ui-automation-udfs/ ; #include ; This was here for my reference (with TreeView scope(?). I still don't quite get them) ; Currently supported property values for text parsing: Bool, Type, Class, Name, ID, AccessKey, AcceleratorKey, LegacyIAccessibleState ; See __UIW_ParsePropertyCondition for more info #CS This has been a long journey. It all started with a program that default AutoIt functions couldn't handle. I started trying to use junkew's UDF, but I was too new to AutoIt and too impatient. When I didn't get results fast enough, I switched to Mouse* functions. Later, I returned to find LarsJ's examples. I was confused how his code was so different, but I gave it a shot. I got a couple things working, but I hated pointer variables. This UDF stems from my hatred of pointers. Yeah. After I started getting things working, I noticed the repetitiveness of the code. Then I got the idea to start combining some of the conditions into simpler terms. I realized the AutoIt methods made a lot of sense, so I modeled it after them. Hopefully, you find this UDF helpful, enlighning, and/or hysterical. -- Seadoggie01 P.S. Like with all my code, steal it, break it, warp it, just don't pretend it's yours... unless it's broken... then it's all yours! Remarks: * This looks like a TON of functions, I know. However, a lot of these are shortcuts for _UIW_PropertyCondition. They just specify the $UIA_PropertyId for you. AND most of the functions accept a string instead of a control, skipping these functions entirely. Again, see examples! * Because of the compound nature of some of these functions, I've implemented the function _UIW_ErrorStack. This contains the name and error from each function The stack is only ever cleared by YOU! It returns an array of [[function, error]], which you can pass to _ArrayDisplay to track down errors. Hopefully, I can ditch this in the future, as I hate it now. * The global UI Automation object is used when a string is passed to a function instead of a condition. This allows me to build a condition from the string. See Examples. The object is only set when _UIW_Create is called, so it's a good idea (mandatory?) to use this function first. * I don't think I implemented nearly enough error handlers in these functions (I got bored), so a global error handler probably isn't a bad idea #CE Global $__g_oUIAutomation #Region ### Global Consts ### Global Const $UIW_IAccessible[2] = [$sIID_IAccessible, $dtagIAccessible] Global Const $UIW_IRawElementProviderSimple[2] = [$sIID_IRawElementProviderSimple, $dtagIRawElementProviderSimple] Global Const $UIW_Automation[2] = [$sIID_IUIAutomation, $dtagIUIAutomation] Global Const $UIW_AndCondition[2] = [$sIID_IUIAutomationAndCondition, $dtagIUIAutomationAndCondition] Global Const $UIW_BoolCondition[2] = [$sIID_IUIAutomationBoolCondition, $dtagIUIAutomationBoolCondition] Global Const $UIW_CacheRequest[2] = [$sIID_IUIAutomationCacheRequest, $dtagIUIAutomationCacheRequest] Global Const $UIW_Condition[2] = [$sIID_IUIAutomationCondition, $dtagIUIAutomationCondition] Global Const $UIW_DockPattern[3] = [$sIID_IUIAutomationDockPattern, $dtagIUIAutomationDockPattern, $UIA_DockPatternId] Global Const $UIW_Element[2] = [$sIID_IUIAutomationElement, $dtagIUIAutomationElement] Global Const $UIW_ElementArray[2] = [$sIID_IUIAutomationElementArray, $dtagIUIAutomationElementArray] Global Const $UIW_EventHandler[2] = [$sIID_IUIAutomationEventHandler, $dtagIUIAutomationEventHandler] Global Const $UIW_ExpandCollapsePattern[3] = [$sIID_IUIAutomationExpandCollapsePattern, $dtagIUIAutomationExpandCollapsePattern, $UIA_ExpandCollapsePatternId] Global Const $UIW_ExpandCollapseState[3] = [$sIID_IUIAutomationExpandCollapsePattern, $dtagIUIAutomationExpandCollapsePattern, $UIA_ExpandCollapsePatternId] Global Const $UIW_FocusChangedEventHandler[2] = [$sIID_IUIAutomationFocusChangedEventHandler, $dtagIUIAutomationFocusChangedEventHandler] Global Const $UIW_GridItemPattern[3] = [$sIID_IUIAutomationGridItemPattern, $dtagIUIAutomationGridItemPattern, $UIA_GridItemPatternId] Global Const $UIW_GridPattern[3] = [$sIID_IUIAutomationGridPattern, $dtagIUIAutomationGridPattern, $UIA_GridPatternId] Global Const $UIW_InvokePattern[3] = [$sIID_IUIAutomationInvokePattern, $dtagIUIAutomationInvokePattern, $UIA_InvokePatternId] Global Const $UIW_ItemContainerPattern[3] = [$sIID_IUIAutomationItemContainerPattern, $dtagIUIAutomationItemContainerPattern, $UIA_ItemContainerPatternId] Global Const $UIW_LegacyIAccessiblePattern[3] = [$sIID_IUIAutomationLegacyIAccessiblePattern, $dtagIUIAutomationLegacyIAccessiblePattern, $UIA_LegacyIAccessiblePatternId] Global Const $UIW_MultipleViewPattern[3] = [$sIID_IUIAutomationMultipleViewPattern, $dtagIUIAutomationMultipleViewPattern, $UIA_MultipleViewPatternId] Global Const $UIW_NotCondition[2] = [$sIID_IUIAutomationNotCondition, $dtagIUIAutomationNotCondition] Global Const $UIW_OrCondition[2] = [$sIID_IUIAutomationOrCondition, $dtagIUIAutomationOrCondition] Global Const $UIW_PropertyChangedEventHandler[2] = [$sIID_IUIAutomationPropertyChangedEventHandler, $dtagIUIAutomationPropertyChangedEventHandler] Global Const $UIW_PropertyCondition[2] = [$sIID_IUIAutomationPropertyCondition, $dtagIUIAutomationPropertyCondition] Global Const $UIW_ProxyFactory[2] = [$sIID_IUIAutomationProxyFactory, $dtagIUIAutomationProxyFactory] Global Const $UIW_ProxyFactoryEntry[2] = [$sIID_IUIAutomationProxyFactoryEntry, $dtagIUIAutomationProxyFactoryEntry] Global Const $UIW_ProxyFactoryMapping[2] = [$sIID_IUIAutomationProxyFactoryMapping, $dtagIUIAutomationProxyFactoryMapping] Global Const $UIW_RangeValuePattern[3] = [$sIID_IUIAutomationRangeValuePattern, $dtagIUIAutomationRangeValuePattern, $UIA_RangeValuePatternId] Global Const $UIW_ScrollItemPattern[3] = [$sIID_IUIAutomationScrollItemPattern, $dtagIUIAutomationScrollItemPattern, $UIA_ScrollItemPatternId] Global Const $UIW_ScrollPattern[3] = [$sIID_IUIAutomationScrollPattern, $dtagIUIAutomationScrollPattern, $UIA_ScrollPatternId] Global Const $UIW_SelectionItemPattern[3] = [$sIID_IUIAutomationSelectionItemPattern, $dtagIUIAutomationSelectionItemPattern, $UIA_SelectionItemPatternId] Global Const $UIW_SelectionPattern[3] = [$sIID_IUIAutomationSelectionPattern, $dtagIUIAutomationSelectionPattern, $UIA_SelectionPatternId] Global Const $UIW_StructureChangedEventHandler[2] = [$sIID_IUIAutomationStructureChangedEventHandler, $dtagIUIAutomationStructureChangedEventHandler] Global Const $UIW_SynchronizedInputPattern[3] = [$sIID_IUIAutomationSynchronizedInputPattern, $dtagIUIAutomationSynchronizedInputPattern, $UIA_SynchronizedInputPatternId] Global Const $UIW_TableItemPattern[3] = [$sIID_IUIAutomationTableItemPattern, $dtagIUIAutomationTableItemPattern, $UIA_TableItemPatternId] Global Const $UIW_TablePattern[3] = [$sIID_IUIAutomationTablePattern, $dtagIUIAutomationTablePattern, $UIA_TablePatternId] Global Const $UIW_TextPattern[3] = [$sIID_IUIAutomationTextPattern, $dtagIUIAutomationTextPattern, $UIA_TextPatternId] Global Const $UIW_TextRange[2] = [$sIID_IUIAutomationTextRange, $dtagIUIAutomationTextRange] Global Const $UIW_TextRangeArray[2] = [$sIID_IUIAutomationTextRangeArray, $dtagIUIAutomationTextRangeArray] Global Const $UIW_TogglePattern[3] = [$sIID_IUIAutomationTogglePattern, $dtagIUIAutomationTogglePattern, $UIA_TogglePatternId] Global Const $UIW_TransformPattern[3] = [$sIID_IUIAutomationTransformPattern, $dtagIUIAutomationTransformPattern, $UIA_TransformPatternId] Global Const $UIW_TreeWalker[2] = [$sIID_IUIAutomationTreeWalker, $dtagIUIAutomationTreeWalker] Global Const $UIW_ValuePattern[3] = [$sIID_IUIAutomationValuePattern, $dtagIUIAutomationValuePattern, $UIA_ValuePatternId] Global Const $UIW_VirtualizedItemPattern[3] = [$sIID_IUIAutomationVirtualizedItemPattern, $dtagIUIAutomationVirtualizedItemPattern, $UIA_VirtualizedItemPatternId] Global Const $UIW_WindowPattern[3] = [$sIID_IUIAutomationWindowPattern, $dtagIUIAutomationWindowPattern, $UIA_WindowPatternId] #EndRegion ### Global Consts ### ; #FUNCTION# ==================================================================================================================== ; Name ..........: _UIW_AcceleratorKey ; Description ...: ; Syntax ........: _UIW_AcceleratorKey($oUIAutomation, $sCondition) ; Parameters ....: $oUIAutomation - an object. ; $sCondition - a string value. ; Return values .: None ; Author ........: Seadoggie01 ; Modified ......: June 1, 2020 (@14:55:10) ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _UIW_AcceleratorKeyPropertyCondition($oUIAutomation, $sCondition) Local $ret = _UIW_PropertyCondition($oUIAutomation, $UIA_AcceleratorKeyPropertyId, $sCondition) Return SetError(@error, @extended, $ret) EndFunc ;==>_UIW_AcceleratorKeyPropertyCondition ; #FUNCTION# ==================================================================================================================== ; Name ..........: _UIW_AccessKeyPropery ; Description ...: ; Syntax ........: _UIW_AccessKeyPropery($oUIAutomation, $sCondition) ; Parameters ....: $oUIAutomation - an object. ; $sCondition - a string value. ; Return values .: None ; Author ........: Seadoggie01 ; Modified ......: October 14, 2020 ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _UIW_AccessKeyProperyCondition($oUIAutomation, $sCondition) Local $ret = _UIW_PropertyCondition($oUIAutomation, $UIA_AccessKeyPropertyId, $sCondition) Return SetError(@error, @extended, $ret) EndFunc ;==>_UIW_AccessKeyProperyCondition ; #FUNCTION# ==================================================================================================================== ; Name ..........: _UIW_AutomationIdProperty ; Description ...: ; Syntax ........: _UIW_AutomationIdProperty($oUIAutomation, $sCondition) ; Parameters ....: $oUIAutomation - an object. ; $sCondition - a string value. ; Return values .: None ; Author ........: Seadoggie01 ; Modified ......: October 14, 2020 ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _UIW_AutomationIdPropertyCondition($oUIAutomation, $sCondition) Local $ret = _UIW_PropertyCondition($oUIAutomation, $UIA_AutomationIdPropertyId, $sCondition) Return SetError(@error, @extended, $ret) EndFunc ;==>_UIW_AutomationIdPropertyCondition ; #FUNCTION# ==================================================================================================================== ; Name ..........: _UIW_BoolCondition ; Description ...: Creates a boolean condition for matching all or no elements ; Syntax ........: _UIW_BoolCondition($oUIAutomation, $bValue) ; Parameters ....: $oUIAutomation - an object. ; $bValue - a boolean value. ; Return values .: Success - A pointer to the requested bool condition ; Failure - False and sets @error = 1 ; Author ........: Seadoggie01 ; Modified ......: October 14, 2020 ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _UIW_BoolCondition($oUIAutomation, $bValue) If Not IsBool($bValue) Then $bValue = StringLower($bValue) = ""true"" Local $pCondition If $bValue Then $oUIAutomation.CreateTrueCondition($pCondition) Else $oUIAutomation.CreateFalseCondition($pCondition) EndIf ; If it's not a pointer If Not $pCondition Then Return SetError(_UIW_ErrorStack(1, ""_UIW_BoolCondition""), 0, False) Return $pCondition EndFunc ;==>_UIW_BoolCondition ; #FUNCTION# ==================================================================================================================== ; Name ..........: _UIW_BoundingRectangle ; Description ...: Gets the edges of a control. Useful for clicking. ; Syntax ........: _UIW_BoundingRectangle($oControl) ; Parameters ....: $oControl - an object. ; Return values .: Success - a bounding array ; Failure - False and sets @error = 1 ; Author ........: Seadoggie01 ; Modified ......: October 14, 2020 ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _UIW_BoundingRectangle($oControl) Local $aRect $oControl.GetCurrentPropertyValue($UIA_BoundingRectanglePropertyId, $aRect) If Not IsArray($aRect) Then Return SetError(_UIW_ErrorStack(1, ""_UIW_BoundingRectangle""), 0, False) Return $aRect EndFunc ;==>_UIW_BoundingRectangle ; #FUNCTION# ==================================================================================================================== ; Name ..........: _UIW_ClassNameProperty ; Description ...: Creates a class name property from the supplied string ; Syntax ........: _UIW_ClassNameProperty($oUIAutomation, $sCondition) ; Parameters ....: $oUIAutomation - an object. ; $sCondition - a string value. ; Return values .: Success - A pointer to a class name property ; Failure - ; Author ........: Seadoggie01 ; Modified ......: October 14, 2020 ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _UIW_ClassNamePropertyCondition($oUIAutomation, $sCondition) Local $ret = _UIW_PropertyCondition($oUIAutomation, $UIA_ClassNamePropertyId, $sCondition) Return SetError(@error, @extended, $ret) EndFunc ;==>_UIW_ClassNamePropertyCondition ; #FUNCTION# ==================================================================================================================== ; Name ..........: _UIW_ControlPattern ; Description ...: Gets the value of the specified Control pattern for the control ; Syntax ........: _UIW_ControlPattern($oControl, $iProperty) ; Parameters ....: $oControl - an object. ; $iProperty - an integer value. ; Return values .: Success - the value of the Control pattern ; Failure - False and sets @error: ; |1 - $oControl isn't an object ; |2 - COM Error: @extended is set to error ; Author ........: Seadoggie01 - December 4, 2019 ; Modified ......: October 14, 2020 ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _UIW_ControlPattern($oControl, $iProperty) If Not __UIW_Param($oControl, ""Object"", ""InterfaceDispatch"") Then Return SetError(1, 0, False) Local $iRet $oControl.GetCurrentPropertyValue($iProperty, $iRet) If @error Then Return SetError(2, @error, False) Return $iRet EndFunc ;==>_UIW_ControlPattern ; #FUNCTION# ==================================================================================================================== ; Name ..........: _UIW_ControlTypeProperty ; Description ...: ; Syntax ........: _UIW_ControlTypeProperty($oUIAutomation, $ControlTypeId) ; Parameters ....: $oUIAutomation - an object. ; $ControlTypeId - an unknown value. ; Return values .: None ; Author ........: Seadoggie01 ; Modified ......: October 14, 2020 ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _UIW_ControlTypePropertyCondition($oUIAutomation, $ControlTypeId) Local $ret = _UIW_PropertyCondition($oUIAutomation, $UIA_ControlTypePropertyId, $ControlTypeId) Return SetError(@error, @extended, $ret) EndFunc ;==>_UIW_ControlTypePropertyCondition ; #FUNCTION# ==================================================================================================================== ; Name ..........: _UIW_Create ; Description ...: Gets a UIAutomation object ; Syntax ........: _UIW_Create() ; Parameters ....: None ; Return values .: Success - A UI Automation object ; Failure - False and sets @error to 1 ; Author ........: Seadoggie01 ; Modified ......: October 14, 2020 ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _UIW_Create() Local $oUIAutomation = ObjCreateInterface($sCLSID_CUIAutomation, $sIID_IUIAutomation, $dtagIUIAutomation) If Not IsObj($oUIAutomation) Then _UIW_ErrorStack(""_UIW_Create"", 1) Return SetError(1, 0, False) EndIf $__g_oUIAutomation = $oUIAutomation Return $oUIAutomation EndFunc ;==>_UIW_Create ; #FUNCTION# ==================================================================================================================== ; Name ..........: _UIW_CreateAndCondition ; Description ...: ; Syntax ........: _UIW_CreateAndCondition($oUIAutomation, $pCondition1, $pCondition2) ; Parameters ....: $oUIAutomation - an object. ; $pCondition1 - a pointer value. ; $pCondition2 - a pointer value. ; Return values .: Success - an AndCondtion ; Failure - False and Sets @error = 1 ; Author ........: Seadoggie01 ; Modified ......: October 14, 2020 ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _UIW_CreateAndCondition($oUIAutomation, $pCondition1, $pCondition2) Local $pRetCondition $oUIAutomation.CreateAndCondition($pCondition1, $pCondition2, $pRetCondition) If Not $pRetCondition Then _UIW_ErrorStack(1, ""_UIW_CreateAndCondition"") Return SetError(1, 0, False) EndIf Return $pRetCondition EndFunc ;==>_UIW_CreateAndCondition ; #FUNCTION# ==================================================================================================================== ; Name ..........: _UIW_CreateAndConditionFromArray ; Description ...: Creates a single condition from an array of conditions ; Syntax ........: _UIW_CreateAndConditionFromArray($oUIAutomation, $aConditions) ; Parameters ....: $oUIAutomation - an object. ; $aConditions - an 0-based 1D array of conditions. ; Return values .: a condition that includes all conditions ; Author ........: Seadoggie01 ; Modified ......: January 21, 2021 ; Remarks .......: This is a cheap trick because I couldn't get it to work. It works though. ; This is useful when you need many conditions to find an object. ; Related .......: _UIW_CreateAndCondition ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _UIW_CreateAndConditionFromArray($oUIAutomation, $aConditions) ;#ToDo: Works, but check if performance benefit from using CreateAndConditionFromArray? @LarsJ Local $pAndCondition = $aConditions[0] For $i = 1 To UBound($aConditions) - 1 $pAndCondition = _UIW_CreateAndCondition($oUIAutomation, $pAndCondition, $aConditions[$i]) Next Return $pAndCondition EndFunc ;==>_UIW_CreateAndConditionFromArray ; #FUNCTION# ==================================================================================================================== ; Name ..........: _UIW_CreateOrCondition ; Description ...: ; Syntax ........: _UIW_CreateOrCondition($oUIAutomation, $pCondition1, $pCondition2) ; Parameters ....: $oUIAutomation - an object. ; $pCondition1 - a pointer value. ; $pCondition2 - a pointer value. ; Return values .: Success - an AndCondtion ; Failure - False and Sets @error = 1 ; Author ........: Seadoggie01 ; Modified ......: October 14, 2020 ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _UIW_CreateOrCondition($oUIAutomation, $pCondition1, $pCondition2) Local $pRetCondition $oUIAutomation.CreateOrCondition($pCondition1, $pCondition2, $pRetCondition) If Not $pRetCondition Then _UIW_ErrorStack(1, ""_UIW_CreateAndCondition"") Return SetError(1, 0, False) EndIf Return $pRetCondition EndFunc ;==>_UIW_CreateOrCondition ; #FUNCTION# ==================================================================================================================== ; Name ..........: _UIW_ElementFromPoint ; Description ...: Gets the element underneath a point on the screen ; Syntax ........: _UIW_ElementFromPoint($oUIAutomation, $iX, $iY) ; Parameters ....: $oUIAutomation - an object. ; $iX - an integer value. ; $iY - an integer value. ; Return values .: Success - the element underneath the point ; Failure - False and sets @error: ; |3 - Unable to create element from point ; Author ........: Seadoggie01 ; Modified ......: January 21, 2021 ; Remarks .......: Not well tested... if at all. Use caution? ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _UIW_ElementFromPoint($oUIAutomation, $iX, $iY) Local $tStructPoint = DllStructCreate(""int x; int y"") DllStructSetData($tStructPoint, ""x"", $iX) DllStructSetData($tStructPoint, ""y"", $iY) Local $pElement $oUIAutomation.GetElementFromPoint($tStructPoint, $pElement) Local $oElement = ObjCreateInterface($pElement, $sIID_IUIAutomationElement, $dtagIUIAutomationElement) If Not IsObj($oElement) Then Return SetError(3, 0, False) Return $oElement EndFunc ; #FUNCTION# ==================================================================================================================== ; Name ..........: _UIW_ElementProperty ; Description ...: Gets the property of an element ; Syntax ........: _UIW_ElementProperty($oElement, $sProperty) ; Parameters ....: $oElement - an object. ; $sProperty - the property name to get. ; Return values .: Success - The requested property value ; Failure - False and sets @error: ; |1 - $oElement isn't an Object ; |2 - Unsupported Property name ; |3 - COM Error and sets @extended = COM error ; Author ........: Seadoggie01 ; Modified ......: January 21, 2021 ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _UIW_ElementProperty($oElement, $sProperty) If Not __UIW_Param($oElement, ""Object"", ""InterfaceDispatch"") Then _UIW_ErrorStack(1, ""_UIW_ElementProperty"") Return SetError(1, 0, False) EndIf Local $vRet = """" Local $hErr = __UIW_ErrHnd() #forceref $hErr Switch StringLower($sProperty) Case ""acceleratorkey"" $oElement.CurrentAcceleratorKey($vRet) Case ""accesskey"" $oElement.CurrentAccessKey($vRet) Case ""ariaproperties"" $oElement.CurrentAriaProperties($vRet) Case ""ariarole"" $oElement.CurrentAriaRole($vRet) Case ""automationid"" $oElement.CurrentAutomationId($vRet) Case ""boundingrectangle"" $oElement.CurrentBoundingRectangle($vRet) Case ""classname"" $oElement.CurrentClassName($vRet) Case ""controllerfor"" $oElement.CurrentControllerFor($vRet) Case ""controltype"" $oElement.CurrentControlType($vRet) Case ""culture"" $oElement.CurrentCulture($vRet) Case ""describedby"" $oElement.CurrentDescribedBy($vRet) Case ""flowsto"" $oElement.CurrentFlowsTo($vRet) Case ""frameworkid"" $oElement.CurrentFrameworkId($vRet) Case ""haskeyboardfocus"" $oElement.CurrentHasKeyboardFocus($vRet) Case ""helptext"" $oElement.CurrentHelpText($vRet) Case ""iscontentelement"" $oElement.CurrentIsContentElement($vRet) Case ""iscontrolelement"" $oElement.CurrentIsControlElement($vRet) Case ""isdatavalidforform"" $oElement.CurrentIsDataValidForForm($vRet) Case ""isenabled"" $oElement.CurrentIsEnabled($vRet) Case ""iskeyboardfocusable"" $oElement.CurrentIsKeyboardFocusable($vRet) Case ""isoffscreen"" $oElement.CurrentIsOffscreen($vRet) Case ""ispassword"" $oElement.CurrentIsPassword($vRet) Case ""isrequiredforform"" $oElement.CurrentIsRequiredForForm($vRet) Case ""itemstatus"" $oElement.CurrentItemStatus($vRet) Case ""itemtype"" $oElement.CurrentItemType($vRet) Case ""labeledby"" $oElement.CurrentLabeledBy($vRet) Case ""localizedcontroltype"" $oElement.CurrentLocalizedControlType($vRet) Case ""name"" $oElement.CurrentName($vRet) Case ""nativewindowhandle"" $oElement.CurrentNativeWindowHandle($vRet) Case ""orientation"" $oElement.CurrentOrientation($vRet) Case ""processid"" $oElement.CurrentProcessId($vRet) Case ""providerdescription"" $oElement.CurrentProviderDescription($vRet) Case ""getcurrentpattern"" $oElement.GetCurrentPattern($vRet) Case ""getcurrentpatternas"" $oElement.GetCurrentPatternAs($vRet) Case ""getcurrentpropertyvalue"" $oElement.GetCurrentPropertyValue($vRet) Case ""getcurrentpropertyvalueex"" $oElement.GetCurrentPropertyValueEx($vRet) Case ""runtimeid"" $oElement.GetRuntimeId($vRet) Case Else Return SetError(2, 0, False) EndSwitch If @error Then Return SetError(3, @error, False) Return $vRet EndFunc ;==>_UIW_ElementProperty ; #FUNCTION# ==================================================================================================================== ; Name ..........: _UIW_ErrorStack ; Description ...: Call this to get the stack of errors. Don't pass params to get the stack. ; Syntax ........: _UIW_ErrorStack([$iError = 0[, $sFunction = """"]]) ; Parameters ....: $iError - [optional] an integer value. Default is 0. ; $sFunction - [optional] a string value. Default is """". ; Return values .: 0-Based 2D array of [Function Name, Error] in the order of occurance ; Author ........: Seadoggie01 ; Modified ......: October 14, 2020 ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _UIW_ErrorStack($iError = 0, $sFunction = """") Static $aErrors[0] If $iError = 0 Then ; Copy the errors Local $aRet = $aErrors ; Clear the error stack ReDim $aErrors[0] ; Return the error stack Return $aRet Else ReDim $aErrors[UBound($aErrors) + 1] $aErrors[UBound($aErrors) - 1] = $sFunction & "":"" & $iError Return $iError EndIf EndFunc ;==>_UIW_ErrorStack ; #FUNCTION# ==================================================================================================================== ; Name ..........: _UIW_ExpandCollapse ; Description ...: Expands or collapses a control ; Syntax ........: _UIW_ExpandCollapse($oControl[, $bExpand = True]) ; Parameters ....: $oControl - an object. ; $bExpand - [optional] a boolean value. Default is True. ; Return values .: None ; Author ........: Seadoggie01 ; Modified ......: October 14, 2020 ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _UIW_ExpandCollapse($oControl, $bExpand = Default) If $bExpand = Default Then $bExpand = True Local $oExpand = _UIW_GetCurrentPattern($oControl, $UIW_ExpandCollapsePattern) If @error Then Return SetError(1, 0, False) If $bExpand Then $oExpand.Expand() Else $oExpand.Collapse() EndIf If @error Then SetError(2, @error) _UIW_ErrorStack(2, ""_UIW_ExpandCollapse"") Return False EndIf Return True EndFunc ;==>_UIW_ExpandCollapse ; #FUNCTION# ==================================================================================================================== ; Name ..........: _UIW_FindAll ; Description ...: Finds all elements matching the condition ; Syntax ........: _UIW_FindAll($oParent, $vCondition[, $TreeScope = $TreeScope_Children]) ; Parameters ....: $oParent - an object. ; $vCondition - a pointer value or a string to create a condtion with. ; $TreeScope - [optional] the scope of the search, a value of TreeScope. Default is $TreeScope_Children. ; Return values .: Success - an array of matching elements. ; Failue - False and sets @error: ; | 1 - $vCondtion isn't a pointer and couldn't be parsed ; | 2 - $oParent.FindAll returned no matches ; | 3 - $oParent isn't an object ; Author ........: Seadoggie01 ; Modified ......: January 21, 2021 ; Remarks .......: ; Related .......: _UIW_FindFirst ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _UIW_FindAll($oParent, $vCondition, $TreeScope = $TreeScope_Children) If Not __UIW_Param($oParent, ""Object"", ""InterfaceDispatch"") Then _UIW_ErrorStack(3, ""_UIW_FindAll"") Return SetError(3, 0, False) EndIf $vCondition = __UIW_ParseCondition($__g_oUIAutomation, $vCondition) If @error Then _UIW_ErrorStack(1, ""_UIW_FindAll"") Return SetError(1, 0, False) EndIf Local $pCollection $oParent.FindAll($TreeScope, $vCondition, $pCollection) Local $oCollection = ObjCreateInterface($pCollection, $sIID_IUIAutomationElementArray, $dtagIUIAutomationElementArray) If Not IsObj($oCollection) Then Return SetError(_UIW_ErrorStack(2, ""_UIW_FindAll""), 0, False) Return __UIW_ElementArrayToArray($oCollection) EndFunc ;==>_UIW_FindAll ; #FUNCTION# ==================================================================================================================== ; Name ..........: _UIW_FindFirst ; Description ...: Finds the first child matching the condition ; Syntax ........: _UIW_FindFirst($oParent, $vCondition[, $TreeScope = $TreeScope_Children]) ; Parameters ....: $oParent - an object. ; $vCondition - a condition pointer or a string to be parsed. ; $TreeScope - [optional] the scope of the search, a value of TreeScope. Default is $TreeScope_Children. ; Return values .: Success - the first object matching the condition ; Failure - False and sets @error: ; | 1 - $oParent isn't an object ; | 2 - Can't parse string condition ; | 3 - No children found matching ; | 4 - Can't create object from child pointer ; | 5 - COM error. @extended = COM Error ; Author ........: Seadoggie01 ; Modified ......: January 21, 2021 ; Remarks .......: ; Related .......: _UIW_FindAll ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _UIW_FindFirst($oParent, $vCondition, $TreeScope = Default) If Not IsObj($oParent) Then Return SetError(_UIW_ErrorStack(1, ""_UIW_FindFirst""), @error, False) If IsKeyword($TreeScope) Then $TreeScope = $TreeScope_Children $vCondition = __UIW_ParseCondition($__g_oUIAutomation, $vCondition) If @error Then Return SetError(2, @extended, _UIW_ErrorStack(2, ""_UIW_FindFirst"")) Local $hErr = __UIW_ErrHnd() #forceref $hErr Local $pResult $oParent.FindFirst($TreeScope, $vCondition, $pResult) If @error Then Return SetError(_UIW_ErrorStack(5, ""_UIW_FindFirst""), @error, False) If Not $pResult Then Return SetError(_UIW_ErrorStack(3, ""_UIW_FindFirst""), @error, False) Local $oResult = ObjCreateInterface($pResult, $sIID_IUIAutomationElement, $dtagIUIAutomationElement) If Not IsObj($oResult) Then Return SetError(_UIW_ErrorStack(4, ""_UIW_FindFirst""), @error, False) Return $oResult EndFunc ;==>_UIW_FindFirst ; #FUNCTION# ==================================================================================================================== ; Name ..........: _UIW_GetCurrentPattern ; Description ...: Gets the pattern from an element ; Syntax ........: _UIW_GetCurrentPattern($oParent, $aPatternId) ; Parameters ....: $oParent - an object. ; $aPatternId - an array of unknowns. ; Return values .: Success - the pattern object ; Failure - False and sets @error: ; | 1 - $aPatternId isn't an array ; | 2 - $oParent isn't an object ; | 3 - $aPatternId is invalid for this $oParent ; Author ........: Seadoggie01 ; Modified ......: October 14, 2020 ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _UIW_GetCurrentPattern($oParent, $aPatternId) Local $pValue, $oValue If Not IsArray($aPatternId) Then _UIW_ErrorStack(1, ""_UIW_GetCurrentPattern"") Return SetError(1, 2, False) EndIf If Not IsObj($oParent) Then _UIW_ErrorStack(2, ""_UIW_GetCurrentPattern"") Return SetError(2, 0, False) EndIf $oParent.GetCurrentPattern($aPatternId[2], $pValue) $oValue = ObjCreateInterface($pValue, $aPatternId[0], $aPatternId[1]) If Not IsObj($oValue) Then _UIW_ErrorStack(3, ""_UIW_GetCurrentPattern"") Return SetError(3, 0, False) EndIf Return $oValue EndFunc ;==>_UIW_GetCurrentPattern ; #FUNCTION# ==================================================================================================================== ; Name ..........: _UIW_Invoke ; Description ...: Invokes a control ; Syntax ........: _UIW_Invoke($oControl) ; Parameters ....: $oControl - an object. ; Return values .: Success - True ; Failure - False and sets @error = 1 ; Author ........: Seadoggie01 ; Modified ......: October 14, 2020 ; Remarks .......: Like clicking without the mouse ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _UIW_Invoke($oControl) Local $oInvoke = _UIW_GetCurrentPattern($oControl, $UIW_InvokePattern) If @error Then Return SetError(_UIW_ErrorStack(1, ""_UIW_SetValue""), 0, False) $oInvoke.Invoke() EndFunc ;==>_UIW_Invoke Func _UIW_LegacyIAccessibleStatePropertyCondition($oUIAutomation, $sCondition) Local $ret = _UIW_PropertyCondition($oUIAutomation, $UIA_LegacyIAccessibleStatePropertyId, $sCondition) Return SetError(@error, @extended, $ret) EndFunc ;==>_UIW_LegacyIAccessibleStatePropertyCondition Func _UIW_LegacyIAccessibleSelect($oControl) Local $oSelect = _UIW_GetCurrentPattern($oControl, $UIW_LegacyIAccessiblePattern) If @error Then Return SetError(1, 0, False) $oSelect.Select(0x8) EndFunc ; #FUNCTION# ==================================================================================================================== ; Name ..........: _UIW_MouseClick ; Description ...: Clicks on a control using the bounding rectange with $sButton ; Syntax ........: _UIW_MouseClick($oControl[, $sButton = Default[, $bBounce = Default]]) ; Parameters ....: $oControl - an object. ; $sButton - [optional] button to click with. Default is ""left"". ; $bBounce - [optional] True to move mouse and return when finished. Default is True. ; Return values .: Success - True ; Failure - False and sets @error ; | 1 - Unable to get bounding rectange ; Author ........: LarsJ, Seadoggie01 ; Modified ......: January 21, 2021 ; Remarks .......: I created a mouse click bounce function which had an option for which button to use... I copied ; + LarJ's idea for hidding the mouse. This is a modification of both of our functions. ; It seems to not work in some locations on a multi-monitor setup (mine uses two differently sized screens) ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _UIW_MouseClick($oControl, $sButton = Default, $bBounce = Default) If IsKeyword($sButton) Then $sButton = ""left"" If IsKeyword($bBounce) Then $bBounce = True ; Get the edges of the control Local $aBounds = _UIW_BoundingRectangle($oControl) If @error Then Return SetError(_UIW_ErrorStack(""_UIW_MouseClick"", 1), 0, False) ; get the mouse's current position Local $aMousePos = MouseGetPos() ; Hide the mouse DllCall(""user32.dll"", ""int"", ""ShowCursor"", ""bool"", False) ; Trap the mouse at the specified location __UIW_MouseTrap($aBounds[0] + $aBounds[2] / 2, $aBounds[1] + $aBounds[3] / 2, $aBounds[0] + $aBounds[2] / 2, $aBounds[1] + $aBounds[3] / 2) ; Perform the click MouseClick($sButton, $aBounds[0] + $aBounds[2] / 2, $aBounds[1] + $aBounds[3] / 2, 1, 0) ; Release the trap __UIW_MouseTrap() ; Move the mouse back If $bBounce Then MouseMove($aMousePos[0], $aMousePos[1], 0) ; Show the mouse DllCall(""user32.dll"", ""int"", ""ShowCursor"", ""bool"", True) Return True EndFunc ;==>_UIW_MouseClick ; #FUNCTION# ==================================================================================================================== ; Name ..........: _UIW_NameProperty ; Description ...: ; Syntax ........: _UIW_NameProperty($oUIAutomation, $sCondition) ; Parameters ....: $oUIAutomation - an object. ; $sCondition - a string value. ; Return values .: None ; Author ........: Seadoggie01 ; Modified ......: October 14, 2020 ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _UIW_NamePropertyCondition($oUIAutomation, $sCondition) Local $ret = _UIW_PropertyCondition($oUIAutomation, $UIA_NamePropertyId, $sCondition) Return SetError(@error, @extended, $ret) EndFunc ;==>_UIW_NamePropertyCondition ; #FUNCTION# ==================================================================================================================== ; Name ..........: _UIW_ParseCondition ; Description ...: Depreciated ; Syntax ........: ; Parameters ....: ; Return values .: ; Author ........: Seadoggie01 ; Modified ......: November 16, 2020 ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _UIW_ParseCondition($oUIAutomation, $sProperties) #forceref $oUIAutomation __UIW_Debug(""_UIW_ParseCondition: Depreciated Function! Pass properties string directly from now on."", ""---> "") Return $sProperties EndFunc ;==>_UIW_ParseCondition ; #FUNCTION# ==================================================================================================================== ; Name ..........: _UIW_ParseObject ; Description ...: Depreciated ; Syntax ........: ; Parameters ....: ; Return values .: ; Author ........: Seadoggie01 ; Modified ......: November 16, 2020 ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _UIW_ParseObject($oUIAutomation, $oParent, $sProperties) #forceref $oUIAutomation, $oParent __UIW_Debug(""_UIW_ParseObject: Depreciated function! Replace with _UIW_FindFirst()"", ""---> "") Return $sProperties EndFunc ;==>_UIW_ParseObject ; #FUNCTION# ==================================================================================================================== ; Name ..........: _UIW_PropertyCondition ; Description ...: Creates a property condition ; Syntax ........: _UIW_PropertyCondition($oUIAutomation, $UIA_PropertyId, $vCondition) ; Parameters ....: $oUIAutomation - an object. ; $UIA_PropertyId - a Property ID, see module UIA_PropertyIds in CUIAutomation2. ; $vCondition - a variant value. ; Return values .: Success - a pointer to the condition requested ; Failure - False and sets @error: ; |1 - Unable to create property condition, @extended set to COM error. ; Author ........: Seadoggie01 ; Modified ......: October 14, 2020 ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _UIW_PropertyCondition($oUIAutomation, $UIA_PropertyId, $vCondition) Local $pCondition $oUIAutomation.CreatePropertyCondition($UIA_PropertyId, $vCondition, $pCondition) If $pCondition Then Return $pCondition Return SetError(_UIW_ErrorStack(1, ""_UIW_PropertyCondition - UIA Property: "" & $UIA_PropertyId), @extended, False) EndFunc ;==>_UIW_PropertyCondition Func _UIW_RawViewWalker($oUIAutomation) Local $pRawViewWalker $oUIAutomation.RawViewWalker($pRawViewWalker) Local $oTreeView = ObjCreateInterface($pRawViewWalker, $sIID_IUIAutomationTreeWalker, $dtagIUIAutomationTreeWalker) If Not IsObj($oTreeView) Then Return SetError(_UIW_ErrorStack(1, ""_UIW_RawViewWalker""), 0, False) Return $oTreeView EndFunc ;==>_UIW_RawViewWalker ; #FUNCTION# ==================================================================================================================== ; Name ..........: _UIW_RootObject ; Description ...: Gets the UI Automation desktop object ; Syntax ........: _UIW_RootObject($oUIAutomation) ; Parameters ....: $oUIAutomation - an object. ; Return values .: Success - the desktop object ; Failure - False and sets @error: ; | 1 - $oUIAutomation isn't an object ; | 2 - Unable to create $oDesktop ; Author ........: Seadoggie01 ; Modified ......: October 14, 2020 ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _UIW_RootObject($oUIAutomation) If Not __UIW_Param($oUIAutomation, ""Object"", ""InterfaceDispatch"") Then Return SetError(_UIW_ErrorStack(1, ""_UIW_RootObject""), 0, False) Local $pDesktop, $oDesktop ; Get the root object, a pointer to the desktop $oUIAutomation.GetRootElement($pDesktop) $oDesktop = ObjCreateInterface($pDesktop, $sIID_IUIAutomationElement, $dtagIUIAutomationElement) If Not IsObj($oDesktop) Then _UIW_ErrorStack(2, ""_UIW_RootObject"") Return SetError(2, 0, False) EndIf Return $oDesktop EndFunc ;==>_UIW_RootObject ; #FUNCTION# ==================================================================================================================== ; Name ..........: _UIW_Select ; Description ...: Selects a control ; Syntax ........: _UIW_Select($oControl) ; Parameters ....: $oControl - an object. ; Return values .: None ; Author ........: Seadoggie01 ; Modified ......: October 14, 2020 ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _UIW_Select($oControl) Local $oSelect = _UIW_GetCurrentPattern($oControl, $UIW_SelectionItemPattern) If @error Then _UIW_ErrorStack(1, ""_UIW_Select"") Return SetError(1, 0, False) EndIf $oSelect.Select() EndFunc ;==>_UIW_Select ; #FUNCTION# ==================================================================================================================== ; Name ..........: _UIW_SetFocus ; Description ...: Sets the current focus to an element ; Syntax ........: _UIW_SetFocus($oElement) ; Parameters ....: $oElement - the element to use. ; Return values .: Success - True ; Failure - False and sets @error = 1 ; Author ........: Seadoggie01 ; Modified ......: October 14, 2020 ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _UIW_SetFocus($oElement) $oElement.SetFocus() If @error Then _UIW_ErrorStack(1, ""_UIW_SetFocus"") Return SetError(1, 0, False) EndIf Return True EndFunc ;==>_UIW_SetFocus ; #FUNCTION# ==================================================================================================================== ; Name ..........: _UIW_SetValue ; Description ...: Sets the value of a UIAElement ; Syntax ........: _UIW_SetValue($oElement, $sText) ; Parameters ....: $oElement - an object. ; $sText - a string value. ; Return values .: Success - True ; Failure - False and sets @error ; | 1 - $oControl doesn't support setting the value ; | 2 - COM Error. @extended = COM Error ; Author ........: Seadoggie01 ; Modified ......: October 14, 2020 ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _UIW_SetValue($oElement, $sText) Local $oValue = _UIW_GetCurrentPattern($oElement, $UIW_ValuePattern) If @error Then Return SetError(1, 0, False) Local $hErr = __UIW_ErrHnd() #forceref $hErr $oValue.SetValue($sText) If @error Then Return SetError(_UIW_ErrorStack(2, ""_UIW_SetValue""), @error, False) Return True EndFunc ;==>_UIW_SetValue Func _UIW_GetValue($oElement) ;~ Local $oValue = _UIW_GetCurrentPattern($oElement, $UIW_ValuePatternId) ;~ If @error Then Return SetError(1, 0, False) Local $sValue $oElement.GetCurrentPropertyValue($UIA_ValueValuePropertyId, $sValue) Return $sValue EndFunc #Region ### Tree Walker Code ### ; Use at your own risk, I don't think it works! ; #FUNCTION# ==================================================================================================================== ; Name ..........: _UIW_TreeWalkerCreate ; Description ...: Creates a Tree Walker using the specified condition ; Syntax ........: _UIW_TreeWalkerCreate($oUIAutomation, $vCondition) ; Parameters ....: $oUIAutomation - an object. ; $vCondition - a pointer value or string to be parsed. ; Return values .: Success - an IUIAutomationTreeWalker ; Failure - False and sets @error: ; | 1 - $vCondtion isn't a pointer and couldn't be parsed ; | 2 - Can't create tree walker from pointer ; Author ........: Seadoggie01 ; Modified ......: October 14, 2020 ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _UIW_TreeWalkerCreate($oUIAutomation, $vCondition) $vCondition = __UIW_ParseCondition($oUIAutomation, $vCondition) If @error Then Return SetError(_UIW_ErrorStack(1, ""_UIW_TreeWalkerCreate""), 0, False) Local $oWalker $oUIAutomation.RawViewWalker($vCondition) $oWalker = ObjCreateInterface($vCondition, $sIID_IUIAutomationTreeWalker, $dtagIUIAutomationTreeWalker) If Not IsObj($oWalker) Then Return SetError(_UIW_ErrorStack(2, ""_UIW_CreateTreeWalker""), 0, False) Return $oWalker EndFunc ;==>_UIW_TreeWalkerCreate Func _UIW_TreeWalkerGetAll($oWalker, $vCondition) If Not __UIW_Param($oWalker, ""Object"", ""InterfaceDispatch"") Then _UIW_ErrorStack(1, ""_UIW_TreeWalkerGetFirst"") Return SetError(1, 0, False) EndIf $vCondition = __UIW_ParseCondition($__g_oUIAutomation, $vCondition) If @error Then SetError(2, @extended) _UIW_ErrorStack(2, ""_UIW_TreeWalkerGetFirst"") Return False EndIf EndFunc ;==>_UIW_TreeWalkerGetAll ; #FUNCTION# ==================================================================================================================== ; Name ..........: _UIW_TreeWalkerGetFirst ; Description ...: Gets the first matching element ; Syntax ........: _UIW_TreeWalkerGetFirst($oWalker, $oControl, $vCondition) ; Parameters ....: $oWalker - a Tree walker object. ; $oControl - the object to search in. ; $vCondition - the condition to match. ; Return values .: Success - the first child object matching the condition ; Failure - False and sets @error: ; | 1 - COM Error sets @extended to COM Error ; Author ........: Seadoggie01 ; Modified ......: October 14, 2020 ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func _UIW_TreeWalkerGetFirst($oWalker, $oControl) If Not __UIW_Param($oWalker, ""Object"", ""InterfaceDispatch"") Then Return SetError(_UIW_ErrorStack(1, ""_UIW_TreeWalkerGetFirst""), 0, False) Local $pElement $oWalker.GetFirstChildElement($oControl, $pElement) If @error Then Return SetError(_UIW_ErrorStack(2, ""_UIW_TreeWalkerGetFirst""), @error, False) If Not $pElement Then Return SetError(_UIW_ErrorStack(3, ""_UIW_TreeWalkerGetFirst""), @error, False) Local $oResult = ObjCreateInterface($pElement, $sIID_IUIAutomationElement, $dtagIUIAutomationElement) If Not IsObj($oResult) Then Return SetError(_UIW_ErrorStack(4, ""_UIW_TreeWalkerGetFirst""), @error, False) Return $oResult EndFunc ;==>_UIW_TreeWalkerGetFirst Func _UIW_TreeWalkerGetNext($oWalker, $oControl) If Not __UIW_Param($oWalker, ""Object"", ""InterfaceDispatch"") Then Return SetError(_UIW_ErrorStack(1, ""_UIW_TreeWalkerGetNext""), 0, False) Local $pElement $oWalker.GetNextSiblingElement($oControl, $pElement) If @error Then Return SetError(_UIW_ErrorStack(2, ""_UIW_TreeWalkerGetNext""), @error, False) If Not $pElement Then Return SetError(_UIW_ErrorStack(3, ""_UIW_TreeWalkerGetNext""), @error, False) Local $oResult = ObjCreateInterface($pElement, $sIID_IUIAutomationElement, $dtagIUIAutomationElement) If Not IsObj($oResult) Then Return SetError(_UIW_ErrorStack(4, ""_UIW_TreeWalkerGetNext""), @error, False) If $oResult = Null Then __UIW_Debug(""Null!"") Return SetError(_UIW_ErrorStack(5, ""_UIW_TreeWalkerGetNext""), 0, False) EndIf Return $oResult EndFunc ;==>_UIW_TreeWalkerGetNext #EndRegion ### Tree Walker Code ### #Region #INTERNAL_USE_ONLY# ===================================================================================================== ; #INTERNAL_USE_ONLY# =========================================================================================================== ; Name ..........: __UIW_ElementArrayToArray ; Description ...: Converts a IUIElementArray to an AutoIt array ; Syntax ........: __UIW_ElementArrayToArray($oElementArray) ; Parameters ....: $oElementArray - an object. ; Return values .: Success - A 1D 0-based array of the UIElements from the Element Array ; Failure - False and sets @error: ; |1 - Length property isn't supported. @extended is set to COM error ; |2 - GetElement failed. @extended is set to array index. ; Author ........: Seadoggie01 ; Modified ......: October 14, 2020 ; Remarks .......: Uses IUIAutomationElementArray::get_Length and IUIAutomationElementArray::GetElement ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func __UIW_ElementArrayToArray($oElementArray) Local $hErr = __UIW_ErrHnd() #forceref $hErr If Not IsObj($oElementArray) Then Return SetError(1, 0, False) Local $iTemp, $pTemp, $oTemp $oElementArray.Length($iTemp) If @error Then Return SetError(1, @error, False) Local $aReturn[$iTemp] For $i = 0 To $iTemp - 1 $oElementArray.GetElement($i, $pTemp) If @error Then Return SetError(@error, $i, False) $oTemp = ObjCreateInterface($pTemp, $sIID_IUIAutomationElement, $dtagIUIAutomationElement) $aReturn[$i] = $oTemp Next Return $aReturn EndFunc ;==>__UIW_ElementArrayToArray ; #INTERNAL_USE_ONLY# =========================================================================================================== ; Name ..........: __UIW_ErrHnd ; Description ...: Creates an error handler ; Syntax ........: __UIW_ErrHnd() ; Parameters ....: None ; Return values .: An error handler ; Author ........: Seadoggie01 ; Modified ......: October 14, 2020 ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func __UIW_ErrHnd() Return ObjEvent(""AutoIt.Error"", ""__UIW_ErrorHandler"") ; Copy to add error handler to function ;~ Local $hErr = __UIW_ErrHnd() ;~ #forceref $hErr EndFunc ;==>__UIW_ErrHnd ; #INTERNAL_USE_ONLY# =========================================================================================================== ; Name ..........: __UIW_ErrorHandler ; Description ...: Handles an error around suspect functions ; Syntax ........: __UIW_ErrorHandler($oError) ; Parameters ....: $oError - an object. ; Return values .: Sets @error to COM error ; Author ........: Seadoggie01 ; Modified ......: October 14, 2020 ; Remarks .......: I think this is a modified version of Water's error handler ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func __UIW_ErrorHandler($oError) #forceref $oError ConsoleWrite(""! ---- UI Simple Wrapper COM Error ---- !"" & @CRLF & _ ""COM Error Encountered in "" & @ScriptName & @CRLF & _ ""@AutoItVersion = "" & @AutoItVersion & @CRLF & _ ""@AutoItX64 = "" & @AutoItX64 & @CRLF & _ ""@Compiled = "" & @Compiled & @CRLF & _ ""@OSArch = "" & @OSArch & @CRLF & _ ""@OSVersion = "" & @OSVersion & @CRLF & _ ""Scriptline = "" & $oError.scriptline & @CRLF & _ ""NumberHex = "" & Hex($oError.number, 8) & @CRLF & _ ""Number = "" & $oError.number & @CRLF & _ ""WinDescription = "" & StringStripWS($oError.WinDescription, 2) & @CRLF & _ ""Description = "" & StringStripWS($oError.Description, 2) & @CRLF & _ ""Source = "" & $oError.Source & @CRLF & _ ""HelpFile = "" & $oError.HelpFile & @CRLF & _ ""HelpContext = "" & $oError.HelpContext & @CRLF & _ ""LastDllError = "" & $oError.LastDllError & @CRLF & _ ""! -------------------------- !"" & @CRLF & @CRLF) EndFunc ;==>__UIW_ErrorHandler ; #INTERNAL_USE_ONLY# =========================================================================================================== ; Name ..........: __UIW_MouseTrap ; Description ...: Causes the mouse to not be able to leave a rectangle. ; Syntax ........: __UIW_MouseTrap([$iLeft = 0[, $iTop = 0[, $iRight = 0[, $iBottom = 0]]]]) ; Parameters ....: $iLeft - [optional] an integer value. Default is 0. ; $iTop - [optional] an integer value. Default is 0. ; $iRight - [optional] an integer value. Default is 0. ; $iBottom - [optional] an integer value. Default is 0. ; Return values .: None ; Author ........: Gary Frost (gafrost) ; Modified ......: October 14, 2020 ; Remarks .......: I use this internally when an object must be clicked and I don't want user interaction to mess with the click ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func __UIW_MouseTrap($iLeft = 0, $iTop = 0, $iRight = 0, $iBottom = 0) Local $aReturn = 0 If $iLeft = Default Then $iLeft = 0 If $iTop = Default Then $iTop = 0 If $iRight = Default Then $iRight = 0 If $iBottom = Default Then $iBottom = 0 If @NumParams = 0 Then $aReturn = DllCall(""user32.dll"", ""bool"", ""ClipCursor"", ""ptr"", 0) If @error Or Not $aReturn[0] Then Return SetError(1, 0, False) Else If @NumParams = 2 Then $iRight = $iLeft + 1 $iBottom = $iTop + 1 EndIf Local $tagRECT = ""struct;long Left;long Top;long Right;long Bottom;endstruct"" Local $tRECT = DllStructCreate($tagRECT) DllStructSetData($tRECT, ""Left"", $iLeft) DllStructSetData($tRECT, ""Top"", $iTop) DllStructSetData($tRECT, ""Right"", $iRight) DllStructSetData($tRECT, ""Bottom"", $iBottom) $aReturn = DllCall(""user32.dll"", ""bool"", ""ClipCursor"", ""struct*"", $tRECT) If @error Or Not $aReturn[0] Then Return SetError(2, 0, False) EndIf Return True EndFunc ;==>__UIW_MouseTrap ; #INTERNAL_USE_ONLY# =========================================================================================================== ; Name ..........: __UIW_Param ; Description ...: Checks that a variable is the correct type and the name if it's an object ; Syntax ........: __UIW_Param($vParam, $sType[, $sObjName = Default]) ; Parameters ....: $vParam - a variant value. ; $sType - a string value. ; $sObjName - [optional] a string value. Default is Default. ; Return values .: True if the variable is the correct type and name, otherwise false ; Author ........: Seadoggie01 ; Modified ......: October 14, 2020 ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func __UIW_Param($vParam, $sType, $sObjName = Default) If VarGetType($vParam) = $sType Then If $sType = ""Object"" Then Return ObjName($vParam) = $sObjName Else Return True EndIf Else Return False EndIf EndFunc ;==>__UIW_Param ; #INTERNAL_USE_ONLY# =========================================================================================================== ; Name ..........: __UIW_ParseCondition ; Description ...: Creates a condition from a string that is parsed and has the properties parsed into conditions ; Syntax ........: _UIW_ParseCondition($oUIAutomation, $sProperties) ; Parameters ....: $oUIAutomation - an object. ; $vProperties - a string value or a pointer. ; Return values .: Success - a pointer to a condition ; Failure - False and sets @error: ; | 1 - ; Author ........: Seadoggie01 ; Modified ......: October 14, 2020 ; Remarks .......: Use Name:Value;Name2:Value2;Name3:Value3 format ; Related .......: ; Link ..........: ; Example .......: No ; =============================================================================================================================== Func __UIW_ParseCondition($oUIAutomation, $vProperties) If IsPtr($vProperties) Then Return $vProperties ; Split on semi-colons, ignoring if they are escaped with a backslash Local $asProperties = StringRegExp($vProperties, ""((?:\\\\.|[^;\\\\]++)+)"", 3) Local $aConditions[0], $pCondition ; For each property name pair For $i = 0 To UBound($asProperties) - 1 $pCondition = __UIW_ParsePropertyCondition($oUIAutomation, $asProperties[$i]) If @error Then Return SetError(_UIW_ErrorStack(1, ""__UIW_ParseCondition - Part "" & $i), $i, False) Else ReDim $aConditions[UBound($aConditions) + 1] $aConditions[UBound($aConditions) - 1] = $pCondition EndIf Next If Not IsArray($aConditions) Then Return SetError(_UIW_ErrorStack(2, ""__UIW_ParseCondition""), 0, False) Switch UBound($aConditions) Case 2 $pCondition = _UIW_CreateAndCondition($oUIAutomation, $aConditions[0], $aConditions[1]) If @error Then Return SetError(_UIW_ErrorStack(3, ""__UIW_ParseCondition""), 0, False) Case 1 $pCondition = $aConditions[0] Case Else $pCondition = _UIW_CreateAndConditionFromArray($oUIAutomation, $aConditions) If @error Then Return SetError(_UIW_ErrorStack(4, ""__UIW_ParseCondition""), 0, False) EndSwitch Return $pCondition EndFunc ;==>__UIW_ParseCondition ; #INTERNAL_USE_ONLY# =========================================================================================================== ; Name ..........: __UIW_ParsePropertyCondition ; Description ...: Takes a single property as a string and parses it to get that type of property conidtion ; Syntax ........: __UIW_ParsePropertyCondition($oUIAutomation, $sProperty) ; Parameters ....: $oUIAutomation - an object. ; $sProperty - a string value. ; Return values .: Success - $pCondition ; Failure - False and sets @error: ; | 1 - individual property condition error ; | 42 - unparseable ; Author ........: Seadoggie01 ; Modified ......: January 21, 2021 ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: __UIW_ParsePropertyCondition($oUIAutomation, ""TYPE:"" & $UIA_ButtonControlTypeId) ; =============================================================================================================================== Func __UIW_ParsePropertyCondition($oUIAutomation, $sProperty) ; Split using a regular expression that verifies that the colon isn't escaped with a backslash Local $aSplit = StringRegExp($sProperty, ""(.*)(?__UIW_ParsePropertyCondition Func __UIW_TreeViewGetAll($oWalker, $oControl, $pCondition) ; Get the first element Local $oElement = _UIW_TreeWalkerGetFirst($oWalker, $oControl) ; While there is an element While IsObj($oElement) $oWalker.GetNextSiblingElement($oControl, $pCondition) WEnd EndFunc ;==>__UIW_TreeViewGetAll Func __UIW_Debug($sText, $sPrefix = ""+"") If StringLen($sPrefix) = 1 Then $sPrefix &= "" "" ConsoleWrite($sPrefix & $sText & @CRLF) EndFunc #EndRegion #INTERNAL_USE_ONLY# ===================================================================================================== ",16244,True,3341.051401298702,median "#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=..\\Resources\\Spell Sort\\dnd_icon.ico #AutoIt3Wrapper_Outfile=..\\Spell Check.exe #AutoIt3Wrapper_Compression=0 #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include #include #include #include #include #include #include #include ;; Include in source #include ""..\\Resources\\CustomCreator.au3"" #include ""..\\Resources\\_RefreshCache.au3"" _RefreshCache() $winWidth = 765 $winHeight = 420 ;; LELEL JST BLZ $appDir = EnvGet(""APPDATA"") & ""\\Doddler's D&D\\"" DirCreate($appDir) DirCreate($appDir & ""\\Spell Sort Resources\\"") #Region File Installs FileInstall(""..\\Resources\\Spell Sort\\SearchParams.ini"", $appDir & ""Spell Sort Resources\\SearchParams.ini"", 0) FileInstall(""..\\Resources\\Spell Sort\\Spells-Basic.ini"", $appDir & ""Spell Sort Resources\\Spells-Basic.ini"", 0) FileInstall(""..\\Resources\\Spell Sort\\Spells-Complete.ini"", $appDir & ""Spell Sort Resources\\Spells-Complete.ini"", 0) FileInstall(""..\\Resources\\Spell Sort\\Classes.txt"", $appDir & ""Spell Sort Resources\\Classes.txt"", 0) FileInstall(""..\\Resources\\Icons.icl"", $appDir & ""Icons.icl"", 1) #EndRegion File Installs ;~ FileInstall(""..\\Resources\\Icons.icl"", $appDir & ""Icons.icl"", 0) $sParamsIni = $appDir & ""Spell Sort Resources\\SearchParams.ini"" $classesTxt = $appDir & ""Spell Sort Resources\\Classes.txt"" $iconsIcl = $appDir & ""Icons.icl"" $prefIni = $appDir & ""Preferences.ini"" $compIni = $appDir & ""Spell Sort Resources\\Spells-Complete.ini"" $basicIni = $appDir & ""Spell Sort Resources\\Spells-Basic.ini"" $start = TimerInit() $pSpellIni = IniRead($prefIni, ""Settings"", ""Custom Spells File"", """") If FileExists($pSpellIni) Then Global $custIni = $pSpellIni ElseIf FileExists(@ScriptDir & ""\\Spells-Custom.ini"") Then Global $custIni = @ScriptDir & ""\\Spells-Custom.ini"" Else Global $custIni = """" EndIf ConsoleWrite(""CustINi = "" & $custIni&@LF) ;$custIni = ""C:\\Work\\Projects\\Scripts\\DND\\Spells-Custom.ini"" Global $debug = 0, $searchArray = 0, $ToolTipActive = False, $descWindows = 0, $hDescripts[0], $active = False, $subWindows = 0, $hSubs[0], $DefaultSpells = 0 Global Enum $idproc1 = 1000, $idproc2 = 2000, $winTitle = ""D&D Spell Check"" $hGUI = GUICreate($winTitle, $winWidth, $winHeight, -1, -1, $WS_MAXIMIZEBOX + $WS_MINIMIZEBOX + $WS_SIZEBOX) $fileMenu = GUICtrlCreateMenu(""File"") $fCustomCreator = GUICtrlCreateMenuItem(""Create or Edit Custom Spells"", $fileMenu) GUICtrlCreateMenuItem("""", $fileMenu) $fSetSpells = GUICtrlCreateMenuItem(""Set Custom Spells File"",$fileMenu) $fRestart = GUICtrlCreateMenuItem(""Restart"", $fileMenu) $tempArray = IniReadSection($sParamsIni, ""Schools"") $Schools = ""Any|"" & _ArrayToString($tempArray,""|"", 1,UBound($tempArray)-1,""|"",1,1) $tempArray = IniReadSection($sParamsIni, ""Levels"") $Levels = ""Any|"" & _ArrayToString($tempArray,""|"", 1,UBound($tempArray)-1,""|"",1,1) $tempArray = IniReadSection($sParamsIni, ""Rituals"") $Rituals = ""Any|"" & _ArrayToString($tempArray,""|"", 1,UBound($tempArray)-1,""|"",1,1) $tempArray = IniReadSection($sParamsIni, ""Cast Times"") $castTimes = ""Any|"" & _ArrayToString($tempArray,""|"", 1,UBound($tempArray)-1,""|"",1,1) $tempArray = IniReadSection($sParamsIni, ""Ranges"") $Ranges = ""Any|"" & _ArrayToString($tempArray,""|"", 1,UBound($tempArray)-1,""|"",1,1) $tempArray = IniReadSection($sParamsIni, ""Components"") $Components = ""Any|"" & _ArrayToString($tempArray,""|"", 1,UBound($tempArray)-1,""|"",1,1) $tempArray = IniReadSection($sParamsIni, ""Durations"") $Durations = ""Any|"" & _ArrayToString($tempArray,""|"", 1,UBound($tempArray)-1,""|"",1,1) $tempArray = IniReadSectionNames($classesTxt) $Classes = ""Any|"" & _ArrayToString($tempArray,""|"", 1,UBound($tempArray)-1,""|"",1,1) $levelArray = IniReadSection($sParamsIni, ""Levels"") $levelArray[0][1] = ""Any"" #Region Search GUI GUICtrlCreateGroup("""", 5, 1, 590, 39) GUICtrlSetResizing(-1, $GUI_DOCKALL) GUICtrlCreateLabel(""Spell Name"", 10, 1) GUICtrlSetResizing(-1, $GUI_DOCKALL) $ihSearch = GUICtrlCreateInput("""", 10, 15, 100, -1, $ES_AUTOHSCROLL) GUICtrlSetResizing(-1, $GUI_DOCKALL) GUICtrlCreateLabel(""Level"", 125, 1) GUICtrlSetResizing(-1, $GUI_DOCKALL) $cLevel = GUICtrlCreateCombo("""", 130, 15, 50) GUICtrlSetResizing(-1, $GUI_DOCKALL) GUICtrlSetData(-1, $Levels, ""Any"") $cLevel2 = GUICtrlCreateCombo("""", 190, 15, 50) GUICtrlSetResizing(-1, $GUI_DOCKALL) GUICtrlSetData(-1, $Levels, ""Any"") GUICtrlCreateLabel(""School"", 245, 1) GUICtrlSetResizing(-1, $GUI_DOCKALL) $cSch = GUICtrlCreateCombo("""", 250, 15, 100) GUICtrlSetResizing(-1, $GUI_DOCKALL) GUICtrlSetData(-1, $Schools, ""Any"") GUICtrlCreateLabel(""Range"", 365, 1) GUICtrlSetResizing(-1, $GUI_DOCKALL) $cRange = GUICtrlCreateCombo("""", 370, 15, 100) ; Yes/no GUICtrlSetResizing(-1, $GUI_DOCKALL) GUICtrlSetData(-1, $Ranges, ""Any"") GUICtrlCreateLabel(""Cast Time"", 485, 1) GUICtrlSetResizing(-1, $GUI_DOCKALL) $cCast = GUICtrlCreateCombo("""", 490, 15, 100) GUICtrlSetResizing(-1, $GUI_DOCKALL) GUICtrlSetData(-1, $castTimes, ""Any"") GUICtrlCreateGroup("""", 5, 40, 695, 39) GUICtrlSetResizing(-1, $GUI_DOCKALL) GUICtrlCreateLabel(""Duration"", 10, 40) GUICtrlSetResizing(-1, $GUI_DOCKALL) $cDur = GUICtrlCreateCombo("""", 10, 54, 100) GUICtrlSetResizing(-1, $GUI_DOCKALL) GUICtrlSetData(-1, $Durations, ""Any"") GUICtrlCreateLabel(""Class"", 125, 40) GUICtrlSetResizing(-1, $GUI_DOCKALL) $cClass = GUICtrlCreateCombo("""", 130, 54, 90, -1, $CBS_DROPDOWNLIST) GUICtrlSetResizing(-1, $GUI_DOCKALL) GUICtrlSetData(-1, $Classes, ""Any"") GUICtrlCreateLabel(""Ritual"", 245, 40) GUICtrlSetResizing(-1, $GUI_DOCKALL) $cRit = GUICtrlCreateCombo("""", 250, 54, 50, -1, $CBS_DROPDOWNLIST) GUICtrlSetResizing(-1, $GUI_DOCKALL) GUICtrlSetData(-1, $Rituals, ""Any"") GUICtrlCreateLabel(""Components"", 310, 40) GUICtrlSetResizing(-1, $GUI_DOCKALL) $cComp = GUICtrlCreateCombo("""", 315, 54, 60, -1, $CBS_DROPDOWNLIST) GUICtrlSetResizing(-1, $GUI_DOCKALL) GUICtrlSetData(-1, $Components, ""Any"") GUICtrlCreateLabel(""Custom Spells"", 385, 40) GUICtrlSetResizing(-1, $GUI_DOCKALL) $cCustom = GUICtrlCreateCombo("""", 390, 54, 80, -1, $CBS_DROPDOWNLIST) GUICtrlSetResizing(-1, $GUI_DOCKALL) GUICtrlSetData(-1, ""Any|Only|No"", ""Any"") $bUpdate = GUICtrlCreateButton(""Update"", 490, 50, 100) GUICtrlSetResizing(-1, $GUI_DOCKALL) $bClear = GUICtrlCreateButton(""Clear"", 595, 50, 100) GUICtrlSetResizing(-1, $GUI_DOCKALL) #EndRegion Search GUI Local $iItem = 0 Local $dummy_proc1 = GUICtrlCreateDummy() Local $dummy_proc2 = GUICtrlCreateDummy() Local $dummy_proc3 = GUICtrlCreateDummy() Local $dummy_proc4 = GUICtrlCreateDummy() Local Enum $idproc3 = 3000, $idproc4 = 4000 Local $hMenu = _GUICtrlMenu_CreatePopup() _GUICtrlMenu_InsertMenuItem($hMenu, 0, ""View Full Components\\Description"", $idproc1) _GUICtrlMenu_InsertMenuItem($hMenu, 1, ""Add new Custom Spell"", $idproc4) Local $hMenu2 = _GUICtrlMenu_CreatePopup() _GUICtrlMenu_InsertMenuItem($hMenu2, 0, ""View Full Components\\Description"", $idproc1) _GUICtrlMenu_InsertMenuItem($hMenu2, 1, ""Add new Custom Spell"", $idproc4) _GUICtrlMenu_InsertMenuItem($hMenu2, 1, ""Delete Custom Spell"", $idproc2) _GUICtrlMenu_InsertMenuItem($hMenu2, 3, ""Edit Custom Spell"", $idproc3) #Region List View Setup Local $iStylesEx = BitOR($LVS_EX_GRIDLINES, $LVS_EX_FULLROWSELECT) $idListview = GUICtrlCreateListView("""", 10, 90, $winWidth - 20, 280, BitOR($LVS_SHOWSELALWAYS, $LVS_REPORT)) _GUICtrlListView_SetExtendedListViewStyle($idListview, $iStylesEx) GUICtrlSetResizing(-1, $GUI_DOCKLEFT + $GUI_DOCKTOP + $GUI_DOCKBOTTOM + $GUI_DOCKRIGHT) _GUICtrlListView_AddColumn($idListview, ""Spell Name"", 120) _GUICtrlListView_AddColumn($idListview, ""Level"", 60) _GUICtrlListView_AddColumn($idListview, ""School"", 100) _GUICtrlListView_AddColumn($idListview, ""Ritual"", 45) _GUICtrlListView_AddColumn($idListview, ""Cast Time"", 100) _GUICtrlListView_AddColumn($idListview, ""Range"", 100) _GUICtrlListView_AddColumn($idListview, ""Components"", 60) _GUICtrlListView_AddColumn($idListview, ""Duration"", 80) _GUICtrlListView_AddColumn($idListview, ""Description"", 100) _GUICtrlListView_AddColumn($idListview, """",0) #EndRegion List View Setup #Region Social Media Icons $gDiscordIcon = GUICtrlCreateIcon($iconsIcl, 27, 600, 5, 32, 32);$appDir & ""Steam_Icon.Ico"", -1, 360, 45, 32, 32) GUICtrlSetTip($gDiscordIcon, "" "", ""sDoddler's Discord Server"") GUICtrlSetResizing(-1, $GUI_DOCKTOP + $GUI_DOCKLEFT + $GUI_DOCKSIZE) GUICtrlSetCursor(-1, 0) $gTwitterIcon = GUICtrlCreateIcon($iconsIcl, 13, 640, 5, 32, 32) GUICtrlSetResizing(-1, $GUI_DOCKTOP + $GUI_DOCKLEFT + $GUI_DOCKSIZE) GUICtrlSetCursor(-1, 0) GUICtrlSetTip($gTwitterIcon, "" "", ""sDoddler's Twitter Page"") $gYoutubeIcon = GUICtrlCreateIcon($iconsIcl, 14, 680, 5, 32, 32) GUICtrlSetTip($gYoutubeIcon, "" "", ""sDoddler's YouTube Channel"") GUICtrlSetResizing(-1, $GUI_DOCKTOP + $GUI_DOCKLEFT + $GUI_DOCKSIZE) GUICtrlSetCursor(-1, 0) $gGithubIcon = GUICtrlCreateIcon($iconsIcl, 11, 720, 5, 32, 32) GUICtrlSetTip($gGithubIcon, "" "", ""D&D Software Suite Github Page"") GUICtrlSetResizing(-1, $GUI_DOCKTOP + $GUI_DOCKLEFT + $GUI_DOCKSIZE) GUICtrlSetCursor(-1, 0) #EndRegion Social Media Icons #CS Columns [0] Spell Name [1]Level [2]School [3]Ritual [4]Cast Time [5]Range [6]Components [7]Duration #CE GUISetState() _GUICtrlSetState($GUI_DISABLE) $SpellArray = CreateSpellArray() _GUICtrlSetState($GUI_ENABLE) If WinActive($winTitle) Then HotKeySet(""{ENTER}"", ""Update"") ;_ArrayDisplay($SpellArray) GUIRegisterMsg($WM_NOTIFY, ""WM_NOTIFY"") GUIRegisterMsg($WM_COMMAND, ""WM_COMMAND"") _GUICtrlListView_RegisterSortCallBack($idListview) OnAutoItExitRegister(""SavePreferences"") While 1 If (WinActive($winTitle) = 0 And $active = True) Then ;; If window does not have window but it just did $active = False HotKeySet(""{ENTER}"") ConsoleWrite(""SetHotkeysOff"") ToolTip('') $ToolTipActive = False ;SetGrid ElseIf (WinActive($winTitle) And $active = False) Then ;;If Window DOES have focus but just didn't $active = True HotKeySet(""{ENTER}"", ""Update"") ConsoleWrite(""SetHotkeysON"") EndIf $msg = GUIGetMsg(1) Switch $msg[1] Case $hGUI Switch $msg[0] Case $GUI_EVENT_CLOSE Exit Case $idListview Switch GUICtrlGetState($idListview) Case 1 _GUICtrlListView_SortItems($idListview, 9) Case Else _GUICtrlListView_SortItems($idListview, GUICtrlGetState($idListview)) EndSwitch Case $dummy_proc1 CreateSubWindow(_GUICtrlListView_GetItemText($idListview, $iItem));,_GUICtrlListView_GetItemText($idListview, $iItem,6),_GUICtrlListView_GetItemText($idListview, $iItem,8)) ;MsgBox(64,_GUICtrlListView_GetItemText($idListview, $iItem),""Components: "" &_GUICtrlListView_GetItemText($idListview, $iItem,6) & @LF & @LF & ""Description: "" & _GUICtrlListView_GetItemText($idListview, $iItem,8)) Case $dummy_proc2 $delItem = _GUICtrlListView_GetItemText($idListview,$iItem) $iMsg = MsgBox(52, ""Delete Item? "", ""Are you sure you want to delete: "" & $delItem & @LF & ""At Location: "" & $custIni) if $iMsg = 6 Then IniDelete($custIni,$delItem) IniDelete($custIni,""Index"",$delItem) _GUICtrlListView_DeleteItem($idListview,$iItem) _GUICtrlSetState($GUI_DISABLE) $SpellArray = CreateSpellArray(False) _GUICtrlSetState($GUI_ENABLE) EndIf Case $dummy_proc3 ; Edit Custom Item $itemName = _GUICtrlListView_GetItemText($idListview, $iItem) For $i = 1 To $SpellArray[0][0] If $itemName = $spellArray[0][$i] Then ExitLoop Next ConsoleWrite($itemName & @LF) ;_ArrayDisplay(IniRead($custIni, ""Index"", $itemName, """")) _CustomCreator($hGUI, $winTitle, ""Spell"", $itemName, IniRead($custIni, ""Index"", $itemName, """"), IniReadSection($custIni, $itemName)) $pSpellIni = IniRead($prefIni, ""Settings"", ""Custom Spells File"", """") If FileExists($pSpellIni) Then Global $custIni = $pSpellIni EndIf _GUICtrlSetState($GUI_DISABLE) GUIRegisterMsg($WM_NOTIFY, ""WM_NOTIFY"") $SpellArray = CreateSpellArray(False) Update() _GUICtrlSetState($GUI_ENABLE) Case $dummy_proc4 _CustomCreator($hGUI, $winTitle, ""Spell"") $pSpellIni = IniRead($prefIni, ""Settings"", ""Custom Spells File"", """") If FileExists($pSpellIni) Then Global $custIni = $pSpellIni EndIf _GUICtrlSetState($GUI_DISABLE) GUIRegisterMsg($WM_NOTIFY, ""WM_NOTIFY"") $spellArray = CreateSpellArray(False) Update() _GUICtrlSetState($GUI_ENABLE) Case $bUpdate Update() Case $bClear _GUICtrlSetState($GUI_DISABLE) GUICtrlSetData($cCast, """") GUICtrlSetData($cComp, """") GUICtrlSetData($cDur, """") GUICtrlSetData($cLevel, """") GUICtrlSetData($cLevel2, """") GUICtrlSetData($cRange, """") GUICtrlSetData($cRit, """") GUICtrlSetData($cSch, """") GUICtrlSetData($cClass, """") GUICtrlSetData($cCustom,"""") GUICtrlSetData($cCustom, ""Any|Only|No"", ""Any"") GUICtrlSetData($cCast, $castTimes, ""Any"") GUICtrlSetData($cComp, $Components, ""Any"") GUICtrlSetData($cDur, $Durations, ""Any"") GUICtrlSetData($cLevel, $Levels, ""Any"") GUICtrlSetData($cLevel2, $Levels, ""Any"") GUICtrlSetData($cRange, $Ranges, ""Any"") GUICtrlSetData($cRit, $Rituals, ""Any"") GUICtrlSetData($cSch, $Schools, ""Any"") GUICtrlSetData($cClass, $Classes, ""Any"") GUICtrlSetData($ihSearch, """") _GUICtrlSetState($GUI_ENABLE) Case $cLevel GUICtrlSetData($cLevel2, GUICtrlRead($cLevel)) Case $gDiscordIcon ShellExecute('https://discord.gg/qkEGawD') Case $gTwitterIcon ShellExecute('https://twitter.com/sdoddler') Case $gYoutubeIcon ShellExecute('https://youtube.com/user/doddddy') Case $gGithubIcon ShellExecute('https://github.com/sdoddler/D-D-Software-Suite') Case $fRestart Restart() Case $fSetSpells if $custIni <> """" Then $iniSplit = StringSplit($custIni,""\\"") $iniRep = StringReplace($custIni,$iniSplit[$iniSplit[0]],"""",-1) $pMagicItemIni = FileOpenDialog(""Select the Custom Magic Item Ini Location"", $iniRep,""Ini Files (*.ini)"",1, $iniSplit[$iniSplit[0]]) Else $pSpellIni = FileOpenDialog(""Select the Custom Spell Ini Location"", @ScriptDir, ""Ini Files (*.ini)"",1) EndIf if FileExists($pSpellIni) Then $custIni = $pSpellIni _GUICtrlSetState($GUI_DISABLE) $SpellArray = CreateSpellArray(False) Update() _GUICtrlSetState($GUI_ENABLE) EndIf Case $fCustomCreator if $ToolTipActive Then $ToolTipActive = False _Toolcheck() EndIf _CustomCreator($hGUI, $winTitle) $pSpellIni = IniRead($prefIni, ""Settings"", ""Custom Spells File"", """") If FileExists($pSpellIni) Then Global $custIni = $pSpellIni EndIf _GUICtrlSetState($GUI_DISABLE) GUIRegisterMsg($WM_NOTIFY, ""WM_NOTIFY"") $SpellArray = CreateSpellArray(False) Update() _GUICtrlSetState($GUI_ENABLE) EndSwitch EndSwitch For $i = 1 To UBound($hSubs) - 1 If $msg[1] = $hSubs[$i][0] Then ;ConsoleWrite(""Message hit on: "" & $hDescripts[$i]&@LF) Switch $msg[0] Case $GUI_EVENT_CLOSE GUIDelete($hSubs[$i][0]) _ArrayDelete($hSubs, $i) $subWindows -= 1 ExitLoop Case $hSubs[$i][2] $hSubs[$i][6] = Not ($hSubs[$i][6]) If $hSubs[$i][6] Then $styles = BitOR($ES_READONLY, $ES_MULTILINE, $WS_VSCROLL) Else $styles = BitOR($ES_MULTILINE, $WS_VSCROLL) EndIf GUICtrlSetStyle($hSubs[$i][5], $styles) Case $hSubs[$i][3] GUICtrlSetData($hSubs[$i][5], $hSubs[$i][1]) Case $hSubs[$i][4] $quickSave = FileSaveDialog($hSubs[$i][7], @ScriptDir, ""Text files (*.txt)"") If Not (@error) Then FileWrite($quickSave, GUICtrlRead($hSubs[$i][5])) EndIf EndSwitch EndIf Next Sleep(10) If $ToolTipActive Then _ToolCheck() EndIf WEnd Func SavePreferences() IniWrite($prefIni, ""Settings"", ""Custom Spells File"", $custIni) EndFunc Func Restart() If @Compiled Then Run(FileGetShortName(@ScriptFullPath)) Else Run(FileGetShortName(@AutoItExe) & "" "" & FileGetShortName(@ScriptFullPath)) EndIf Exit EndFunc Func CreateSubWindow($iTitle, $iData = """", $iWidth = 250, $iReadOnly = True) ;; For additional windows have an Array structured as per below ;$windows[X][0] = WindowHandle ;$windows[X][1] = Full Data (Returned from whatever Generator was used) ;$windows[X][2] = Allow Edit (Button with Toggle) ;$windows[X][3] = Reset Data (Button to reset Input to [x][1]) ;$windows[X][5] = Input Handle ;$windows[X][4] = Save Button? (Save current to .txt) ;$windows[X][6] = Allow Edit Value (True/False) ?? Local $height, $width, $iComp, $iDesc GUISetState(@SW_DISABLE, $hGUI) $subWindows += 1 ReDim $hSubs[$subWindows + 1][8] $hSubs[$subWindows][0] = GUICreate($iTitle, $iWidth, 300, -1, -1, $WS_MAXIMIZEBOX + $WS_MINIMIZEBOX + $WS_SIZEBOX) $iData = _Titilise($iTitle) For $i = 1 To $SpellArray[0][0] If $SpellArray[0][$i] = $iTitle Then $iData &= ""Components: "" & $SpellArray[6][$i] & @CRLF & @CRLF & $SpellArray[8][$i] ExitLoop EndIf Next ;$iData = ""Components: "" & $iComp & @CRLF & @CRLF & ""Description: "" & $iDesc $hSubs[$subWindows][1] = $iData $hSubs[$subWindows][2] = GUICtrlCreateIcon($iconsIcl, 3, 10, 230);;Lock\\Unlock GUICtrlSetResizing(-1, $GUI_DOCKBOTTOM + $GUI_DOCKLEFT + $GUI_DOCKSIZE) GUICtrlSetCursor(-1, 0) GUICtrlSetTip(-1, ""Unlock the workspace for editing"" & @LF & ""Useful for Picking and choosing loot or releasing over time"", ""Unlock\\Lock Workspace"") $hSubs[$subWindows][3] = GUICtrlCreateIcon($iconsIcl, 4, 40, 230);Reset WorkSpace GUICtrlSetResizing(-1, $GUI_DOCKBOTTOM + $GUI_DOCKLEFT + $GUI_DOCKSIZE) GUICtrlSetCursor(-1, 0) GUICtrlSetTip(-1, ""Reset the text to it's default state"" & @LF _ & ""(How it was generated)"", ""Reset Workspace"") $hSubs[$subWindows][4] = GUICtrlCreateIcon($iconsIcl, 1, 70, 230);Save GUICtrlSetResizing(-1, $GUI_DOCKBOTTOM + $GUI_DOCKLEFT + $GUI_DOCKSIZE) GUICtrlSetCursor(-1, 0) GUICtrlSetTip(-1, ""Save current text to a text file for later viewing"", ""Save"") $hSubs[$subWindows][6] = $iReadOnly $hSubs[$subWindows][7] = $iTitle If $iReadOnly Then $styles = BitOR($ES_READONLY, $ES_MULTILINE, $WS_VSCROLL) Else $styles = BitOR($ES_MULTILINE, $WS_VSCROLL) EndIf $hSubs[$subWindows][5] = GUICtrlCreateEdit($iData, 5, 5, $iWidth - 10, 210, $styles) GUICtrlSetFont(-1, 9, 400, -1, ""Consolas"") GUICtrlSetResizing(-1, $GUI_DOCKLEFT + $GUI_DOCKTOP + $GUI_DOCKBOTTOM + $GUI_DOCKRIGHT) GUISetState() GUISetState(@SW_ENABLE, $hGUI) EndFunc ;==>CreateSubWindow Func CreateSpellArray($redoList = True) Local $listCount = 0 ;ConsoleWrite(@NumParams&@LF) If $redoList Then _GUICtrlListView_DeleteAllItems($idListview) $LEL = TimerInit() $rSec = _IniReadSectionEx($basicIni, ""Spells"");_IniReadSectionNamesEx($rIni) Local $spArray[10][$rSec[0][0] + 1] $spArray[0][0] = $rSec[0][0] $DefaultSpells = $rSec[0][0] For $i = 1 To $rSec[0][0] $split = StringSplit($rSec[$i][1], ""\\\\"", 1) $spArray[0][$i] = $rSec[$i][0] ;~ ConsoleWrite($spArray[0][$i]&@LF) $spArray[1][$i] = $split[1] $spArray[2][$i] = $split[2] $spArray[3][$i] = $split[3] $spArray[4][$i] = $split[4] $spArray[5][$i] = $split[5] $spArray[6][$i] = $split[6] $spArray[7][$i] = $split[7] $quickDecode = _IniDecode($spArray[0][$i]) $spArray[8][$i] = $quickDecode[0];StringReplace($secArray[$j][1], ""@CRLF"", @CRLF) ;~ Local $mdName = """", $fStr = """", $strWrite = False ;~ $mdName = StringReplace(StringReplace(StringReplace($spArray[0][$i],"" "",""_""),""'"",""""),""/"","""") & "".md"" ;~ if FileExists(""..\\Resources\\Spell Sort\\spells\\"" & $mdName) Then ;~ $fOpen = FileOpen(""..\\Resources\\Spell Sort\\spells\\"" & $mdName) ;~ $fArray = FileReadToArray($fOpen) ;~ FileClose($fOpen) ;~ For $j = 0 to UBound($fArray)-1 ;~ if StringInStr($fArray[$j],""**Duration:**"") Then ;~ $strWrite = True ;~ $j+=1 ;~ EndIf ;~ if $strWrite = True Then ;~ $fStr &= $fArray[$j]&@CRLF ;~ EndIf ;~ Next ;~ $spArray[8][$i] = $fStr ;~ EndIf ;_ArrayDisplay($spArray) If $redoList Then _GUICtrlListView_AddItem($idListview, $spArray[0][$i]) _GUICtrlListView_AddSubItem($idListview, $listCount, $spArray[1][$i], 1) _GUICtrlListView_AddSubItem($idListview, $listCount, $spArray[2][$i], 2) _GUICtrlListView_AddSubItem($idListview, $listCount, $spArray[3][$i], 3) _GUICtrlListView_AddSubItem($idListview, $listCount, $spArray[4][$i], 4) _GUICtrlListView_AddSubItem($idListview, $listCount, $spArray[5][$i], 5) _GUICtrlListView_AddSubItem($idListview, $listCount, $spArray[6][$i], 6) _GUICtrlListView_AddSubItem($idListview, $listCount, $spArray[7][$i], 7) _GUICtrlListView_AddSubItem($idListview, $listCount, $spArray[8][$i], 8) _GUICtrlListView_AddSubItem($idListview, $listCount, _LevelSwitch($spArray[1][$i]), 9) EndIf $listCount += 1 Next If FileExists($custIni) Then ConsoleWrite(""BOOYAH"") $UB = $spArray[0][0] + 1 $secT = IniReadSection($custIni, ""Index"") If IsArray($secT) Then ReDim $spArray[10][$UB + $secT[0][0]] $spArray[0][0] = $UB + $secT[0][0] - 1 ;_ArrayDisplay($spArray) For $j = 1 To $secT[0][0] $spArray[0][$listCount + 1] = $secT[$j][0] $iSplit = StringSplit($secT[$j][1], ""\\\\"", 1) if $isplit[0] <> 7 Then ContinueLoop $spArray[1][$listCount + 1] = $iSplit[1] $spArray[2][$listCount + 1] = $iSplit[2] $spArray[3][$listCount + 1] = $iSplit[3] $spArray[4][$listCount + 1] = $iSplit[4] $spArray[5][$listCount + 1] = $iSplit[5] $spArray[6][$listCount + 1] = $iSplit[6] $spArray[7][$listCount + 1] = $iSplit[7] $quickDecode = _IniDecode($spArray[0][$i], ""Custom"") $spArray[8][$listCount + 1] = $quickDecode[0] ;$spArray[9][$listCount+1] = $spArray[8][$listCount+1] if $redoList Then _GUICtrlListView_AddItem($idListview, $spArray[0][$listCount + 1]) _GUICtrlListView_AddSubItem($idListview, $listCount, $iSplit[1], 1) _GUICtrlListView_AddSubItem($idListview, $listCount, $iSplit[2], 2) _GUICtrlListView_AddSubItem($idListview, $listCount, $iSplit[3], 3) _GUICtrlListView_AddSubItem($idListview, $listCount, $iSplit[4], 4) _GUICtrlListView_AddSubItem($idListview, $listCount, $iSplit[5], 5) _GUICtrlListView_AddSubItem($idListview, $listCount, $iSplit[6], 6) _GUICtrlListView_AddSubItem($idListview, $listCount, $iSplit[7], 7) _GUICtrlListView_AddSubItem($idListview, $listCount, $spArray[8][$listCount + 1], 8) _GUICtrlListView_AddSubItem($idListview, $listCount, _LevelSwitch($iSplit[1]), 9) EndIf $listCount += 1 Next EndIf EndIf ;ConsoleWrite(TimerDiff($LEL) &@LF) ConsoleWrite(""Total Search Time - "" & TimerDiff($LEL) & @LF) Return $spArray EndFunc Func _SearchSpells($iSearch = 0) _GUICtrlListView_DeleteAllItems($idListview) Local $listCount = 0 For $i = 1 To $SpellArray[0][0] Local $include = True For $j = 0 To UBound($iSearch) - 1 Switch $iSearch[$j][1] Case ""Spell Name"" If Not (StringInStr($SpellArray[0][$i], $iSearch[$j][0])) Then $include = False ExitLoop EndIf Case ""Level"" Local $levelCheck = False $levelSplit = StringSplit($iSearch[$j][0], ""\\\\"", 1) If $levelSplit[1] = $levelSplit[2] Then If Not ($levelSplit[1] = $SpellArray[1][$i]) Then $include = False ExitLoop EndIf Else For $lev = 0 To UBound($levelArray) - 1 ;; Level Split[1] = Left Search If $levelSplit[1] = $levelArray[$lev][1] Then $levelCheck = Not ($levelCheck) If $levelCheck = False And $SpellArray[1][$i] = $levelArray[$lev][1] Then ConsoleWrite(""ExitHittest"" & @LF) $include = False ExitLoop EndIf If $levelSplit[2] = $levelArray[$lev][1] AND $levelCheck Then $levelCheck = Not ($levelCheck) Next If $include = False Then ExitLoop EndIf EndIf ;~ If Not (StringInStr($SpellArray[1][$i], $iSearch[$j][0])) Then ;~ $include = False ;~ ExitLoop ;~ EndIf Case ""School"" If Not (StringInStr($SpellArray[2][$i], $iSearch[$j][0])) Then $include = False ExitLoop EndIf Case ""Ritual"" If Not (StringInStr($SpellArray[3][$i], $iSearch[$j][0])) Then $include = False ExitLoop EndIf Case ""Cast Time"" If Not (StringInStr($SpellArray[4][$i], $iSearch[$j][0])) Then $include = False ExitLoop EndIf Case ""Range"" If Not (StringInStr($SpellArray[5][$i], $iSearch[$j][0])) Then $include = False ExitLoop EndIf Case ""Components"" If Not (StringInStr($SpellArray[6][$i], $iSearch[$j][0])) Then $include = False ExitLoop Else $quicksplit = StringSplit($SpellArray[6][$i], "" ("", 1) If Not ($quicksplit[1] = $iSearch[$j][0]) Then $include = False ExitLoop EndIf EndIf Case ""Duration"" If Not (StringInStr($SpellArray[7][$i], $iSearch[$j][0])) Then $include = False ExitLoop EndIf Case ""Class"" $classCorrect = False $classSpells = IniReadSection($classesTxt, $iSearch[$j][0]) For $a = 1 To UBound($classSpells) - 1 If $classSpells[$a][0] = $SpellArray[0][$i] Then $classCorrect = True ExitLoop EndIf Next If $classCorrect Then ExitLoop Else $include = False ExitLoop EndIf Case ""Custom"" If $iSearch[$j][0] = ""Only"" Then If $i <= $DefaultSpells Then $include = False ExitLoop EndIf ElseIf $iSearch[$j][0] = ""No"" Then If $i > $DefaultSpells Then $include = False ExitLoop EndIf EndIf EndSwitch Next If $include Then _GUICtrlListView_AddItem($idListview, $SpellArray[0][$i]) _GUICtrlListView_AddSubItem($idListview, $listCount, $SpellArray[1][$i], 1) _GUICtrlListView_AddSubItem($idListview, $listCount, $SpellArray[2][$i], 2) _GUICtrlListView_AddSubItem($idListview, $listCount, $SpellArray[3][$i], 3) _GUICtrlListView_AddSubItem($idListview, $listCount, $SpellArray[4][$i], 4) _GUICtrlListView_AddSubItem($idListview, $listCount, $SpellArray[5][$i], 5) _GUICtrlListView_AddSubItem($idListview, $listCount, $SpellArray[6][$i], 6) _GUICtrlListView_AddSubItem($idListview, $listCount, $SpellArray[7][$i], 7) _GUICtrlListView_AddSubItem($idListview, $listCount, $SpellArray[8][$i], 8) _GUICtrlListView_AddSubItem($idListview, $listCount, _LevelSwitch($SpellArray[1][$i]), 9) $listCount += 1 EndIf Next EndFunc ;==>_SearchSpells Func _GUICtrlSetState($state) if $state = $GUI_DISABLE Then GUISetState($hGUI,@SW_LOCK) EndIf GUICtrlSetState($idListview, $state) GUICtrlSetState($cCast, $state) GUICtrlSetState($cComp, $state) GUICtrlSetState($cDur, $state) GUICtrlSetState($cLevel, $state) GUICtrlSetState($cLevel2, $state) GUICtrlSetState($cRange, $state) GUICtrlSetState($cRit, $state) GUICtrlSetState($cSch, $state) GUICtrlSetState($ihSearch, $state) GUICtrlSetState($bUpdate, $state) GUICtrlSetState($bClear, $state) GUICtrlSetState($cClass, $state) GUICtrlSetState($cCustom, $state) GUICtrlSetState($fileMenu, $state) if $state = $GUI_ENABLE Then GUISetState($hGUI,@SW_UNLOCK) EndIf EndFunc ;==>_GUICtrlSetState Func Update() $searchArray = 0 Dim $searchArray[10][2] #CS List View Columns [0] Spell Name [1]Level [2]School [3]Ritual [4]Cast Time [5]Range [6]Components [7]Duration [8]Description #CE $qCount = 0 If GUICtrlRead($ihSearch) <> """" Then $searchArray[$qCount][1] = ""Spell Name"" $searchArray[$qCount][0] = GUICtrlRead($ihSearch) $qCount += 1 EndIf If GUICtrlRead($cLevel) <> ""Any"" OR GUICtrlRead($cLevel2) <> ""Any"" Then $searchArray[$qCount][1] = ""Level"" $searchArray[$qCount][0] = GUICtrlRead($cLevel) & ""\\\\"" & GUICtrlRead($cLevel2) $qCount += 1 EndIf If GUICtrlRead($cSch) <> ""Any"" Then $searchArray[$qCount][1] = ""School"" $searchArray[$qCount][0] = GUICtrlRead($cSch) $qCount += 1 EndIf If GUICtrlRead($cRit) <> ""Any"" Then $searchArray[$qCount][1] = ""Ritual"" $searchArray[$qCount][0] = GUICtrlRead($cRit) $qCount += 1 EndIf If GUICtrlRead($cCast) <> ""Any"" Then $searchArray[$qCount][1] = ""Cast Time"" $searchArray[$qCount][0] = GUICtrlRead($cCast) $qCount += 1 EndIf If GUICtrlRead($cRange) <> ""Any"" Then $searchArray[$qCount][1] = ""Range"" $searchArray[$qCount][0] = GUICtrlRead($cRange) $qCount += 1 EndIf If GUICtrlRead($cComp) <> ""Any"" Then $searchArray[$qCount][1] = ""Components"" $searchArray[$qCount][0] = GUICtrlRead($cComp) $qCount += 1 EndIf If GUICtrlRead($cDur) <> ""Any"" Then $searchArray[$qCount][1] = ""Duration"" $searchArray[$qCount][0] = GUICtrlRead($cDur) $qCount += 1 EndIf If GUICtrlRead($cClass) <> ""Any"" Then $searchArray[$qCount][1] = ""Class"" $searchArray[$qCount][0] = GUICtrlRead($cClass) $qCount += 1 EndIf If GUICtrlRead($cCustom) <> ""Any"" Then $searchArray[$qCount][1] = ""Custom"" $searchArray[$qCount][0] = GUICtrlRead($cCustom) $qCount += 1 EndIf If $qCount > 0 Then ReDim $searchArray[$qCount][2] _GUICtrlSetState($GUI_DISABLE) _SearchSpells($searchArray) _GUICtrlSetState($GUI_ENABLE) Else _GUICtrlSetState($GUI_DISABLE) $SpellArray = CreateSpellArray() _GUICtrlSetState($GUI_ENABLE) EndIf EndFunc ;==>Update #Region OLD FUNCS FOR SEARCH OPTION GENERATION ;~ Func _ReadAttribute($localIni, $localAttribute) ;~ $rSec = _IniReadSectionNamesEx($localIni) ;~ Local $AttrArray[$rSec[0]], $localCount = -1 ;~ If $debug = 1 Then ;~ _ArrayDisplay($rSec) ;~ EndIf ;~ For $i = 1 To $rSec[0] ;~ $tempRead = IniRead($localIni, $rSec[$i], $localAttribute, """") ;~ If $tempRead = """" Then ;~ $tempRead = _IniReadEx($localIni, $rSec[$i], $localAttribute, """") ;~ If $tempRead = """" Then ;~ ConsoleWrite(""Attribute = "" & $localAttribute & @LF & $rSec[$i] & ""="" & $tempRead & @LF) ;~ Else ;~ If not(_ArrayCheck($AttrArray,$tempRead)) Then ;~ $localCount += 1 ;~ $AttrArray[$localCount] = $tempRead ;~ EndIf ;~ EndIf ;~ Else ;~ If not(_ArrayCheck($AttrArray,$tempRead)) Then ;~ $localCount += 1 ;~ $AttrArray[$localCount] = $tempRead ;~ Endif ;~ EndIf ;~ Next ;~ Redim $AttrArray[$localCount+1] ;~ Return $AttrArray ;~ EndFunc ;==>_ReadAttribute ;~ Func _ArrayCheck($iArray,$iValue) ;~ For $i = 0 to UBound($iArray)-1 ;~ if $iArray[$i] = $iValue Then Return True ;~ Next ;~ Return False ;~ EndFunc ;~ Func _ArrayQuickWrite($iArray,$iSection) ;~ For $i = 0 to UBound($iArray)-1 ;~ IniWrite(""SearchOptions.ini"",$iSection,$i,$iArray[$i]) ;~ Next ;~ EndFunc ;~ Func _DescGui($itemName = """", $iComp = """", $iDesc = """") ;~ GUISetState(@SW_DISABLE, $hGUI) ;~ $descWindows += 1 ;~ ReDim $hDescripts[$descWindows + 1] ;~ ;$dGUI ;~ $hDescripts[$descWindows] = GUICreate($itemName, 250, 400, -1, -1, $WS_MAXIMIZEBOX + $WS_MINIMIZEBOX + $WS_SIZEBOX) ;~ ConsoleWrite(""Windows = "" & $descWindows & @LF & ""Current Handle = "" & $hDescripts[$descWindows] & @LF) ;~ $iComp = IniRead($rIni, $itemName, ""Components"", """") ;~ $iDesc = IniRead($rIni, $itemName, ""Description"", """") ;~ $iComp = StringReplace($iComp, "".@CRLF"", ""."" & @CRLF) ;~ $iComp = StringReplace($iComp, ""@CRLF"", "" "") ;~ $iDesc = StringReplace($iDesc, "".@CRLF"", ""."" & @CRLF) ;~ $iDesc = StringReplace($iDesc, ""@CRLF"", "" "") ;~ GUICtrlCreateEdit(""Components: "" & $iComp & @CRLF & @CRLF & ""Description: "" & $iDesc, 5, 5, 240, 365, BitOR($ES_READONLY, $ES_MULTILINE, $WS_VSCROLL)) ;~ ;GUICtrlSetState(-1,$GUI_DISABLE) ;Shouldn't need this as READONLY does the same.. ;~ GUICtrlSetResizing(-1, $GUI_DOCKLEFT + $GUI_DOCKTOP + $GUI_DOCKBOTTOM + $GUI_DOCKRIGHT) ;~ GUISetState() ;~ GUISetState(@SW_ENABLE, $hGUI) ;~ EndFunc ;==>_DescGui #EndRegion OLD FUNCS FOR SEARCH OPTION GENERATION Func _LevelSwitch($iLevel) Switch $iLevel Case ""Cantrip"" Return 0 Case Else Return $iLevel EndSwitch EndFunc Func WM_NOTIFY($hWnd, $iMsg, $iwParam, $ilParam) ; structure to map $ilParam ($tNMHDR - see Help file) Local $tNMHDR = DllStructCreate($tagNMHDR, $ilParam);, $tagNMLISTVIEW Switch $tNMHDR.IDFrom Case $idListview Switch $tNMHDR.Code Case -12 ; User has changed column width If _GUICtrlListView_GetColumnWidth($idlistview, 9) <> 0 Then _ _GUICtrlListView_SetColumnWidth($idlistview, 9, 0) ; width of column 10 reset to zero ; ############################################################################################ Case $LVN_HOTTRACK ListView_HOTTRACK() Return 0 Case $NM_DBLCLK $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam) If $tInfo.Item > -1 Then $iItem = $tInfo.Item CreateSubWindow(_GUICtrlListView_GetItemText($idListview, $iItem)) EndIf ;MSGBOX(0,"""",""LOL"") Case $NM_RCLICK $tInfo = DllStructCreate($tagNMLISTVIEW, $ilParam) If $tInfo.Item > -1 Then $iItem = $tInfo.Item For $i = 1 to $SpellArray[0][0] if $SpellArray[0][$i] = _GUICtrlListView_GetItemText($idListview,$iItem) Then ExitLoop EndIf Next If $i <= $DefaultSpells Then _GUICtrlMenu_TrackPopupMenu($hMenu, $hGUI) Else _GUICtrlMenu_TrackPopupMenu($hMenu2, $hGUI) EndIf EndIf EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY Func WM_COMMAND($hWnd, $iMsg, $iwParam, $ilParam) ; $iwParam contains the application messages that we defined earlier Switch $iwParam Case $idproc1 GUICtrlSendToDummy($dummy_proc1) Case $idproc2 GUICtrlSendToDummy($dummy_proc2) Case $idproc3 GUICtrlSendToDummy($dummy_proc3) Case $idproc4 GUICtrlSendToDummy($dummy_proc4) EndSwitch EndFunc ;==>WM_COMMAND Func ListView_HOTTRACK() Local $HotItem = _GUICtrlListView_GetHotItem($idListview) If $HotItem <> -1 And WinActive($winTitle) Then $hotItemText = _GUICtrlListView_GetItemText($idListview, $HotItem) For $i = 1 To $SpellArray[0][0] If $hotItemText = $SpellArray[0][$i] Then $hotItemNumber = $i ExitLoop EndIf Next If $SpellArray[9][$hotItemNumber] = """" Then #Region - Using Description to make tooltip $TEXT = $SpellArray[8][$hotItemNumber] If StringLen($TEXT) > 500 Then $TEXT = StringLeft($TEXT, 500) & ""...."" & @CRLF & ""Double Click for more Info"" $a = 0 $count = 0 Do $a += 1;; Need to fix this for the Manual CRLFs (Add an Additive somewhere so that u can check each character?) If StringMid($TEXT, $a, 1) = @CRLF Or StringMid($TEXT, $a, 1) = @LF Or StringMid($TEXT, $a, 1) = @CR Then; = @CRLF Then $count = $a EndIf If $a > $count + 110 Then If Not (StringMid($TEXT, $a, 1) = "" "") Then $j = 0 Do $j += 1 Until StringMid($TEXT, $a + $j, 1) = "" "" Or $a + $j > StringLen($TEXT) $TEXT = StringLeft($TEXT, $a + $j) & @CRLF & StringRight($TEXT, StringLen($TEXT) - $a - $j) $count = $a + $j Else $TEXT = StringLeft($TEXT, $a) & @CRLF & StringRight($TEXT, StringLen($TEXT) - $a) $count = $a EndIf EndIf Until $a > StringLen($TEXT) Or $a > 500 $SpellArray[9][$hotItemNumber] = $TEXT #EndRegion - Using Description to make tooltip EndIf _ToolTipMouseExit($HotItem, $SpellArray[9][$hotItemNumber], 12000, -1, -1, $hotItemText) EndIf EndFunc ;==>ListView_HOTTRACK Func _ToolTipMouseExit($ITEM, $TEXT, $TIME = -1, $x = -1, $y = -1, $TITLE = '', $ICON = 0, $OPT = '') If $TIME = -1 Then $TIME = 3000 Global $start = TimerInit(), $pos0 = MouseGetPos(), $toolTime = $TIME, $toolITEM = $ITEM $ToolTipActive = True If ($x = -1) Or ($y = -1) Then ToolTip($TEXT, $pos0[0] + 1, $pos0[1] + 1, $TITLE, $ICON, $OPT) Else ToolTip($TEXT, $x + 1, $y + 1, $TITLE, $ICON, $OPT) EndIf EndFunc ;==>_ToolTipMouseExit Func _ToolCheck() Sleep(100) $pos = MouseGetPos() If (TimerDiff($start) > $toolTime) Or _ ($toolITEM <> _GUICtrlListView_GetHotItem($idListview) Or _;; Add below back in if User wants the tooltip to follow closer. (Abs($pos[0] - $pos0[0]) > 30 Or _ Abs($pos[1] - $pos0[1]) > 30)) Then ToolTip('') $ToolTipActive = False EndIf If WinActive($winTitle) = 0 Then ToolTip('') $ToolTipActive = False EndIf EndFunc ;==>_ToolCheck Func _Titilise($iString) $titleLen = StringLen($iString) $retString = ""+"" For $i = 0 To $titleLen + 1 $retString &= ""~"" Next $retString &= ""+"" & @CRLF $retString &= ""| "" & $iString & "" |"" & @CRLF $retString &= ""+"" For $i = 0 To $titleLen + 1 $retString &= ""~"" Next $retString &= ""+"" & @CRLF Return $retString EndFunc ;==>_Titilise Func _IniDecode($iSection, $iniType = ""Complete"") ;ConsoleWrite(""Initype = "" & $iniType & @LF) Local $retString = """", $longestStr = 0 $titleLen = StringLen($iSection) ;ConsoleWrite($titleLen & @LF) If $iniType = ""Complete"" Then $iniData = IniReadSection($compIni, $iSection) ElseIf $iniType = ""Custom"" Then $iniData = IniReadSection($custIni, $iSection) EndIf For $i = 1 To $iniData[0][0] Select Case StringInStr($iniData[$i][0], ""Type"") $retString &= $iniData[$i][1] & @CRLF & @CRLF Case StringInStr($iniData[$i][0], ""Description"") If StringInStr($iniData[$i][0], ""DescriptionTitle"") Then $strLen = StringLen($iniData[$i][1]) $retString &= ""|"" For $j = 0 To $strLen + 1 $retString &= ""~"" Next $retString &= ""|"" & @CRLF $retString &= ""| "" & $iniData[$i][1] & "" |"" & @CRLF $retString &= ""|"" For $j = 0 To $strLen + 1 $retString &= ""~"" Next $retString &= ""|"" & @CRLF Else $retString &= "" "" & $iniData[$i][1] & @CRLF EndIf Case StringInStr($iniData[$i][0], ""Subitem"") $retString &= ""- "" & $iniData[$i][1] & @CRLF Case StringInStr($iniData[$i][0], ""TableTitle"") Or StringInStr($iniData[$i][0], ""TableColumns"") Or StringInStr($iniData[$i][0], ""TableRow"") $j = $i $longestStr = 0 $colInt = 0 $tabInt = 0 $tableArray = 0 $tableItems = 0 $colLengths = 0 $colSplit = 0 $columns = 1 $boolTitle = False $boolCol = False $boolRow = False $tableTitle = """" Dim $tableArray[200][10] Do If StringInStr($iniData[$j][0], ""Table"") Then If StringInStr($iniData[$j][0], ""TableTitle"") Then If $boolTitle = True Then ExitLoop If $boolRow = True Then ExitLoop $longestStr = StringLen($iniData[$j][1]) + 2 $tableTitle = $iniData[$j][1] $boolTitle = True ;ConsoleWrite($tableArray[0][1] & @LF) ElseIf StringInStr($iniData[$j][0], ""TableColumns"") Then If $boolCol = True Then ExitLoop If $boolRow = True Then ExitLoop $colSplit = StringSplit($iniData[$j][1], ""\\\\"", 1) Dim $colLengths[$colSplit[0]] For $a = 1 To $colSplit[0] $tableArray[1][$a - 1] = $colSplit[$a] ;ConsoleWrite(""Column "" & $a & "" is "" & $tableArray[1][$a - 1] & @LF) $colLengths[$a - 1] = StringLen($tableArray[1][$a - 1]) Next $boolCol = True Else $tabItemSplit = StringSplit($iniData[$j][1], ""\\\\"", 1) $tableItems += 1 If $boolRow = True Then If UBound($colLengths) < $tabItemSplit[0] Then ConsoleWrite(""Wrong Number of Columns"" & @LF) ExitLoop EndIf EndIf $columns = $tabItemSplit[0] ConsoleWrite($columns & @LF) If $longestStr = 0 Then $longestStr += 1 For $b = 1 To $tabItemSplit[0] $longestStr += StringLen($tabItemSplit[$b]) If Not ($b = $tabItemSplit[0]) Then $longestStr += 3 Next $longestStr += 1 Else $rowStr = 1 ConsoleWrite($tabItemSplit & @LF) $n = 1 If $boolCol Then $n = 2 For $b = $n To $tabItemSplit[0] $rowStr += StringLen($tabItemSplit[$b]) If Not ($b = $tabItemSplit[0]) Then $rowStr += 3 Next $rowStr += 1 If $rowStr > $longestStr Then $longestStr = $rowStr EndIf If Not (IsArray($colLengths)) Then Dim $colLengths[$tabItemSplit[0]] EndIf For $a = 1 To $tabItemSplit[0] If $boolCol Then $tableArray[$tableItems + 1][$a - 1] = $tabItemSplit[$a] Else $tableArray[$tableItems][$a - 1] = $tabItemSplit[$a] EndIf ;ConsoleWrite(""Item "" & $tableItems & "" column "" & $a & "" is "" & $tableArray[$tableItems + 1][$a - 1] & @LF) If StringLen($tableArray[$tableItems + 1][$a - 1]) > $colLengths[$a - 1] Then $colLengths[$a - 1] = StringLen($tableArray[$tableItems + 1][$a - 1]) Next $boolRow = True EndIf ;ConsoleWrite($iniData[$j][0] &@LF) EndIf ;Add to Array in here maybe instead? Can't tell at the moment if its better to do Longest Str first or not? ; You would probably need array because Columns\\Items need +3 inbetween each column where as a Title only needs +2 on either side $j += 1 Until ($j > $iniData[0][0] Or StringInStr($iniData[$j][0], ""Table"") = 0) If Not ($j > $iniData[0][0]) Then $i = $j - 1 Else $i = $j EndIf $colInt = 1 For $j = 0 To UBound($colLengths) - 1 $colInt += $colLengths[$j] If $j = UBound($colLengths) - 1 Then $colInt += 1 Else $colInt += 3 EndIf Next If $colInt > $longestStr Then $longestStr = $colInt Else $j = $colInt $z = 0 Do If $z > UBound($colLengths) - 1 Then $z = 0 If $colLengths <> 0 Then $colLengths[$z] += 1 $j += 1 $z += 1 Until $j > $longestStr - 1 EndIf If IsArray($colSplit) Then If $colSplit[0] > $columns Then $columns = $colSplit[0] ReDim $tableArray[$tableItems + 2][$columns] Else ReDim $tableArray[$tableItems + 1][$columns] EndIf $tableArray[0][0] = $tableItems If $tableTitle <> """" Then $retString &= ""+"" For $j = 1 To $longestStr $retString &= ""-"" Next $retString &= ""+"" & @CRLF & ""+"" $titleSpace = ($longestStr - StringLen($tableTitle)) / 2 For $j = 1 To Ceiling($titleSpace) $retString &= "" "" Next $retString &= $tableTitle For $j = 1 To Floor($titleSpace) $retString &= "" "" Next $retString &= ""+"" & @CRLF EndIf $retString &= ""+"" For $j = 1 To $longestStr $retString &= ""-"" Next $retString &= ""+"" & @CRLF $n = 0 If IsArray($colSplit) Then $n = 1 For $j = 1 To $tableItems + $n $retString &= ""|"" If $tableItems > 0 Or IsArray($colSplit) Then For $a = 0 To UBound($tableArray, 2) - 1 $itemSpace = ($colLengths[$a] - StringLen($tableArray[$j][$a])) / 2 For $z = 0 To Floor($itemSpace) $retString &= "" "" Next $retString &= $tableArray[$j][$a] For $z = 0 To Ceiling($itemSpace) $retString &= "" "" Next If Not ($a >= UBound($tableArray, 2) - 1) Then $retString &= ""|"" Next EndIf $retString &= ""|"" & @CRLF If $j = 1 And $boolCol Then $retString &= ""+"" For $x = 1 To $longestStr $retString &= ""-"" Next $retString &= ""+"" & @CRLF EndIf Next $retString &= ""+"" For $j = 1 To $longestStr $retString &= ""-"" Next $retString &= ""+"" & @CRLF & @CRLF Case StringInStr($iniData[$i][0], ""Roll"") $strLen = StringLen($iniData[$i][1]) If StringInStr($iniData[$i][0], ""DiceRoll"") Then $strLen += 11 $retString &= ""+"" For $j = 0 To $strLen + 1 $retString &= ""-"" Next $retString &= ""+"" & @CRLF & ""+ "" If StringInStr($iniData[$i][0], ""DiceRoll"") Then $retString &= ""Dice Roll: "" $retString &= $iniData[$i][1] & "" +"" & @CRLF $retString &= ""+"" For $j = 0 To $strLen + 1 $retString &= ""-"" Next $retString &= ""+"" & @CRLF Case StringInStr($iniData[$i][0], ""Effect"") $retString &= $iniData[$i][1] & @CRLF & @CRLF Case StringInStr($iniData[$i][0], ""Heading"") If StringInStr($iniData[$i][0], ""EndHeading"") Then $retString &= ""+--------------+"" & @CRLF Else $strLen = StringLen($iniData[$i][1]) $retString &= ""+"" For $j = 0 To $strLen + 1 $retString &= ""-"" Next $retString &= ""+"" & @CRLF & ""+ "" $retString &= $iniData[$i][1] & "" +"" & @CRLF $retString &= ""+"" For $j = 0 To $strLen + 1 $retString &= ""-"" Next $retString &= ""+"" & @CRLF EndIf EndSelect Next If $longestStr > $titleLen Then $titleLen = $longestStr Dim $retArray[2] = [$retString, $titleLen] Return $retArray EndFunc ;==>_IniDecode ",16299,True,2722.4781059823968,median "/* Work in progress Asgard ADC Firmware Relase 0.5.0 08/02/2018 This is a preliminary release, work in progress. Misbehaviour is plausible. AsgardADC.ino - Air Data Computer Firmware Conform to ADC Common Mesage Set 0.5 Firmware for Teensy 3.6 MCU Created by JLJ and GC, BasicAirData Team www.basicairdata.eu This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implie d warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include #include #include #include #include #include #include #include // Library for second I2C #include // Library for SSC series sensors, support two bus I2C #define ADC_NAME ""ASGARD"" // The name of the ADC device #define PROTOCOL_VERSION ""0.5"" // The version of the communication protocol #define BUFFERLENGTH 2048 // The length of string buffers #define DELIMITER '\\n' #define SEPARATOR "","" #define LEAVE_AS_IS ""="" #define DEFAULT_LOGFILE ""DATALOG.CSV"" // The default log file name #define DEFAULT_CONFIGFILE ""CONFIG.CFG"" // The configuration file name const int ledPin = 13; // The led is ON when the application is logging on SD const int TsensorPin = A0; // The input pin for the analog Temperature sensor const int chipSelect = BUILTIN_SDCARD; // HW pin for micro SD adaptor CS File dataFile; // The file on SD File configFile; // The setup configuration file on SD bool isSDCardPresent; // The presence of a (formatted) card into the slot of SD bool loadConfiguration; // The flag is true if the config file is present into SD (and must be loaded on start) Sd2Card card; // The SD Card SdVolume volume; // The volume (partition) on SD double iTAS, ip1TAS, res, iof; // Accessory variables for Air Data calculations float diffpMinRaw = 1638.3; //Declaration of sensors specific parameters for default ADC configuration float diffpMaxRaw = 14744.7; float diffpMinPressure = -6984.760; float diffpsetMaxPressure = 6984.760; float absMinRaw = 1638.3; float absMaxRaw = 14744.7; float absMinPressure = 0.0; float abssetMaxPressure = 160000.0; AirDC AirDataComputer(1); // The Air Data Computer SSC diffp(0x28, 0); // Create an SSC sensor with I2C address 0x28 on I2C bus 0 SSC absp(0x28, 1); // Create an SSC sensor with I2C address 0x28 on I2C bus 1 String message_BT; // string that stores the incoming BT message String message_COM; // string that stores the incoming COM message String message_CFG; // string that stores the configuration messages float acquisition_freq = 1; // The minimum frequency of acquisition = 1 Hz (1 s) float sendtoserial_freq = 0; // The frequency of sendtoserial = NOT ACTIVE float sendtobluetooth_freq = 0; // The frequency of sendtobluetooth = NOT ACTIVE float sendtosd_freq = 0; // The frequency of sendtosd, = NOT ACTIVE long acquisition_interval = (long)(1.0f / acquisition_freq * 1000.0f); long sendtoserial_interval; long sendtobluetooth_interval; long sendtosd_interval; int delaymicroseconds_interval = 5000; // The delay at the end of main loop. It may vary in the range 100-5000 micros. Metro acquisitionTimer = Metro(acquisition_interval); // The timer for acquisition Metro sendtoserialTimer = Metro(sendtoserial_interval); // The timer for sendtoserialTimer Metro sendtobluetoothTimer = Metro(sendtobluetooth_interval); // The timer for sendtobluetoothTimer Metro sendtosdTimer = Metro(sendtosd_interval); //NOT ACTIVE // The timer for sendtosdTimer bool sendtoserial_needs_acquisition = true; // The check that the aquisition has been updated since the last $DTA bool sendtobluetooth_needs_acquisition = true; // The check that the aquisition has been updated since the last $DTA bool sendtosd_needs_acquisition = true; // The check that the aquisition has been updated since the last $DTA char Data[2][BUFFERLENGTH]; // The strings containing the data message char *p_Data; // The pointer to the current valid data string void setup() { // Deafult configuration for ADC Hardware. 1 present; 0 not installed AirDataComputer._status[AIRDC_STATUS_SD] = '0'; // SD Card AirDataComputer._status[AIRDC_STATUS_DELTAP] = '1'; // Deltap pressure sensor AirDataComputer._status[AIRDC_STATUS_P] = '1'; // Absolute pressure sensor AirDataComputer._status[AIRDC_STATUS_TAT] = '1'; // External temperature sensor AirDataComputer._status[AIRDC_STATUS_TDELTAP] = '1'; // Deltap sensor temperature AirDataComputer._status[AIRDC_STATUS_TABSP] = '1'; // Absolute pressure sensor temperature AirDataComputer._status[AIRDC_STATUS_RTCBATT] = '0'; // Real time clock temperature temperature AirDataComputer._status[AIRDC_STATUS_ERRWARN] = '0'; // Error/Warning AirDataComputer._status[AIRDC_STATUS_BLUETOOTH] = '0'; // BT Module present on serial1 strcpy(AirDataComputer._logfile, DEFAULT_LOGFILE); pinMode(TsensorPin, INPUT); pinMode(ledPin, OUTPUT); Serial.begin (57600); // Set up the Serial Connection using high speed, for precise log timings //Serial.begin (9600); // Set up the Serial Connection Serial1.begin (9600); // Set up the BT Connection delay(500); if (Serial1) AirDataComputer._status[AIRDC_STATUS_BLUETOOTH] = '1'; // BT Module present on serial1 SDCardCheck(); Wire.begin(); // I2C Bus 0 Wire1.begin(); // I2C Bus 1 // Setup sensors parameters diffp.setMinRaw (diffpMinRaw); diffp.setMaxRaw (diffpMaxRaw); diffp.setMinPressure (diffpMinPressure); diffp.setMaxPressure (diffpsetMaxPressure); absp.setMinRaw (absMinRaw); absp.setMaxRaw (absMaxRaw); absp.setMinPressure (absMinPressure); absp.setMaxPressure (abssetMaxPressure); strcpy(Data[0], ""\\0""); // Initialize the Data strcpy(Data[1], ""\\0""); // Initialize the Data p_Data = &Data[1][0]; // The current valid status index is 1 if (isSDCardPresent) { // Searches the configuration file configFile = SD.open(DEFAULT_CONFIGFILE); if (configFile) loadConfiguration = true; } } void getNextFilename(char* namefile) { if (strlen(namefile) < 13) { char namefile1[13], newname[13], number[13], nformat[5], *before, *after; int numbersize = 13 - strlen(namefile); numbersize = min (numbersize, 4); sprintf(nformat, ""%%0%id"", numbersize); strcpy(namefile1, namefile); before = strtok (namefile1, ""?""); after = strtok (NULL, ""?""); bool fileexists = true; for (int i = 0; i < (pow(10, numbersize)) && fileexists; i++) { sprintf(number, nformat, i); strcpy(newname, before); strcat(newname, number); strcat(newname, after); if (!SD.exists(newname)) { strcpy(namefile, newname); fileexists = false; } } } } void dateTime(uint16_t* date, uint16_t* time) // Callback for file timestamps { *date = FAT_DATE(year(), month(), day()); *time = FAT_TIME(hour(), minute(), second()); } void SDCardCheck() { if (!isSDCardPresent) { isSDCardPresent = card.init(SPI_FULL_SPEED, chipSelect); if (isSDCardPresent) SD.begin(chipSelect); } isSDCardPresent = volume.init(card); AirDataComputer._status[AIRDC_STATUS_SD] = (isSDCardPresent ? '1' : '0'); } void acquisition() { // 1) Sensors reading // Outside Temperature Sensor if (AirDataComputer._status[AIRDC_STATUS_TAT] == '1') { // External Temperature sensor present AirDataComputer._TRaw = analogRead(TsensorPin); AirDataComputer._TAT = ((((AirDataComputer._TRaw * (3300.0 / 1024)) - 750) / 10) + 25) + 273.15; // Total Air Temperature } // Differential Pressure sensor if (AirDataComputer._status[AIRDC_STATUS_DELTAP] == '1') { // Differential pressure sensor present diffp.update(); //AirDataComputer._qc = diffp.pressure(); AirDataComputer._qc = AirDataComputer.CorrectDp(1, diffp.pressure()); //Corrected Differential Pressure AirDataComputer._qcRaw = diffp.pressure_Raw(); if (AirDataComputer._status[AIRDC_STATUS_TDELTAP] == '1') { // Temperature differential pressure sensor present AirDataComputer._Tdeltap = diffp.temperature(); AirDataComputer._TdeltapRaw = diffp.temperature_Raw(); } } // Absolute Pressure sensor if (AirDataComputer._status[AIRDC_STATUS_P] == '1') { // Absolute pressure sensor present absp.update(); AirDataComputer._pRaw = absp.pressure_Raw(); AirDataComputer._p = absp.pressure(); if (AirDataComputer._status[AIRDC_STATUS_TABSP] == '1') { // Temperature absolute pressure sensor present AirDataComputer._Tabsp = absp.temperature(); AirDataComputer._TabspRaw = absp.temperature_Raw(); } } // No sensor for RH, we are selecting dry air but the library will handle moist air if required AirDataComputer._RH = 0; // For low speeds this is a good approximation AirDataComputer._T = AirDataComputer._TAT; // 2) Calculations // Init AirDataComputer.RhoAir(1); // Calculates the air density AirDataComputer.Viscosity(1); // Calculates the dynamic viscosity, Algorithm 2 (UOM Pas1e-6) AirDataComputer.CalibrationFactor(1); // Calibration factor set to 1 AirDataComputer.IAS(1); // Calculates IAS method 1 AirDataComputer._TAS = AirDataComputer._IAS; AirDataComputer.Mach(1); // Calculates Mach No AirDataComputer.OAT(1); // Outside Air Temperature // Wild iteration iof = 1; while ((res > 0.05) || (iof < 10)) { AirDataComputer.RhoAir(1); // Calculates the air density AirDataComputer.Viscosity(1); // Calculates the dynamic viscosity, Algorithm 2 (UOM Pas1e-6) AirDataComputer.CalibrationFactor(2); // Update calibration fator vat at TAS AirDataComputer.IAS(1); // IAS AirDataComputer.CAS(1); // CAS AirDataComputer.TAS(1); // True Air Speed AirDataComputer.Mach(1); // Update Mach No iTAS = AirDataComputer._TAS; // Store TAS value AirDataComputer.OAT(1); // Update outside Air Temperature AirDataComputer.RhoAir(1); // Calculates the air density AirDataComputer.Viscosity(1); // Calculates the dynamic viscosity, Algorithm 2 (UOM Pas1e-6) AirDataComputer.CalibrationFactor(2); // Update calibration fator vat at TAS AirDataComputer.TAS(1); // Update TAS AirDataComputer.Mach(1); // Update Mach No AirDataComputer.OAT(1); // Update outside Air Temperature ip1TAS = AirDataComputer._TAS; res = abs(ip1TAS - iTAS) / iTAS; iof++; } // Uncorrected ISA Altitude _h AirDataComputer.ISAAltitude(1); AirDataComputer._d = 8e-3; AirDataComputer.Red(1); // 3) $DTA message update char *p_newData; // The pointer to unused index; p_newData = (p_Data == &Data[0][0] ? &Data[1][0] : &Data[0][0]); // The new string is composed into the unused Data index strcpy (p_newData, ""$DTA""); char workbuff[BUFFERLENGTH]; // General purpose buffer, used for itoa conversion AirDataComputer.PrepareData(); for (int i = 0; i < AIRDC_DATA_VECTOR_SIZE; i++) { // Prepare to send #10 - DTA - DATA_ASSERT message strcat (p_newData, SEPARATOR); // Add the separator if (AirDataComputer._datasel[i] == '1') { switch (i) { case AIRDC_DATA_TIME: case AIRDC_DATA_QCRAW: case AIRDC_DATA_PRAW: case AIRDC_DATA_TRAW: case AIRDC_DATA_TDELTAPRAW: case AIRDC_DATA_TABSPRAW: case AIRDC_DATA_MILLIS: sprintf(workbuff, ""%.0f"", (AirDataComputer._dataout[i])); break; case AIRDC_DATA_P: case AIRDC_DATA_TAT: case AIRDC_DATA_TDELTAP: case AIRDC_DATA_TABSP: case AIRDC_DATA_UIAS: case AIRDC_DATA_UTAS: case AIRDC_DATA_UH: case AIRDC_DATA_UT: case AIRDC_DATA_T: case AIRDC_DATA_RE: sprintf(workbuff, ""%.1f"", (AirDataComputer._dataout[i])); break; case AIRDC_DATA_IAS: case AIRDC_DATA_TAS: case AIRDC_DATA_H: case AIRDC_DATA_QC: sprintf(workbuff, ""%.2f"", (AirDataComputer._dataout[i])); break; case AIRDC_DATA_C: sprintf(workbuff, ""%.4f"", (AirDataComputer._dataout[i])); break; case AIRDC_DATA_RHO: sprintf(workbuff, ""%.6f"", (AirDataComputer._dataout[i])); break; case AIRDC_DATA_MU: sprintf(workbuff, ""%.8f"", (AirDataComputer._dataout[i])); break; default: sprintf(workbuff, ""%f"", (AirDataComputer._dataout[i])); break; // UNUSED DEFAULT FORMAT } strcat (p_newData, workbuff); } else { } } strcat (p_newData, ""\\0""); p_Data = (p_Data == &Data[0][0] ? &Data[1][0] : &Data[0][0]); // Switch the pointer to the current valid string to the new one sendtoserial_needs_acquisition = false; // The aquisition has been updated since the last $DTA sendtobluetooth_needs_acquisition = false; // The aquisition has been updated since the last $DTA sendtosd_needs_acquisition = false; // The aquisition has been updated since the last $DTA } void sendtoserial(void) { char printdata[BUFFERLENGTH]; strcpy (printdata, p_Data); sendtoserial_needs_acquisition = true; Serial.println(printdata); } void sendtobluetooth(void) { char printdata[BUFFERLENGTH]; strcpy (printdata, p_Data); sendtobluetooth_needs_acquisition = true; Serial1.println(printdata); } void sendtosd(void) { char printdata[BUFFERLENGTH]; strcpy (printdata, p_Data); sendtosd_needs_acquisition = true; if (dataFile) dataFile.println(printdata); } void loop() { bool endmsg_BT = false; // it becomes true when a message is received from BLUETOOTH bool endmsg_COM = false; // it becomes true when a message is received from SERIAL bool endmsg_CFG = false; // it becomes true when a message is received from CONFIGURATION FILE char workbuff[BUFFERLENGTH] = """"; // General purpose buffer, used for itoa conversion char Message[BUFFERLENGTH] = """"; // it contains the message to be processed char Answer[BUFFERLENGTH] = """"; // it contains the answer to the message // 0) Check Metro Timers: if ((acquisition_freq > 0) && (acquisitionTimer.check() == 1)) acquisition(); if ((sendtoserial_freq > 0) && (sendtoserialTimer.check() == 1)) { if (sendtoserial_needs_acquisition) { acquisition(); acquisitionTimer.reset(); } sendtoserial(); } if ((sendtobluetooth_freq > 0) && (sendtobluetoothTimer.check() == 1)) { if (sendtobluetooth_needs_acquisition) { acquisition(); acquisitionTimer.reset(); } sendtobluetooth(); } if ((sendtosd_freq > 0) && (sendtosdTimer.check() == 1)) { if (sendtosd_needs_acquisition) { acquisition(); acquisitionTimer.reset(); } sendtosd(); } // 1) Read input from Configuration file, Serial, and Bluetooth: if (loadConfiguration) { while (configFile.available()) { char ch = configFile.read(); if (ch == DELIMITER) { endmsg_CFG = true; message_CFG.toCharArray (Message, BUFFERLENGTH - 1); message_CFG = """"; goto endread; } else if (ch != '\\r') message_CFG += char(ch); // Store string from CONFIG file } loadConfiguration = false; configFile.close(); endmsg_CFG = true; message_CFG.toCharArray (Message, BUFFERLENGTH - 1); message_CFG = """"; goto endread; } while (Serial.available()) { char ch = Serial.read(); if (ch == DELIMITER) { endmsg_COM = true; message_COM.toCharArray (Message, BUFFERLENGTH - 1); message_COM = """"; goto endread; } else if (ch != '\\r') message_COM += char(ch); // Store string from serial command } while (Serial1.available()) { char ch = Serial1.read(); if (ch == DELIMITER) { endmsg_BT = true; message_BT.toCharArray (Message, BUFFERLENGTH - 1); message_BT = """"; goto endread; } else if (ch != '\\r') message_BT += char(ch); // Store string from bluetooth command } endread: // 2) Process messages if (endmsg_COM || endmsg_BT || endmsg_CFG) { char *command = strtok(Message, SEPARATOR); // -------------------------------------------------- // #0 – HBQ – HEARTBEAT_REQ --> Reply HBA - HEARTBEAT_ASSERT // -------------------------------------------------- // $HBQ,Devicename,ProtocolVersion // $HBQ,REMOTEPROGRAM,0.3 if (!strcmp(command, ""$HBQ"")) { strcpy (Answer, ""$HBA,""); strcat (Answer, ADC_NAME); strcat (Answer, SEPARATOR); strcat (Answer, PROTOCOL_VERSION); goto endeval; } // -------------------------------------------------- // #1 – HBA – HEARTBEAT_ASSERT // -------------------------------------------------- // $HBA,Devicename,ProtocolVersion // $HBA,DEVICE,0.3 if (!strcmp(command, ""$HBA"")) { goto endeval; } // -------------------------------------------------- // #2 – TMS – TIME_SET --> Reply TMA - TIME_ASSERT // -------------------------------------------------- // $TMS,SecondsFrom1_1_1970 // $TMS,1495396317 Set time to 21 May 2017, 21.52... if (!strcmp(command, ""$TMS"")) { command = strtok (NULL, SEPARATOR); if (command != NULL) { long newTime = atol(command); if (newTime > 0) setTime(newTime); } strcpy (Answer, ""$TMA,""); long int currenttime = static_cast (now()); char s[20]; ltoa(currenttime, s, 10); strcat (Answer, s); goto endeval; } // -------------------------------------------------- // #3 – TMQ – TIME_REQ --> Reply TMA - TIME_ASSERT // -------------------------------------------------- // $TMQ if (!strcmp(command, ""$TMQ"")) { strcpy (Answer, ""$TMA,""); long int currenttime = static_cast (now()); char s[20]; ltoa(currenttime, s, 10); strcat (Answer, s); goto endeval; } // -------------------------------------------------- // #4 – TMA – TIME_ASSERT // -------------------------------------------------- // $TMA,SecondsFrom1_1_1970 if (!strcmp(command, ""$TMA"")) { goto endeval; } // -------------------------------------------------- // #5 – STS – STATUS_SET --> Reply STA - STATUS_ASSERT // -------------------------------------------------- // $STS,0,1,1,1,1,1,0,0,0 // $STS,=,=,=,0,=,=,=,=,= Deactivate the external temperature sensor. Don't touch other fields if (!strcmp(command, ""$STS"")) { int i; i = 0; for (i = 0; i < AIRDC_STATUS_VECTOR_SIZE; i++) { // Receive the status vector command = strtok (NULL, SEPARATOR); if (strlen(command) < 1) goto endeval; if (!strcmp(command, ""0"")) { AirDataComputer._status[i] = '0'; workbuff[2 * i] = '0'; } else if (!strcmp(command, ""1"")) { AirDataComputer._status[i] = '1'; workbuff[2 * i] = '1'; } else { workbuff[2 * i] = AirDataComputer._status[i]; } workbuff[2 * i + 1] = ','; } AirDataComputer._status[AIRDC_STATUS_VECTOR_SIZE + 1] = '\\0'; workbuff[2 * AIRDC_STATUS_VECTOR_SIZE - 1] = '\\0'; strcpy (Answer, ""$STA,""); strcat (Answer, workbuff); // TODO = Send the real status buffer, and NOT the received workbuff goto endeval; } // -------------------------------------------------- // #6 – STQ – STATUS_REQ --> Reply STA - STATUS_ASSERT // -------------------------------------------------- // $STQ if (!strcmp(command, ""$STQ"")) { int i; i = 0; for (i = 0; i < AIRDC_STATUS_VECTOR_SIZE; i++) { // Returns the status vector workbuff[2 * i] = AirDataComputer._status[i]; workbuff[2 * i + 1] = ','; } workbuff[2 * i - 1] = '\\0'; strcpy (Answer, ""$STA,""); strcat (Answer, workbuff); goto endeval; } // -------------------------------------------------- // #7 – STA – STATUS_ASSERT // -------------------------------------------------- if (!strcmp(command, ""$STA"")) { goto endeval; } // -------------------------------------------------- // #8 – DTS – DATA_SET // -------------------------------------------------- // $DTS,=,=,=,=,=,=,=,=,300 Sets the external temperature to 300 [K] (if the sensor is not present) if (!strcmp(command, ""$DTS"")) { int i; i = 0; for (i = 0; i < AIRDC_DATA_VECTOR_SIZE; i++) { // Check the fields command = strtok (NULL, SEPARATOR); if (strlen(command) < 1) goto endeval; if (strcmp(command, LEAVE_AS_IS)) { switch (i) { case AIRDC_DATA_TAT: // External Temperature if (AirDataComputer._status[AIRDC_STATUS_TAT] == '0') { AirDataComputer._TAT = atol(command); AirDataComputer._TRaw = 0l; } break; case AIRDC_DATA_QC: // Differential pressure if (AirDataComputer._status[AIRDC_STATUS_DELTAP] == '0') { AirDataComputer._qc = atol(command); AirDataComputer._qcRaw = 0l; } break; case AIRDC_DATA_TDELTAP: // Temperature differential pressure sensor if (AirDataComputer._status[AIRDC_STATUS_TDELTAP] == '0') { AirDataComputer._Tdeltap = atol(command); AirDataComputer._TdeltapRaw = 0l; } break; case AIRDC_DATA_P: // Absolute pressure if (AirDataComputer._status[AIRDC_STATUS_P] == '0') { AirDataComputer._p = atol(command); AirDataComputer._pRaw = 0l; } break; case AIRDC_DATA_TABSP: // Temperature absolute pressure sensor if (AirDataComputer._status[AIRDC_STATUS_TABSP] == '0') { AirDataComputer._Tabsp = atol(command); AirDataComputer._TabspRaw = 0l; } break; default: // IT DOES NOTHING break; } } } goto endeval; } // -------------------------------------------------- // #9 – DTQ – DATA_REQ // -------------------------------------------------- // Request all the data fields of #10 // $DTQ,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 // Request all the data fields except Deltap and Ext Temperature // $DTQ,1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 // Request time, deltap, p, ext temperature // $DTQ,1,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 // Toggle ON the ext temperature field // $DTQ,=,=,=,=,=,=,=,=,1 // Request a $DTA string // $DTQ if (!strcmp(command, ""$DTQ"")) { if (!strcmp(command, ""$DTQ,"")) { strcpy (Answer, p_Data); // Simply return the data goto endeval; } strcpy (Answer, """"); int i; i = 0; for (i = 0; i < AIRDC_DATA_VECTOR_SIZE; i++) { command = strtok (NULL, SEPARATOR); if (strlen(command) < 1) goto endeval; if (strcmp(command, LEAVE_AS_IS)) AirDataComputer._datasel[i] = command[0]; } // Save to the SD the configuration data //SDCardCheck(); //if (isSDCardPresent) { // SD.remove(DEFAULT_CONFIGFILE); // File dataFile = SD.open(DEFAULT_CONFIGFILE, FILE_WRITE); // if (dataFile) { // if the file is available, write to it: // AirDataComputer._status[AIRDC_STATUS_SD] = '1'; // SD Card present // dataFile.print(""$DTQ,""); // dataFile.println(workbuff); // dataFile.close(); // } else { // if the file isn't open, pop up an error: // AirDataComputer._status[AIRDC_STATUS_SD] = '0'; // SD Card not present // goto endeval; // } //} // Modified #10 reply message. No data will be transmitted. It is a plain acknowledge. //strcpy (outstr,""$DTA,""); //strcat (Answer, workbuff); goto endeval; } // -------------------------------------------------- // #10 – DTA – DATA_ASSERT // -------------------------------------------------- if (!strcmp(command, ""$DTA"")) { goto endeval; } // -------------------------------------------------- // #11 - LCS - LOG_CURRENTFILE_SET --> Reply LCA - LOG_CURRENTFILE_ASSERT // -------------------------------------------------- // Set the current log file to the LOG-01.CSV // $LCS,LOG-01.CSV if (!strcmp(command, ""$LCS"")) { command = strtok (NULL, SEPARATOR); if (strlen(command) < 1) { goto endeval; } SDCardCheck(); if (isSDCardPresent) { if (strstr(command, ""?"") != NULL) getNextFilename(command); if (!SD.exists(command)) { // The file doesn't exists. SdFile::dateTimeCallback(dateTime); File file = SD.open(command, FILE_WRITE); // Creates the file with the right timestamp file.close(); SdFile::dateTimeCallbackCancel(); } dataFile.close(); strcpy(AirDataComputer._logfile, command); //dataFile = SD.open(AirDataComputer._logfile, O_WRITE | O_CREAT | O_APPEND); dataFile = SD.open(AirDataComputer._logfile, FILE_WRITE); if (dataFile) { // if the file is available, write to it: AirDataComputer._status[AIRDC_STATUS_SD] = '1'; // SD Card present } else { // if the file isn't open, pop up an error: AirDataComputer._status[AIRDC_STATUS_SD] = '0'; // SD Card not present goto endeval; } AirDataComputer._status[AIRDC_STATUS_SD] = '1'; // SD Card present } strcpy (Answer, ""$LCA""); strcat (Answer, SEPARATOR); strcat (Answer, AirDataComputer._logfile); } // -------------------------------------------------- // #12 – LCQ – LOG_CURRENTFILE_REQ --> Reply LCA - LOG_CURRENTFILE_ASSERT // -------------------------------------------------- if (!strcmp(command, ""$LCQ"")) { strcpy (Answer, ""$LCA""); strcat (Answer, SEPARATOR); strcat (Answer, AirDataComputer._logfile); goto endeval; } // -------------------------------------------------- // #13 – LCA – LOG_CURRENTFILE_ASSERT // -------------------------------------------------- if (!strcmp(command, ""$LCA"")) { goto endeval; } // -------------------------------------------------- // #14 – DFS – DATA_FREQ_SET --> Reply DFA - DATA_FREQ_ASSERT // -------------------------------------------------- // $DFS,Serial_freq,Bluetooth_freq,SD_freq <-- SPECS CHANGED // $DFS,5,0.5,0 Serial = 1 Hz Bluetooth = 0.5 Hz No SD logging // $DFS,=,0.5,5 Serial = leave as is Bluetooth = 0.5 Hz SD = 5 Hz if (!strcmp(command, ""$DFS"")) { // $DFS,Serial,Bluetooth,SD command = strtok (NULL, SEPARATOR); if (command != NULL) { float DataFrequency_COM = (strcmp(command, LEAVE_AS_IS) ? atof(command) : -1); // Read the freq value command = strtok (NULL, SEPARATOR); if (command != NULL) { float DataFrequency_BT = (strcmp(command, LEAVE_AS_IS) ? atof(command) : -1); // Read the freq value command = strtok (NULL, SEPARATOR); if (command != NULL) { float DataFrequency_SD = (strcmp(command, LEAVE_AS_IS) ? atof(command) : -1); // Read the freq value // Change frequencies if ((DataFrequency_COM >= 0) && (DataFrequency_COM != sendtoserial_freq)) { sendtoserial_freq = DataFrequency_COM; if (sendtoserial_freq > 0) { sendtoserial_interval = (long)(1.0f / sendtoserial_freq * 1000.0f); sendtoserialTimer.interval(sendtoserial_interval); sendtoserialTimer.reset(); sendtoserial_needs_acquisition = true; } } if ((DataFrequency_BT >= 0) && (DataFrequency_BT != sendtobluetooth_freq)) { sendtobluetooth_freq = DataFrequency_BT; if (sendtobluetooth_freq > 0) { sendtobluetooth_interval = (long)(1.0f / sendtobluetooth_freq * 1000.0f); sendtobluetoothTimer.interval(sendtobluetooth_interval); sendtobluetoothTimer.reset(); sendtobluetooth_needs_acquisition = true; } } if ((DataFrequency_SD >= 0) && (DataFrequency_SD != sendtosd_freq)) { digitalWrite(ledPin, LOW); // set the LED off if (dataFile) dataFile.close(); sendtosd_freq = DataFrequency_SD; if (sendtosd_freq > 0) { SDCardCheck(); //dataFile = SD.open(AirDataComputer._logfile, O_WRITE | O_CREAT | O_APPEND); dataFile = SD.open(AirDataComputer._logfile, FILE_WRITE); if (dataFile) { AirDataComputer._status[AIRDC_STATUS_SD] = '1'; // SD Card present sendtosd_interval = (long)(1.0f / sendtosd_freq * 1000.0f); sendtosdTimer.interval(sendtosd_interval); sendtosdTimer.reset(); sendtosd_needs_acquisition = true; digitalWrite(ledPin, HIGH); // set the LED on } else { AirDataComputer._status[AIRDC_STATUS_SD] = '0'; // SD Card not present sendtosd_freq = 0; } } } } } } strcpy (Answer, ""$DFA,""); char f1[20], f2[20], f3[20]; sprintf(f1, ""%.3f"", sendtoserial_freq); strcat (Answer, f1); strcat (Answer, SEPARATOR); sprintf(f2, ""%.3f"", sendtobluetooth_freq); strcat (Answer, f2); strcat (Answer, SEPARATOR); sprintf(f3, ""%.3f"", sendtosd_freq); strcat (Answer, f3); // Set the new delaymicroseconds_interval = 0.5% of the minimum of the log delays long delay_interval = 1000l; // 1 second min if (sendtoserial_freq > 0) delay_interval = fminl(sendtoserial_interval, delay_interval); if (sendtobluetooth_freq > 0) delay_interval = fminl(sendtobluetooth_interval, delay_interval); if (sendtosd_freq > 0) delay_interval = fminl(sendtosd_interval, delay_interval); if (delay_interval < 20l) delay_interval = 20l; delaymicroseconds_interval = (int)(delay_interval * 5); //Serial.println(delaymicroseconds_interval); // Left for debug purpose goto endeval; } // -------------------------------------------------- // # 15 – DFQ – DATA_FREQ_REQ --> Reply DFA - DATA_FREQ_ASSERT // -------------------------------------------------- // $DFQ if (!strcmp(command, ""$DFQ"")) { strcpy (Answer, ""$DFA,""); char f1[20], f2[20], f3[20]; sprintf(f1, ""%.3f"", sendtoserial_freq); strcat (Answer, f1); strcat (Answer, SEPARATOR); sprintf(f2, ""%.3f"", sendtobluetooth_freq); strcat (Answer, f2); strcat (Answer, SEPARATOR); sprintf(f3, ""%.3f"", sendtosd_freq); strcat (Answer, f3); goto endeval; } // -------------------------------------------------- // #16 – DFA – DATA_FREQ_ASSERT // -------------------------------------------------- if (!strcmp(command, ""$DFA"")) { goto endeval; } // -------------------------------------------------- // #17 - FMQ - FILE_MANAGER_REQ // -------------------------------------------------- if (!strcmp(command, ""$FMQ"")) { SDCardCheck(); File dir; int n = 0; if (strlen(command) < 1) goto endeval; command = strtok (NULL, SEPARATOR); // Required command char *param = nullptr; param = strtok (NULL, SEPARATOR); // Parameter if (!strcmp(command, ""LST"")) { // List files on the SD strcpy (Answer, ""$FMA,LST""); if (!isSDCardPresent) goto endeval; SdFile root; root.openRoot(volume); dir_t p; char* pfilename; uint8_t result; tmElements_t ts; //Serial.println(micros()); // Send a string with the total number of files to be sent n = 0; root.rewind(); result = root.readDir(&p); while (result) { if (!(p.attributes & (0X08 | 0X10))) { // if the entry is a file, not a subdir pfilename = (char*)&p.name[0]; if (*pfilename != '.') n++; } result = root.readDir(&p); } strcat (Answer, SEPARATOR); itoa(n, workbuff, 10); // Append number of files strcat (Answer, workbuff); //Serial.println(micros()); root.rewind(); result = root.readDir(&p); while (result) { if (!(p.attributes & (0X08 | 0X10))) { // if the entry is a file, not a subdir pfilename = (char*)&p.name[0]; if (*pfilename != '.') { strcat (Answer, SEPARATOR); char fname[14]; int fi = 0; for (int i = 0; i < 8; i++) { if (pfilename[i] != ' ') { fname[fi] = pfilename[i]; fi++; } } fname[fi] = '.'; fi++; for (int i = 8; i < 11; i++) { if (pfilename[i] != ' ') { fname[fi] = pfilename[i]; fi++; } } fname[fi] = '\\0'; strcat (Answer, fname); strcat (Answer, SEPARATOR); ltoa(p.fileSize, workbuff, 10); strcat (Answer, workbuff); // Send out file size strcat (Answer, SEPARATOR); ts.Year = 10 + (p.creationDate >> 9); // YEAR ts.Month = (p.creationDate >> 5) & 0XF; // MONTH ts.Day = p.creationDate & 0X1F; // DAY ts.Hour = p.creationTime >> 11; // HOUR ts.Minute = (p.creationTime >> 5) & 0X3F; // MINUTE ts.Second = 2*(p.creationTime & 0X1F); // SECOND ultoa(makeTime(ts), workbuff, 10); strcat (Answer, workbuff); // Send out file size //Serial.println((unsigned long)makeTime(ts)); } } result = root.readDir(&p); } //Serial.println(micros()); goto endeval; } if (!strcmp(command, ""NEW"")) // Requires creation of a file { strcpy (Answer, ""$FMA,NEW""); if (!isSDCardPresent) goto endeval; if (strstr(param, ""?"") != NULL) getNextFilename(param); if (!SD.exists(param)) { // The file doesn't exists. SdFile::dateTimeCallback(dateTime); File file = SD.open(param, FILE_WRITE); // Creates the file with the right timestamp file.close(); SdFile::dateTimeCallbackCancel(); } dir = SD.open(param, FILE_WRITE); if (SD.exists(param)) { strcat (Answer, SEPARATOR); //strcpy(airdata->_logfile,param);// Now you can set the file as current using #LCS command strcat (Answer, param); } dir.close(); goto endeval; } if (!strcmp(command, ""DEL"")) // Requires deletion of a file { strcpy (Answer, ""$FMA,DEL""); if (!isSDCardPresent) goto endeval; if (!strcmp(param, AirDataComputer._logfile) && (sendtosd_freq == 0)) { // current file dataFile.close(); // Close the current file (if is not recording) } if ((!strcmp(param, AirDataComputer._logfile) && (sendtosd_freq == 0)) || strcmp(param, AirDataComputer._logfile)) { SD.remove(param); // Delete the file if (!(SD.exists(param))) { strcat (Answer, SEPARATOR); strcat (Answer, param); } } goto endeval; } if (!strcmp(command, ""PRP"")) // Requires information about one file { strcpy (Answer, ""$FMA,PRP""); if (!isSDCardPresent) goto endeval; SdFile root; root.openRoot(volume); dir_t p; char* pfilename; uint8_t result; tmElements_t ts; root.rewind(); result = root.readDir(&p); while (result) { if (!(p.attributes & (0X08 | 0X10))) { // if the entry is a file, not a subdir pfilename = (char*)&p.name[0]; if (*pfilename != '.') { char fname[14]; int fi = 0; for (int i = 0; i < 8; i++) { if (pfilename[i] != ' ') { fname[fi] = pfilename[i]; fi++; } } fname[fi] = '.'; fi++; for (int i = 8; i < 11; i++) { if (pfilename[i] != ' ') { fname[fi] = pfilename[i]; fi++; } } fname[fi] = '\\0'; if (!strcmp(param, fname)) { // File found! strcat (Answer, SEPARATOR); strcat (Answer, fname); strcat (Answer, SEPARATOR); ltoa(p.fileSize, workbuff, 10); strcat (Answer, workbuff); // Send out file size strcat (Answer, SEPARATOR); ts.Year = 10 + (p.creationDate >> 9); // YEAR ts.Month = (p.creationDate >> 5) & 0XF; // MONTH ts.Day = p.creationDate & 0X1F; // DAY ts.Hour = p.creationTime >> 11; // HOUR ts.Minute = (p.creationTime >> 5) & 0X3F; // MINUTE ts.Second = 2*(p.creationTime & 0X1F); // SECOND ultoa(makeTime(ts), workbuff, 10); strcat (Answer, workbuff); // Send out file size break; } } } result = root.readDir(&p); } goto endeval; } if (!strcmp(command, ""DMP"")) //Requires dump of one file { strcpy (Answer, ""$FMA,DMP""); if (!isSDCardPresent) goto endeval; dir = SD.open(param); // if the file is available if (dir) { if (endmsg_COM) { strcat (Answer, SEPARATOR); strcat (Answer, dir.name()); Serial.println(Answer); strcpy (Answer, """"); while (dir.available() && (!Serial.available())) { for (int i = 0; (i < 512) && (dir.available()); i++) { Serial.write(dir.read()); } Serial.flush(); if (Serial.available()) Serial.println(); } /*if (dir.available()) Serial.println(""$EOD""); else*/ Serial.println(""$EOF""); } if (endmsg_BT) { strcat (Answer, SEPARATOR); strcat (Answer, dir.name()); Serial1.println(Answer); strcpy (Answer, """"); while (dir.available() && (!Serial1.available())) { for (int i = 0; (i < 512) && (dir.available()); i++) { Serial1.write(dir.read()); } Serial1.flush(); if (Serial1.available()) Serial1.println(); } /*if (dir.available()) Serial.println(""$EOD""); else*/ Serial1.println(""$EOF""); } dir.close(); } goto endeval; } } // -------------------------------------------------- // #19 - CCS–CALIBRATION_CON_SET // -------------------------------------------------- //Example Sent -> $CCS,EXE,1,1 // EXE Command if (!strcmp(command, ""$CCS"")) { float SensorID, CalibMode, CalibMeasure,CalibGain; if (strlen(command) < 1) goto endeval; command = strtok (NULL, SEPARATOR); // Required command if (!strcmp(command, ""EXE"")) { //EXE Execute calibration command command = strtok (NULL, SEPARATOR); if (command != NULL) { SensorID = (atof(command)); // Read the Sensor ID value command = strtok (NULL, SEPARATOR); if (command != NULL) { CalibMode = (atof(command)); // Read required calibration mode } } if (CalibMode == 1) { //Offset Calib //Sospensive zero offset calibration CalibMeasure = 0; if (AirDataComputer._status[AIRDC_STATUS_DELTAP] == '1') { // Differential pressure sensor present int maxip = 50; //No. of samples to calculate the average zero value for (int ip = 0; ip < maxip; ip++) { diffp.update(); CalibMeasure = CalibMeasure + diffp.pressure_Raw(); delay(200); } CalibMeasure = CalibMeasure / maxip; AirDataComputer._DpZeroMeas = CalibMeasure; } strcpy (Answer, ""$CCA,""); char f1[20], f2[20], f3[20]; sprintf(f1, ""%.3f"", SensorID); strcat (Answer, f1); strcat (Answer, SEPARATOR); sprintf(f2, ""%.3f"", CalibMode); strcat (Answer, f2); strcat (Answer, SEPARATOR); sprintf(f3, ""%.3f"", AirDataComputer._DpZeroMeas); strcat (Answer, f3); goto endeval; } } if (!strcmp(command, ""USE"")) { //USE command command = strtok (NULL, SEPARATOR); if (command != NULL) { SensorID = (atof(command)); // Read the Sensor ID value command = strtok (NULL, SEPARATOR); if (command != NULL) { CalibMode = (atof(command)); // Read required calibration mode } command = strtok (NULL, SEPARATOR); if (command != NULL) { CalibMeasure = (atof(command)); // Read offset value } command = strtok (NULL, SEPARATOR); if (command != NULL) { CalibGain = (atof(command)); // Read Gain Value } } if (CalibMode == 1) { //Offset Calibibration only AirDataComputer._DpZeroMeas = CalibMeasure; strcpy (Answer, ""$CCA,""); char f1[20], f2[20], f3[20]; sprintf(f1, ""%.3f"", SensorID); strcat (Answer, f1); strcat (Answer, SEPARATOR); sprintf(f2, ""%.3f"", CalibMode); strcat (Answer, f2); strcat (Answer, SEPARATOR); sprintf(f3, ""%.3f"", AirDataComputer._DpZeroMeas); strcat (Answer, f3); goto endeval; } if (CalibMode == 2) { //Offset Calibibration only AirDataComputer._DpZeroMeas = CalibMeasure; AirDataComputer._GainDp = CalibGain; strcpy (Answer, ""$CCA,""); char f1[20], f2[20], f3[20],f4[20]; sprintf(f1, ""%.3f"", SensorID); strcat (Answer, f1); strcat (Answer, SEPARATOR); sprintf(f2, ""%.3f"", CalibMode); strcat (Answer, f2); strcat (Answer, SEPARATOR); sprintf(f3, ""%.3f"", AirDataComputer._DpZeroMeas); strcat (Answer, f3); strcat (Answer, SEPARATOR); sprintf(f4, ""%.6f"", AirDataComputer._GainDp); strcat (Answer, f4); goto endeval; } } if (!strcmp(command, ""SEN"")) { //SEN command command = strtok (NULL, SEPARATOR); if (command != NULL) { SensorID = (atof(command)); // Read the Sensor ID value } AirDataComputer._DpZeroMeas = CalibMeasure; AirDataComputer._GainDp = CalibGain; strcpy (Answer, ""$CCA,""); char f1[20], f3[20],f4[20]; sprintf(f1, ""%.3f"", SensorID); strcat (Answer, f1); strcat (Answer, SEPARATOR); sprintf(f3, ""%.3f"", AirDataComputer._DpZeroMeas); strcat (Answer, f3); strcat (Answer, SEPARATOR); sprintf(f4, ""%.6f"", AirDataComputer._GainDp); strcat (Answer, f4); goto endeval; } // Message #19, HWD command // $CCS,=,=,1500,=,=,=,=, Sets the external Absolute pressure sensor Min Count value if (!strcmp(command, ""HWD"")) { int i; i = 0; for (i = 0; i < 8; i++) { // Check the fields command = strtok (NULL, SEPARATOR); if (strlen(command) < 1) goto endeval; if (strcmp(command, LEAVE_AS_IS)) { switch (i) { case 0: // Deltap Sensor Min Count value diffp.setMinRaw (atof(command)); break; case 1: // Absolute pressure sensor Min Count value absp.setMinRaw (atof(command)); break; case 2: // Deltap Sensor Max Count value diffp.setMaxRaw (atof(command)); break; case 3: // Absolute pressure sensor Max Count value absp.setMaxRaw (atof(command)); break; case 4: // Deltap Sensor Min Pressure diffp.setMinPressure (atof(command)); break; case 5: // Abs Sensor Min Pressure absp.setMinPressure (atof(command)); break; case 6: // Deltap Sensor Max Pressure diffp.setMaxPressure (atof(command)); break; case 7: // Abs Sensor Max Pressure absp.setMaxPressure (atof(command)); break; default: // IT DOES NOTHING break; } } } strcpy (Answer, ""$CCA""); //Reply #20, void acknoledge goto endeval; } goto endeval; } endeval: // 3) In case answers to the right applicant if (strcmp(Answer, """")) { if (endmsg_COM) Serial.println(Answer); if (endmsg_BT) Serial1.println(Answer); } } delayMicroseconds(delaymicroseconds_interval); //delay } ",12324,False,2343.410484906587,median "/* Скетч к проекту ""Светомузыка на Arduino"" Страница проекта (схемы, описания): https://alexgyver.ru/colormusic/ Исходники на GitHub: https://github.com/AlexGyver/ColorMusic Нравится, как написан код? Поддержи автора! https://alexgyver.ru/support_alex/ Автор: AlexGyver Technologies, 2018 https://AlexGyver.ru/ Как откалибровать уровень шума и как пользоваться пультом расписано на странице проекта! https://alexgyver.ru/colormusic/ */ /* Версия 2.10 Исправлен глюк с большим количеством светодиодов на МЕГЕ */ // ***************************** НАСТРОЙКИ ***************************** // ----- настройка ИК пульта #define REMOTE_TYPE 1 // 0 - без пульта, 1 - пульт от WAVGAT, 2 - пульт от KEYES, 3 - кастомный пульт // система может работать С ЛЮБЫМ ИК ПУЛЬТОМ (практически). Коды для своего пульта можно задать начиная со строки 160 в прошивке. Коды пультов определяются скетчем IRtest_2.0, читай инструкцию // ----- настройки параметров #define KEEP_SETTINGS 1 // хранить ВСЕ настройки в энергонезависимой памяти #define KEEP_STATE 1 // сохранять в памяти состояние вкл/выкл системы (с пульта) #define RESET_SETTINGS 0 // сброс настроек в EEPROM памяти (поставить 1, прошиться, поставить обратно 0, прошиться. Всё) #define SETTINGS_LOG 1 // вывод всех настроек из EEPROM в порт при запуске // ----- настройки ленты #define NUM_LEDS 150 // количество светодиодов (данная версия поддерживает до 410 штук) #define CURRENT_LIMIT 5000 // лимит по току в МИЛЛИАМПЕРАХ, автоматически управляет яркостью (пожалей свой блок питания!) 0 - выключить лимит byte BRIGHTNESS = 200; // яркость по умолчанию (0 - 255) // ----- пины подключения #define SOUND_R A2 // аналоговый пин вход аудио, правый канал #define SOUND_L A1 // аналоговый пин вход аудио, левый канал #define SOUND_R_FREQ A3 // аналоговый пин вход аудио для режима с частотами (через кондер) #define BTN_PIN 3 // кнопка переключения режимов (PIN --- КНОПКА --- GND) #if defined(__AVR_ATmega32U4__) // Пины для Arduino Pro Micro (смотри схему для Pro Micro на странице проекта!!!) #define MLED_PIN 17 // пин светодиода режимов на ProMicro, т.к. обычный не выведен. #define MLED_ON LOW #define LED_PIN 9 // пин DI светодиодной ленты на ProMicro, т.к. обычный не выведен. #else // Пины для других плат Arduino (по умолчанию) #define MLED_PIN 13 // пин светодиода режимов #define MLED_ON HIGH #define LED_PIN 6 // пин DI светодиодной ленты #endif #define POT_GND A0 // пин земля для потенциометра #define IR_PIN 2 // пин ИК приёмника // ----- настройки радуги float RAINBOW_STEP = 5.00; // шаг изменения цвета радуги // ----- отрисовка #define MODE 0 // режим при запуске #define MAIN_LOOP 5 // период основного цикла отрисовки (по умолчанию 5) // ----- сигнал #define MONO 1 // 1 - только один канал (ПРАВЫЙ!!!!! SOUND_R!!!!!), 0 - два канала #define EXP 1.4 // степень усиления сигнала (для более ""резкой"" работы) (по умолчанию 1.4) #define POTENT 1 // 1 - используем потенциометр, 0 - используется внутренний источник опорного напряжения 1.1 В byte EMPTY_BRIGHT = 0; // яркость ""не горящих"" светодиодов (0 - 255) #define EMPTY_COLOR HUE_PURPLE // цвет ""не горящих"" светодиодов. Будет чёрный, если яркость 0 // ----- нижний порог шумов uint16_t LOW_PASS = 100; // нижний порог шумов режим VU, ручная настройка uint16_t SPEKTR_LOW_PASS = 40; // нижний порог шумов режим спектра, ручная настройка #define AUTO_LOW_PASS 0 // разрешить настройку нижнего порога шумов при запуске (по умолч. 0) #define EEPROM_LOW_PASS 1 // порог шумов хранится в энергонезависимой памяти (по умолч. 1) #define LOW_PASS_ADD 13 // ""добавочная"" величина к нижнему порогу, для надёжности (режим VU) #define LOW_PASS_FREQ_ADD 3 // ""добавочная"" величина к нижнему порогу, для надёжности (режим частот) // ----- режим шкала громкости float SMOOTH = 0.3; // коэффициент плавности анимации VU (по умолчанию 0.5) #define MAX_COEF 1.8 // коэффициент громкости (максимальное равно срднему * этот коэф) (по умолчанию 1.8) // ----- режим цветомузыки float SMOOTH_FREQ = 0.8; // коэффициент плавности анимации частот (по умолчанию 0.8) float MAX_COEF_FREQ = 1.2; // коэффициент порога для ""вспышки"" цветомузыки (по умолчанию 1.5) #define SMOOTH_STEP 20 // шаг уменьшения яркости в режиме цветомузыки (чем больше, тем быстрее гаснет) #define LOW_COLOR HUE_RED // цвет низких частот #define MID_COLOR HUE_GREEN // цвет средних #define HIGH_COLOR HUE_YELLOW // цвет высоких // ----- режим стробоскопа uint16_t STROBE_PERIOD = 140; // период вспышек, миллисекунды #define STROBE_DUTY 20 // скважность вспышек (1 - 99) - отношение времени вспышки ко времени темноты #define STROBE_COLOR HUE_YELLOW // цвет стробоскопа #define STROBE_SAT 0 // насыщенность. Если 0 - цвет будет БЕЛЫЙ при любом цвете (0 - 255) byte STROBE_SMOOTH = 200; // скорость нарастания/угасания вспышки (0 - 255) // ----- режим подсветки byte LIGHT_COLOR = 0; // начальный цвет подсветки byte LIGHT_SAT = 255; // начальная насыщенность подсветки byte COLOR_SPEED = 100; int RAINBOW_PERIOD = 1; float RAINBOW_STEP_2 = 0.5; // ----- режим бегущих частот byte RUNNING_SPEED = 11; // ----- режим анализатора спектра byte HUE_START = 0; byte HUE_STEP = 5; #define LIGHT_SMOOTH 2 /* Цвета для HSV HUE_RED HUE_ORANGE HUE_YELLOW HUE_GREEN HUE_AQUA HUE_BLUE HUE_PURPLE HUE_PINK */ // ----- КНОПКИ ПУЛЬТА WAVGAT ----- #if REMOTE_TYPE == 1 #define BUTT_UP 0xF39EEBAD #define BUTT_DOWN 0xC089F6AD #define BUTT_LEFT 0xE25410AD #define BUTT_RIGHT 0x14CE54AD #define BUTT_OK 0x297C76AD #define BUTT_1 0x4E5BA3AD #define BUTT_2 0xE51CA6AD #define BUTT_3 0xE207E1AD #define BUTT_4 0x517068AD #define BUTT_5 0x1B92DDAD #define BUTT_6 0xAC2A56AD #define BUTT_7 0x5484B6AD #define BUTT_8 0xD22353AD #define BUTT_9 0xDF3F4BAD #define BUTT_0 0xF08A26AD #define BUTT_STAR 0x68E456AD #define BUTT_HASH 0x151CD6AD #endif // ----- КНОПКИ ПУЛЬТА KEYES ----- #if REMOTE_TYPE == 2 #define BUTT_UP 0xE51CA6AD #define BUTT_DOWN 0xD22353AD #define BUTT_LEFT 0x517068AD #define BUTT_RIGHT 0xAC2A56AD #define BUTT_OK 0x1B92DDAD #define BUTT_1 0x68E456AD #define BUTT_2 0xF08A26AD #define BUTT_3 0x151CD6AD #define BUTT_4 0x18319BAD #define BUTT_5 0xF39EEBAD #define BUTT_6 0x4AABDFAD #define BUTT_7 0xE25410AD #define BUTT_8 0x297C76AD #define BUTT_9 0x14CE54AD #define BUTT_0 0xC089F6AD #define BUTT_STAR 0xAF3F1BAD #define BUTT_HASH 0x38379AD #endif // ----- КНОПКИ СВОЕГО ПУЛЬТА ----- #if REMOTE_TYPE == 3 #define BUTT_UP 0xE51CA6AD #define BUTT_DOWN 0xD22353AD #define BUTT_LEFT 0x517068AD #define BUTT_RIGHT 0xAC2A56AD #define BUTT_OK 0x1B92DDAD #define BUTT_1 0x68E456AD #define BUTT_2 0xF08A26AD #define BUTT_3 0x151CD6AD #define BUTT_4 0x18319BAD #define BUTT_5 0xF39EEBAD #define BUTT_6 0x4AABDFAD #define BUTT_7 0xE25410AD #define BUTT_8 0x297C76AD #define BUTT_9 0x14CE54AD #define BUTT_0 0xC089F6AD #define BUTT_STAR 0xAF3F1BAD // * #define BUTT_HASH 0x38379AD // # #endif // ------------------------------ ДЛЯ РАЗРАБОТЧИКОВ -------------------------------- #define MODE_AMOUNT 9 // количество режимов #define STRIPE NUM_LEDS / 5 float freq_to_stripe = NUM_LEDS / 40; // /2 так как симметрия, и /20 так как 20 частот #define FHT_N 64 // ширина спектра х2 #define LOG_OUT 1 #include // преобразование Хартли #include #define FASTLED_ALLOW_INTERRUPTS 1 #include ""FastLED.h"" CRGB leds[NUM_LEDS]; #include ""GyverButton.h"" GButton butt1(BTN_PIN); #include ""IRLremote.h"" CHashIR IRLremote; uint32_t IRdata; // градиент-палитра от зелёного к красному DEFINE_GRADIENT_PALETTE(soundlevel_gp) { 0, 0, 255, 0, // green 100, 255, 255, 0, // yellow 150, 255, 100, 0, // orange 200, 255, 50, 0, // red 255, 255, 0, 0 // red }; CRGBPalette32 myPal = soundlevel_gp; int Rlenght, Llenght; float RsoundLevel, RsoundLevel_f; float LsoundLevel, LsoundLevel_f; float averageLevel = 50; int maxLevel = 100; int MAX_CH = NUM_LEDS / 2; int hue; unsigned long main_timer, hue_timer, strobe_timer, running_timer, color_timer, rainbow_timer, eeprom_timer; float averK = 0.006; byte count; float index = (float)255 / MAX_CH; // коэффициент перевода для палитры boolean lowFlag; byte low_pass; int RcurrentLevel, LcurrentLevel; int colorMusic[3]; float colorMusic_f[3], colorMusic_aver[3]; boolean colorMusicFlash[3], strobeUp_flag, strobeDwn_flag; byte this_mode = MODE; int thisBright[3], strobe_bright = 0; unsigned int light_time = STROBE_PERIOD * STROBE_DUTY / 100; volatile boolean ir_flag; boolean settings_mode, ONstate = true; int8_t freq_strobe_mode, light_mode; int freq_max; float freq_max_f, rainbow_steps; int freq_f[32]; int this_color; boolean running_flag[3], eeprom_flag; #define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit)) #define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit)) // ------------------------------ ДЛЯ РАЗРАБОТЧИКОВ -------------------------------- void setup() { Serial.begin(9600); FastLED.addLeds(leds, NUM_LEDS).setCorrection( TypicalLEDStrip ); if (CURRENT_LIMIT > 0) FastLED.setMaxPowerInVoltsAndMilliamps(5, CURRENT_LIMIT); FastLED.setBrightness(BRIGHTNESS); #if defined(__AVR_ATmega32U4__) //Выключение светодиодов на Pro Micro TXLED1; //на ProMicro выключим и TXLED delay (1000); //При питании по usb от компьютера нужна задержка перед выключением RXLED. Если питать от БП, то можно убрать эту строку. #endif pinMode(MLED_PIN, OUTPUT); //Режим пина для светодиода режима на выход digitalWrite(MLED_PIN, !MLED_ON); //Выключение светодиода режима pinMode(POT_GND, OUTPUT); digitalWrite(POT_GND, LOW); butt1.setTimeout(900); IRLremote.begin(IR_PIN); // для увеличения точности уменьшаем опорное напряжение, // выставив EXTERNAL и подключив Aref к выходу 3.3V на плате через делитель // GND ---[10-20 кОм] --- REF --- [10 кОм] --- 3V3 // в данной схеме GND берётся из А0 для удобства подключения if (POTENT) analogReference(EXTERNAL); else #if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) analogReference(INTERNAL1V1); #else analogReference(INTERNAL); #endif // жуткая магия, меняем частоту оцифровки до 18 кГц // команды на ебучем ассемблере, даже не спрашивайте, как это работает // поднимаем частоту опроса аналогового порта до 38.4 кГц, по теореме // Котельникова (Найквиста) частота дискретизации будет 19.2 кГц // http://yaab-arduino.blogspot.ru/2015/02/fast-sampling-from-analog-input.html sbi(ADCSRA, ADPS2); cbi(ADCSRA, ADPS1); sbi(ADCSRA, ADPS0); if (RESET_SETTINGS) EEPROM.write(100, 0); // сброс флага настроек if (AUTO_LOW_PASS && !EEPROM_LOW_PASS) { // если разрешена автонастройка нижнего порога шумов autoLowPass(); } if (EEPROM_LOW_PASS) { // восстановить значения шумов из памяти LOW_PASS = EEPROM.readInt(70); SPEKTR_LOW_PASS = EEPROM.readInt(72); } // в 100 ячейке хранится число 100. Если нет - значит это первый запуск системы if (KEEP_SETTINGS) { if (EEPROM.read(100) != 100) { //Serial.println(F(""First start"")); EEPROM.write(100, 100); updateEEPROM(); } else { readEEPROM(); } } #if (SETTINGS_LOG == 1) Serial.print(F(""this_mode = "")); Serial.println(this_mode); Serial.print(F(""freq_strobe_mode = "")); Serial.println(freq_strobe_mode); Serial.print(F(""light_mode = "")); Serial.println(light_mode); Serial.print(F(""RAINBOW_STEP = "")); Serial.println(RAINBOW_STEP); Serial.print(F(""MAX_COEF_FREQ = "")); Serial.println(MAX_COEF_FREQ); Serial.print(F(""STROBE_PERIOD = "")); Serial.println(STROBE_PERIOD); Serial.print(F(""LIGHT_SAT = "")); Serial.println(LIGHT_SAT); Serial.print(F(""RAINBOW_STEP_2 = "")); Serial.println(RAINBOW_STEP_2); Serial.print(F(""HUE_START = "")); Serial.println(HUE_START); Serial.print(F(""SMOOTH = "")); Serial.println(SMOOTH); Serial.print(F(""SMOOTH_FREQ = "")); Serial.println(SMOOTH_FREQ); Serial.print(F(""STROBE_SMOOTH = "")); Serial.println(STROBE_SMOOTH); Serial.print(F(""LIGHT_COLOR = "")); Serial.println(LIGHT_COLOR); Serial.print(F(""COLOR_SPEED = "")); Serial.println(COLOR_SPEED); Serial.print(F(""RAINBOW_PERIOD = "")); Serial.println(RAINBOW_PERIOD); Serial.print(F(""RUNNING_SPEED = "")); Serial.println(RUNNING_SPEED); Serial.print(F(""HUE_STEP = "")); Serial.println(HUE_STEP); Serial.print(F(""EMPTY_BRIGHT = "")); Serial.println(EMPTY_BRIGHT); Serial.print(F(""ONstate = "")); Serial.println(ONstate); #endif } void loop() { buttonTick(); // опрос и обработка кнопки #if REMOTE_TYPE != 0 remoteTick(); // опрос ИК пульта #endif mainLoop(); // главный цикл обработки и отрисовки eepromTick(); // проверка не пора ли сохранить настройки } void mainLoop() { // главный цикл отрисовки if (ONstate) { if (millis() - main_timer > MAIN_LOOP) { // сбрасываем значения RsoundLevel = 0; LsoundLevel = 0; // перваые два режима - громкость (VU meter) if (this_mode == 0 || this_mode == 1) { for (byte i = 0; i < 100; i ++) { // делаем 100 измерений RcurrentLevel = analogRead(SOUND_R); // с правого if (!MONO) LcurrentLevel = analogRead(SOUND_L); // и левого каналов if (RsoundLevel < RcurrentLevel) RsoundLevel = RcurrentLevel; // ищем максимальное if (!MONO) if (LsoundLevel < LcurrentLevel) LsoundLevel = LcurrentLevel; // ищем максимальное } // фильтруем по нижнему порогу шумов RsoundLevel = map(RsoundLevel, LOW_PASS, 1023, 0, 500); if (!MONO)LsoundLevel = map(LsoundLevel, LOW_PASS, 1023, 0, 500); // ограничиваем диапазон RsoundLevel = constrain(RsoundLevel, 0, 500); if (!MONO)LsoundLevel = constrain(LsoundLevel, 0, 500); // возводим в степень (для большей чёткости работы) RsoundLevel = pow(RsoundLevel, EXP); if (!MONO)LsoundLevel = pow(LsoundLevel, EXP); // фильтр RsoundLevel_f = RsoundLevel * SMOOTH + RsoundLevel_f * (1 - SMOOTH); if (!MONO)LsoundLevel_f = LsoundLevel * SMOOTH + LsoundLevel_f * (1 - SMOOTH); if (MONO) LsoundLevel_f = RsoundLevel_f; // если моно, то левый = правому // заливаем ""подложку"", если яркость достаточная if (EMPTY_BRIGHT > 5) { for (int i = 0; i < NUM_LEDS; i++) leds[i] = CHSV(EMPTY_COLOR, 255, EMPTY_BRIGHT); } // если значение выше порога - начинаем самое интересное if (RsoundLevel_f > 15 && LsoundLevel_f > 15) { // расчёт общей средней громкости с обоих каналов, фильтрация. // Фильтр очень медленный, сделано специально для автогромкости averageLevel = (float)(RsoundLevel_f + LsoundLevel_f) / 2 * averK + averageLevel * (1 - averK); // принимаем максимальную громкость шкалы как среднюю, умноженную на некоторый коэффициент MAX_COEF maxLevel = (float)averageLevel * MAX_COEF; // преобразуем сигнал в длину ленты (где MAX_CH это половина количества светодиодов) Rlenght = map(RsoundLevel_f, 0, maxLevel, 0, MAX_CH); Llenght = map(LsoundLevel_f, 0, maxLevel, 0, MAX_CH); // ограничиваем до макс. числа светодиодов Rlenght = constrain(Rlenght, 0, MAX_CH); Llenght = constrain(Llenght, 0, MAX_CH); animation(); // отрисовать } } // 3-5 режим - цветомузыка if (this_mode == 2 || this_mode == 3 || this_mode == 4 || this_mode == 7 || this_mode == 8) { analyzeAudio(); colorMusic[0] = 0; colorMusic[1] = 0; colorMusic[2] = 0; for (int i = 0 ; i < 32 ; i++) { if (fht_log_out[i] < SPEKTR_LOW_PASS) fht_log_out[i] = 0; } // низкие частоты, выборка со 2 по 5 тон (0 и 1 зашумленные!) for (byte i = 2; i < 6; i++) { if (fht_log_out[i] > colorMusic[0]) colorMusic[0] = fht_log_out[i]; } // средние частоты, выборка с 6 по 10 тон for (byte i = 6; i < 11; i++) { if (fht_log_out[i] > colorMusic[1]) colorMusic[1] = fht_log_out[i]; } // высокие частоты, выборка с 11 по 31 тон for (byte i = 11; i < 32; i++) { if (fht_log_out[i] > colorMusic[2]) colorMusic[2] = fht_log_out[i]; } freq_max = 0; for (byte i = 0; i < 30; i++) { if (fht_log_out[i + 2] > freq_max) freq_max = fht_log_out[i + 2]; if (freq_max < 5) freq_max = 5; if (freq_f[i] < fht_log_out[i + 2]) freq_f[i] = fht_log_out[i + 2]; if (freq_f[i] > 0) freq_f[i] -= LIGHT_SMOOTH; else freq_f[i] = 0; } freq_max_f = freq_max * averK + freq_max_f * (1 - averK); for (byte i = 0; i < 3; i++) { colorMusic_aver[i] = colorMusic[i] * averK + colorMusic_aver[i] * (1 - averK); // общая фильтрация colorMusic_f[i] = colorMusic[i] * SMOOTH_FREQ + colorMusic_f[i] * (1 - SMOOTH_FREQ); // локальная if (colorMusic_f[i] > ((float)colorMusic_aver[i] * MAX_COEF_FREQ)) { thisBright[i] = 255; colorMusicFlash[i] = true; running_flag[i] = true; } else colorMusicFlash[i] = false; if (thisBright[i] >= 0) thisBright[i] -= SMOOTH_STEP; if (thisBright[i] < EMPTY_BRIGHT) { thisBright[i] = EMPTY_BRIGHT; running_flag[i] = false; } } animation(); } if (this_mode == 5) { if ((long)millis() - strobe_timer > STROBE_PERIOD) { strobe_timer = millis(); strobeUp_flag = true; strobeDwn_flag = false; } if ((long)millis() - strobe_timer > light_time) { strobeDwn_flag = true; } if (strobeUp_flag) { // если настало время пыхнуть if (strobe_bright < 255) // если яркость не максимальная strobe_bright += STROBE_SMOOTH; // увелчить if (strobe_bright > 255) { // если пробили макс. яркость strobe_bright = 255; // оставить максимум strobeUp_flag = false; // флаг опустить } } if (strobeDwn_flag) { // гаснем if (strobe_bright > 0) // если яркость не минимальная strobe_bright -= STROBE_SMOOTH; // уменьшить if (strobe_bright < 0) { // если пробили мин. яркость strobeDwn_flag = false; strobe_bright = 0; // оставить 0 } } animation(); } if (this_mode == 6) animation(); if (!IRLremote.receiving()) // если на ИК приёмник не приходит сигнал (без этого НЕ РАБОТАЕТ!) FastLED.show(); // отправить значения на ленту if (this_mode != 7) // 7 режиму не нужна очистка!!! FastLED.clear(); // очистить массив пикселей main_timer = millis(); // сбросить таймер } } } void animation() { // согласно режиму switch (this_mode) { case 0: count = 0; for (int i = (MAX_CH - 1); i > ((MAX_CH - 1) - Rlenght); i--) { leds[i] = ColorFromPalette(myPal, (count * index)); // заливка по палитре "" от зелёного к красному"" count++; } count = 0; for (int i = (MAX_CH); i < (MAX_CH + Llenght); i++ ) { leds[i] = ColorFromPalette(myPal, (count * index)); // заливка по палитре "" от зелёного к красному"" count++; } if (EMPTY_BRIGHT > 0) { CHSV this_dark = CHSV(EMPTY_COLOR, 255, EMPTY_BRIGHT); for (int i = ((MAX_CH - 1) - Rlenght); i > 0; i--) leds[i] = this_dark; for (int i = MAX_CH + Llenght; i < NUM_LEDS; i++) leds[i] = this_dark; } break; case 1: if (millis() - rainbow_timer > 30) { rainbow_timer = millis(); hue = floor((float)hue + RAINBOW_STEP); } count = 0; for (int i = (MAX_CH - 1); i > ((MAX_CH - 1) - Rlenght); i--) { leds[i] = ColorFromPalette(RainbowColors_p, (count * index) / 2 - hue); // заливка по палитре радуга count++; } count = 0; for (int i = (MAX_CH); i < (MAX_CH + Llenght); i++ ) { leds[i] = ColorFromPalette(RainbowColors_p, (count * index) / 2 - hue); // заливка по палитре радуга count++; } if (EMPTY_BRIGHT > 0) { CHSV this_dark = CHSV(EMPTY_COLOR, 255, EMPTY_BRIGHT); for (int i = ((MAX_CH - 1) - Rlenght); i > 0; i--) leds[i] = this_dark; for (int i = MAX_CH + Llenght; i < NUM_LEDS; i++) leds[i] = this_dark; } break; case 2: for (int i = 0; i < NUM_LEDS; i++) { if (i < STRIPE) leds[i] = CHSV(HIGH_COLOR, 255, thisBright[2]); else if (i < STRIPE * 2) leds[i] = CHSV(MID_COLOR, 255, thisBright[1]); else if (i < STRIPE * 3) leds[i] = CHSV(LOW_COLOR, 255, thisBright[0]); else if (i < STRIPE * 4) leds[i] = CHSV(MID_COLOR, 255, thisBright[1]); else if (i < STRIPE * 5) leds[i] = CHSV(HIGH_COLOR, 255, thisBright[2]); } break; case 3: for (int i = 0; i < NUM_LEDS; i++) { if (i < NUM_LEDS / 3) leds[i] = CHSV(HIGH_COLOR, 255, thisBright[2]); else if (i < NUM_LEDS * 2 / 3) leds[i] = CHSV(MID_COLOR, 255, thisBright[1]); else if (i < NUM_LEDS) leds[i] = CHSV(LOW_COLOR, 255, thisBright[0]); } break; case 4: switch (freq_strobe_mode) { case 0: if (colorMusicFlash[2]) HIGHS(); else if (colorMusicFlash[1]) MIDS(); else if (colorMusicFlash[0]) LOWS(); else SILENCE(); break; case 1: if (colorMusicFlash[2]) HIGHS(); else SILENCE(); break; case 2: if (colorMusicFlash[1]) MIDS(); else SILENCE(); break; case 3: if (colorMusicFlash[0]) LOWS(); else SILENCE(); break; } break; case 5: if (strobe_bright > 0) for (int i = 0; i < NUM_LEDS; i++) leds[i] = CHSV(STROBE_COLOR, STROBE_SAT, strobe_bright); else for (int i = 0; i < NUM_LEDS; i++) leds[i] = CHSV(EMPTY_COLOR, 255, EMPTY_BRIGHT); break; case 6: switch (light_mode) { case 0: for (int i = 0; i < NUM_LEDS; i++) leds[i] = CHSV(LIGHT_COLOR, LIGHT_SAT, 255); break; case 1: if (millis() - color_timer > COLOR_SPEED) { color_timer = millis(); if (++this_color > 255) this_color = 0; } for (int i = 0; i < NUM_LEDS; i++) leds[i] = CHSV(this_color, LIGHT_SAT, 255); break; case 2: if (millis() - rainbow_timer > 30) { rainbow_timer = millis(); this_color += RAINBOW_PERIOD; if (this_color > 255) this_color = 0; if (this_color < 0) this_color = 255; } rainbow_steps = this_color; for (int i = 0; i < NUM_LEDS; i++) { leds[i] = CHSV((int)floor(rainbow_steps), 255, 255); rainbow_steps += RAINBOW_STEP_2; if (rainbow_steps > 255) rainbow_steps = 0; if (rainbow_steps < 0) rainbow_steps = 255; } break; } break; case 7: switch (freq_strobe_mode) { case 0: if (running_flag[2]) leds[NUM_LEDS / 2] = CHSV(HIGH_COLOR, 255, thisBright[2]); else if (running_flag[1]) leds[NUM_LEDS / 2] = CHSV(MID_COLOR, 255, thisBright[1]); else if (running_flag[0]) leds[NUM_LEDS / 2] = CHSV(LOW_COLOR, 255, thisBright[0]); else leds[NUM_LEDS / 2] = CHSV(EMPTY_COLOR, 255, EMPTY_BRIGHT); break; case 1: if (running_flag[2]) leds[NUM_LEDS / 2] = CHSV(HIGH_COLOR, 255, thisBright[2]); else leds[NUM_LEDS / 2] = CHSV(EMPTY_COLOR, 255, EMPTY_BRIGHT); break; case 2: if (running_flag[1]) leds[NUM_LEDS / 2] = CHSV(MID_COLOR, 255, thisBright[1]); else leds[NUM_LEDS / 2] = CHSV(EMPTY_COLOR, 255, EMPTY_BRIGHT); break; case 3: if (running_flag[0]) leds[NUM_LEDS / 2] = CHSV(LOW_COLOR, 255, thisBright[0]); else leds[NUM_LEDS / 2] = CHSV(EMPTY_COLOR, 255, EMPTY_BRIGHT); break; } leds[(NUM_LEDS / 2) - 1] = leds[NUM_LEDS / 2]; if (millis() - running_timer > RUNNING_SPEED) { running_timer = millis(); for (int i = 0; i < NUM_LEDS / 2 - 1; i++) { leds[i] = leds[i + 1]; leds[NUM_LEDS - i - 1] = leds[i]; } } break; case 8: byte HUEindex = HUE_START; for (int i = 0; i < NUM_LEDS / 2; i++) { byte this_bright = map(freq_f[(int)floor((NUM_LEDS / 2 - i) / freq_to_stripe)], 0, freq_max_f, 0, 255); this_bright = constrain(this_bright, 0, 255); leds[i] = CHSV(HUEindex, 255, this_bright); leds[NUM_LEDS - i - 1] = leds[i]; HUEindex += HUE_STEP; if (HUEindex > 255) HUEindex = 0; } break; } } void HIGHS() { for (int i = 0; i < NUM_LEDS; i++) leds[i] = CHSV(HIGH_COLOR, 255, thisBright[2]); } void MIDS() { for (int i = 0; i < NUM_LEDS; i++) leds[i] = CHSV(MID_COLOR, 255, thisBright[1]); } void LOWS() { for (int i = 0; i < NUM_LEDS; i++) leds[i] = CHSV(LOW_COLOR, 255, thisBright[0]); } void SILENCE() { for (int i = 0; i < NUM_LEDS; i++) leds[i] = CHSV(EMPTY_COLOR, 255, EMPTY_BRIGHT); } // вспомогательная функция, изменяет величину value на шаг incr в пределах minimum.. maximum int smartIncr(int value, int incr_step, int mininmum, int maximum) { int val_buf = value + incr_step; val_buf = constrain(val_buf, mininmum, maximum); return val_buf; } float smartIncrFloat(float value, float incr_step, float mininmum, float maximum) { float val_buf = value + incr_step; val_buf = constrain(val_buf, mininmum, maximum); return val_buf; } #if REMOTE_TYPE != 0 void remoteTick() { if (IRLremote.available()) { auto data = IRLremote.read(); IRdata = data.command; ir_flag = true; } if (ir_flag) { // если данные пришли eeprom_timer = millis(); eeprom_flag = true; switch (IRdata) { // режимы case BUTT_1: this_mode = 0; break; case BUTT_2: this_mode = 1; break; case BUTT_3: this_mode = 2; break; case BUTT_4: this_mode = 3; break; case BUTT_5: this_mode = 4; break; case BUTT_6: this_mode = 5; break; case BUTT_7: this_mode = 6; break; case BUTT_8: this_mode = 7; break; case BUTT_9: this_mode = 8; break; case BUTT_0: fullLowPass(); break; case BUTT_STAR: ONstate = !ONstate; FastLED.clear(); FastLED.show(); updateEEPROM(); break; case BUTT_HASH: switch (this_mode) { case 4: case 7: if (++freq_strobe_mode > 3) freq_strobe_mode = 0; break; case 6: if (++light_mode > 2) light_mode = 0; break; } break; case BUTT_OK: digitalWrite(MLED_PIN, settings_mode ^ MLED_ON); settings_mode = !settings_mode; break; case BUTT_UP: if (settings_mode) { // ВВЕРХ общие настройки EMPTY_BRIGHT = smartIncr(EMPTY_BRIGHT, 5, 0, 255); } else { switch (this_mode) { case 0: break; case 1: RAINBOW_STEP = smartIncrFloat(RAINBOW_STEP, 0.5, 0.5, 20); break; case 2: case 3: case 4: MAX_COEF_FREQ = smartIncrFloat(MAX_COEF_FREQ, 0.1, 0, 5); break; case 5: STROBE_PERIOD = smartIncr(STROBE_PERIOD, 20, 1, 1000); break; case 6: switch (light_mode) { case 0: LIGHT_SAT = smartIncr(LIGHT_SAT, 20, 0, 255); break; case 1: LIGHT_SAT = smartIncr(LIGHT_SAT, 20, 0, 255); break; case 2: RAINBOW_STEP_2 = smartIncrFloat(RAINBOW_STEP_2, 0.5, 0.5, 10); break; } break; case 7: MAX_COEF_FREQ = smartIncrFloat(MAX_COEF_FREQ, 0.1, 0.0, 10); break; case 8: HUE_START = smartIncr(HUE_START, 10, 0, 255); break; } } break; case BUTT_DOWN: if (settings_mode) { // ВНИЗ общие настройки EMPTY_BRIGHT = smartIncr(EMPTY_BRIGHT, -5, 0, 255); } else { switch (this_mode) { case 0: break; case 1: RAINBOW_STEP = smartIncrFloat(RAINBOW_STEP, -0.5, 0.5, 20); break; case 2: case 3: case 4: MAX_COEF_FREQ = smartIncrFloat(MAX_COEF_FREQ, -0.1, 0, 5); break; case 5: STROBE_PERIOD = smartIncr(STROBE_PERIOD, -20, 1, 1000); break; case 6: switch (light_mode) { case 0: LIGHT_SAT = smartIncr(LIGHT_SAT, -20, 0, 255); break; case 1: LIGHT_SAT = smartIncr(LIGHT_SAT, -20, 0, 255); break; case 2: RAINBOW_STEP_2 = smartIncrFloat(RAINBOW_STEP_2, -0.5, 0.5, 10); break; } break; case 7: MAX_COEF_FREQ = smartIncrFloat(MAX_COEF_FREQ, -0.1, 0.0, 10); break; case 8: HUE_START = smartIncr(HUE_START, -10, 0, 255); break; } } break; case BUTT_LEFT: if (settings_mode) { // ВЛЕВО общие настройки BRIGHTNESS = smartIncr(BRIGHTNESS, -20, 0, 255); FastLED.setBrightness(BRIGHTNESS); } else { switch (this_mode) { case 0: case 1: SMOOTH = smartIncrFloat(SMOOTH, -0.05, 0.05, 1); break; case 2: case 3: case 4: SMOOTH_FREQ = smartIncrFloat(SMOOTH_FREQ, -0.05, 0.05, 1); break; case 5: STROBE_SMOOTH = smartIncr(STROBE_SMOOTH, -20, 0, 255); break; case 6: switch (light_mode) { case 0: LIGHT_COLOR = smartIncr(LIGHT_COLOR, -10, 0, 255); break; case 1: COLOR_SPEED = smartIncr(COLOR_SPEED, -10, 0, 255); break; case 2: RAINBOW_PERIOD = smartIncr(RAINBOW_PERIOD, -1, -20, 20); break; } break; case 7: RUNNING_SPEED = smartIncr(RUNNING_SPEED, -10, 1, 255); break; case 8: HUE_STEP = smartIncr(HUE_STEP, -1, 1, 255); break; } } break; case BUTT_RIGHT: if (settings_mode) { // ВПРАВО общие настройки BRIGHTNESS = smartIncr(BRIGHTNESS, 20, 0, 255); FastLED.setBrightness(BRIGHTNESS); } else { switch (this_mode) { case 0: case 1: SMOOTH = smartIncrFloat(SMOOTH, 0.05, 0.05, 1); break; case 2: case 3: case 4: SMOOTH_FREQ = smartIncrFloat(SMOOTH_FREQ, 0.05, 0.05, 1); break; case 5: STROBE_SMOOTH = smartIncr(STROBE_SMOOTH, 20, 0, 255); break; case 6: switch (light_mode) { case 0: LIGHT_COLOR = smartIncr(LIGHT_COLOR, 10, 0, 255); break; case 1: COLOR_SPEED = smartIncr(COLOR_SPEED, 10, 0, 255); break; case 2: RAINBOW_PERIOD = smartIncr(RAINBOW_PERIOD, 1, -20, 20); break; } break; case 7: RUNNING_SPEED = smartIncr(RUNNING_SPEED, 10, 1, 255); break; case 8: HUE_STEP = smartIncr(HUE_STEP, 1, 1, 255); break; } } break; default: eeprom_flag = false; // если не распознали кнопку, не обновляем настройки! break; } ir_flag = false; } } #endif void autoLowPass() { // для режима VU delay(10); // ждём инициализации АЦП int thisMax = 0; // максимум int thisLevel; for (byte i = 0; i < 200; i++) { thisLevel = analogRead(SOUND_R); // делаем 200 измерений if (thisLevel > thisMax) // ищем максимумы thisMax = thisLevel; // запоминаем delay(4); // ждём 4мс } LOW_PASS = thisMax + LOW_PASS_ADD; // нижний порог как максимум тишины + некая величина // для режима спектра thisMax = 0; for (byte i = 0; i < 100; i++) { // делаем 100 измерений analyzeAudio(); // разбить в спектр for (byte j = 2; j < 32; j++) { // первые 2 канала - хлам thisLevel = fht_log_out[j]; if (thisLevel > thisMax) // ищем максимумы thisMax = thisLevel; // запоминаем } delay(4); // ждём 4мс } SPEKTR_LOW_PASS = thisMax + LOW_PASS_FREQ_ADD; // нижний порог как максимум тишины if (EEPROM_LOW_PASS && !AUTO_LOW_PASS) { EEPROM.updateInt(70, LOW_PASS); EEPROM.updateInt(72, SPEKTR_LOW_PASS); } } void analyzeAudio() { for (int i = 0 ; i < FHT_N ; i++) { int sample = analogRead(SOUND_R_FREQ); fht_input[i] = sample; // put real data into bins } fht_window(); // window the data for better frequency response fht_reorder(); // reorder the data before doing the fht fht_run(); // process the data in the fht fht_mag_log(); // take the output of the fht } void buttonTick() { butt1.tick(); // обязательная функция отработки. Должна постоянно опрашиваться if (butt1.isSingle()) // если единичное нажатие if (++this_mode >= MODE_AMOUNT) this_mode = 0; // изменить режим if (butt1.isHolded()) { // кнопка удержана fullLowPass(); } } void fullLowPass() { digitalWrite(MLED_PIN, MLED_ON); // включить светодиод FastLED.setBrightness(0); // погасить ленту FastLED.clear(); // очистить массив пикселей FastLED.show(); // отправить значения на ленту delay(500); // подождать чутка autoLowPass(); // измерить шумы delay(500); // подождать FastLED.setBrightness(BRIGHTNESS); // вернуть яркость digitalWrite(MLED_PIN, !MLED_ON); // выключить светодиод } void updateEEPROM() { EEPROM.updateByte(1, this_mode); EEPROM.updateByte(2, freq_strobe_mode); EEPROM.updateByte(3, light_mode); EEPROM.updateInt(4, RAINBOW_STEP); EEPROM.updateFloat(8, MAX_COEF_FREQ); EEPROM.updateInt(12, STROBE_PERIOD); EEPROM.updateInt(16, LIGHT_SAT); EEPROM.updateFloat(20, RAINBOW_STEP_2); EEPROM.updateInt(24, HUE_START); EEPROM.updateFloat(28, SMOOTH); EEPROM.updateFloat(32, SMOOTH_FREQ); EEPROM.updateInt(36, STROBE_SMOOTH); EEPROM.updateInt(40, LIGHT_COLOR); EEPROM.updateInt(44, COLOR_SPEED); EEPROM.updateInt(48, RAINBOW_PERIOD); EEPROM.updateInt(52, RUNNING_SPEED); EEPROM.updateInt(56, HUE_STEP); EEPROM.updateInt(60, EMPTY_BRIGHT); if (KEEP_STATE) EEPROM.updateByte(64, ONstate); } void readEEPROM() { this_mode = EEPROM.readByte(1); freq_strobe_mode = EEPROM.readByte(2); light_mode = EEPROM.readByte(3); RAINBOW_STEP = EEPROM.readInt(4); MAX_COEF_FREQ = EEPROM.readFloat(8); STROBE_PERIOD = EEPROM.readInt(12); LIGHT_SAT = EEPROM.readInt(16); RAINBOW_STEP_2 = EEPROM.readFloat(20); HUE_START = EEPROM.readInt(24); SMOOTH = EEPROM.readFloat(28); SMOOTH_FREQ = EEPROM.readFloat(32); STROBE_SMOOTH = EEPROM.readInt(36); LIGHT_COLOR = EEPROM.readInt(40); COLOR_SPEED = EEPROM.readInt(44); RAINBOW_PERIOD = EEPROM.readInt(48); RUNNING_SPEED = EEPROM.readInt(52); HUE_STEP = EEPROM.readInt(56); EMPTY_BRIGHT = EEPROM.readInt(60); if (KEEP_STATE) ONstate = EEPROM.readByte(64); } void eepromTick() { if (eeprom_flag) if (millis() - eeprom_timer > 30000) { // 30 секунд после последнего нажатия с пульта eeprom_flag = false; eeprom_timer = millis(); updateEEPROM(); } } ",12420,False,2156.8750765646437,median "#define DEBUG #define DEBUG_VERBOSE // #define DEBUG_SERIAL_WAIT // TODO: publish this #include #include #include #include #include #include #include #include #include #include #include #include #include #include ""FontBS.h"" #include ""config.h"" uint16_t freqBands[numFreqBands]; // keep track of the current levels. this is a sum of multiple frequency bins. // keep track of the max volume for each frequency band (slowly decays) struct frequency { float current_magnitude; float ema_magnitude; // float ema_db_spl; uint8_t averaged_scaled_magnitude; // exponential moving average of current_magnitude divided by overall max_magnitude uint8_t level; // TODO: name this better. its the highest index we are lighting in the visualizer matrix. it shouldn't be on this struct either unsigned long nextChangeMs; // keep track of when we turned a light on so they don't flicker when we change them }; frequency frequencies[numFreqBands] = {0, 0, 0, 0, 0}; float g_highest_current_magnitude = 0; float g_highest_ema_magnitude = 0; float g_highest_max_magnitude = 0; #ifdef OUTPUT_LED_MATRIX // TODO: move this to a seperate file so that we can support multiple led/el light combinations cLEDMatrix visualizer_matrix; cLEDMatrix text_matrix; cLEDText ScrollingMsg; // cLEDMatrix sprite_matrix; // cLEDSprites Sprites(&sprite_matrix); // #define SHAPE_FRAMES 4 // #define SHAPE_WIDTH 6 // #define SHAPE_HEIGHT 6 // const uint8_t ShapeData[] = // { // // frame 0 // B8_1BIT(00110000), // B8_1BIT(01001000), // B8_1BIT(10000100), // B8_1BIT(10100100), // B8_1BIT(01001000), // B8_1BIT(00110000), // // frame 1 // B8_1BIT(00110000), // B8_1BIT(01001000), // B8_1BIT(10100100), // B8_1BIT(10000100), // B8_1BIT(01001000), // B8_1BIT(00110000), // // frame 2 // B8_1BIT(00110000), // B8_1BIT(01001000), // B8_1BIT(10010100), // B8_1BIT(10000100), // B8_1BIT(01001000), // B8_1BIT(00110000), // // frame 3 // B8_1BIT(00110000), // B8_1BIT(01001000), // B8_1BIT(10000100), // B8_1BIT(10010100), // B8_1BIT(01001000), // B8_1BIT(00110000), // }; // struct CRGB ColorTable[1] = { CRGB(64, 128, 255) }; // cSprite Shape(SHAPE_WIDTH, SHAPE_HEIGHT, ShapeData, SHAPE_FRAMES, _1BIT, ColorTable, ShapeData); // the text and sprites and visualizer get combined into this cLEDMatrix leds; #elif LIGHT_TYPE == EL_WIRE_8 // TODO: support multiple el sequencers unsigned char el_output[1] = {0}; // going through the levels loudest to quietest makes it so we can ensure the loudest get turned on ASAP int sortedLevelIndex[numFreqBands]; /* sort the frequencies * * with help from https://phoxis.org/2012/07/12/get-sorted-index-orderting-of-an-array/ * there is probably a better way to do this */ static int compare_levels(const void *a, const void *b) { int aa = *((int *)a), bb = *((int *)b); return frequencies[bb].averaged_scaled_magnitude - frequencies[aa].averaged_scaled_magnitude; } #else #error WIP #endif AudioInputI2S i2s1; // xy=139,91 AudioOutputI2S i2s2; // xy=392,32 AudioAnalyzeFFT1024 fft1024; AudioConnection patchCord1(i2s1, 0, i2s2, 0); AudioConnection patchCord2(i2s1, 0, fft1024, 0); AudioControlSGTL5000 audioShield; // xy=366,225 // make a ResponsiveAnalogRead object, pass in the pin, and either true or false depending on if you want sleep enabled // enabling sleep will cause values to take less time to stop changing and potentially stop changing more abruptly, // where as disabling sleep will cause values to ease into their correct position smoothly and with slightly greater accuracy ResponsiveAnalogRead volume_knob(VOLUME_KNOB, false); // TODO: only do this if there is a define saying to // up to 12 touches all detected from one breakout board // You can have up to 4 on one i2c bus Adafruit_MPR121 cap = Adafruit_MPR121(); bool g_touch_available = false; uint16_t g_current_touch = 0; uint16_t g_last_touch = 0; uint16_t g_changed_touch = 0; enum flashlight_state { off, on, }; flashlight_state g_flashlight_state = off; // used to keep track of framerate // TODO: remove this if debug mode is disabled unsigned long draw_micros = 0; unsigned long last_update_micros = 0; // unsigned long lastDraw = 0; // TODO: only do this if we are using FastLED uint8_t g_brightness = 0, g_brightness_visualizer = 0, g_brightness_flashlight = 0; bool g_dither = true; // in order for dithering to work, we need to be able to FastLED.draw multiple times within a single frame bool g_dither_works_with_framerate = true; float FindE(uint16_t bands, uint16_t minBin, uint16_t maxBin) { // https://forum.pjrc.com/threads/32677-Is-there-a-logarithmic-function-for-FFT-bin-selection-for-any-given-of-bands?p=133842&viewfull=1#post133842 float increment = 0.1, eTest, n; uint16_t b, count, d; for (eTest = 1; eTest < maxBin; eTest += increment) { // Find E through brute force calculations count = minBin; for (b = 0; b < bands; b++) { // Calculate full log values n = pow(eTest, b); d = n + 0.5; // round up count += d; } if (count > maxBin) { // We calculated over our last bin eTest -= increment; // Revert back to previous calculation increment increment /= 10.0; // Get a finer detailed calculation & increment a decimal point lower if (increment < 0.0000001) { // Ran out of calculations. Return previous E. Last bin will be lower than (bins-1) return (eTest - increment); } } else if (count == maxBin) { // We found the correct E return eTest; // Return calculated E } } return 0; // Return error 0 } void setupFFTBins() { // https://forum.pjrc.com/threads/32677-Is-there-a-logarithmic-function-for-FFT-bin-selection-for-any-given-of-bands?p=133842&viewfull=1#post133842 // TODO: time this function. i might want to call it while the program is running to tune to whatever was recently heard float e, n; uint16_t count = minBin, d; e = FindE(numFreqBands, minBin, maxBin); // Find calculated E value // TODO: find multiple values for different minBin and maxBins. Then if we detect that there is no bass or no highs, we can spread our limited colors over just the activate frequences if (e) { // If a value was returned continue Serial.printf(""E = %4.4f\\n"", e); // Print calculated E value Serial.printf("" i low Hz high Hz\\n""); for (uint16_t b = 0; b < numFreqBands; b++) { // Test and print the bins from the calculated E n = pow(e, b); d = n + 0.5; Serial.printf(""%3d "", b); Serial.printf(""%4d "", count); // Print low bin Serial.printf(""%5d "", count * FREQUENCY_RESOLUTION_HZ); // Print low bin Hz freqBands[b] = count; // Save the low bin to a global count += d - 1; Serial.printf(""%4d "", count); // Print high bin Serial.printf(""%5d\\n"", (count + 1) * FREQUENCY_RESOLUTION_HZ); // Print high bin Hz count++; } } else { Serial.println(""Error calculating E""); // Error, something happened while (1) ; } } void setupSD() { // slave select pin for SPI pinMode(SDCARD_CS_PIN, OUTPUT); // read values from the SD card using IniFile } #ifdef OUTPUT_LED_MATRIX void colorPattern(CRGB::HTMLColorCode color) { // TODO: sin wave for (uint8_t x = 0; x < numLEDsX; x++) { uint8_t y = x % numLEDsY; leds(x, y) = color; } } #endif void setupLights() { #ifdef OUTPUT_LED_MATRIX // TODO: clock select pin for FastLED to OUTPUT like we do for the SDCARD? // do NOT turn off the built-in LED. it is tied to the audio board! #if LIGHT_TYPE == DOTSTAR_MATRIX_64x8 Serial.println(""Setting up dotstar 64x8 matrix...""); // with pins 0/1 and 1500kHz data rate, this drew a single frame in ~8ms. faster rates crashed or flickered when the battery was low // with pins 14/7 and 4000kHz data rate, this drew a single frame in ~4ms. faster rates caused flickerin FastLED.addLeds(leds[0], leds.Size()).setCorrection(TypicalSMD5050); #elif LIGHT_TYPE == NEOPIXEL_MATRIX_2x_32x8 Serial.println(""Setting up neopixel 2x 32x8 matrix...""); // neopixels have a fixed data rate of 800kHz // serial output takes ~16.8ms // int half_size = leds.Size() / 2; // FastLED.addLeds(leds[0], half_size).setCorrection(TypicalSMD5050); // FastLED.addLeds(leds[half_size], half_size).setCorrection(TypicalSMD5050); // parallel output takes ~8.4ms // WS2811_PORTD: 2,14,7,8,6,20,21,5 // WS2811_PORTC: 15,22,23,9,10,13,11,12,28,27,29,30 (these last 4 are pads on the bottom of the teensy) // WS2811_PORTDC: 2,14,7,8,6,20,21,5,15,22,23,9,10,13,11,12 - 16 way parallel FastLED.addLeds(leds[0], leds.Size() / 2); #else #error ""unsupported LIGHT_TYPE"" #endif // TODO: what should this be set to? the flexible panels are much larger // led matrix max is 15 amps, but because its flexible, best to keep it max of 5 amps. then we have 2 boards, so multiply by 2 // the on/off switch only does 2 amps (and 2 amps is really bright) FastLED.setMaxPowerInVoltsAndMilliamps(3.7, 2000); // FastLED.setMaxPowerInVoltsAndMilliamps(5.0, 120); // when running through teensy's usb port, the max draw is much lower than with a battery // we use the volume knob to set the default brightness // sometimes the first read is 0, so give it multiple tries to wake up setBrightnessFromVolumeKnob(); delay(100); setBrightnessFromVolumeKnob(); delay(100); setBrightnessFromVolumeKnob(); // TODO: default to brighter? (still max at 255 though) g_brightness_flashlight = g_brightness; FastLED.clear(true); // show red, green, blue, so that we make sure the lights are configured correctly Serial.println(""Showing red...""); colorPattern(CRGB::Red); // time FastLED.show so we can calculate maximum frame rate draw_micros = micros(); FastLED.show(); draw_micros = micros() - draw_micros; Serial.print(""Draw time for show: ""); Serial.print(draw_micros); Serial.println("" us""); // TODO: calculate num_dither_shows based on brightness and visualizer_color_value // TODO: bring this back once we have ms_per_frame for sprite/text animations // TODO: maybe have a ""min_ms_per_frame"" for checking dither until then? 2x256 parallel neopixels with dithering run loop in 23ms // float ms_per_frame_needed_for_dither = draw_micros * num_dither_shows / 1000.0; // g_dither_works_with_framerate = (ms_per_frame_needed_for_dither <= ms_per_frame); // if (g_dither_works_with_framerate) { // Serial.println(""Dither works with framerate.""); // } else { // Serial.print(""Dither does NOT work with framerate! Need ""); // Serial.print(ms_per_frame_needed_for_dither - ms_per_frame); // Serial.println("" more ms""); // g_dither = false; // FastLED.setDither(g_dither); // } #ifdef DEBUG // now delay for more time to make sure that fastled can power this many lights and update with this bandwidth FastLED.delay(1500 - draw_micros / 1000); Serial.println(""Showing green...""); colorPattern(CRGB::Green); FastLED.delay(1500); Serial.println(""Showing blue...""); colorPattern(CRGB::Blue); FastLED.delay(1500); #endif FastLED.clear(true); FastLED.show(); #elif LIGHT_TYPE == EL_WIRE_8 // https://www.pjrc.com/teensy/td_uart.html Serial1.begin(9600); // RX=0 (yellow), TX=1 (green) // TODO: if we want more Serial outputs, they will have to be bit-banged. Audio shield uses the pins we need for Serial2 and Serial3 Serial.print(""Waiting for Serial1... ""); while (!Serial1) { ; // wait for serial port to connect } Serial.println(""DONE""); #endif } void setupAudio() { // Audio requires memory to work. I haven't seen this go over 11 AudioMemory(12); // Enable the audio shield and set the output volume. audioShield.enable(); audioShield.muteHeadphone(); // to avoid any clicks audioShield.inputSelect(AUDIO_INPUT_MIC); audioShield.volume(0.5); audioShield.micGain(63); // was 63, then 40 // 0-63 // TODO: tune this // audioShield.audioPreProcessorEnable(); // todo: pre or post? // bass, mid_bass, midrange, mid_treble, treble // TODO: tune this. maybe read from SD card // audioShield.eqSelect(GRAPHIC_EQUALIZER); // audioShield.eqBands(-0.80, -0.75, -0.50, 0.50, 0.80); // the great northern // audioShield.eqBands(-0.5, -.2, 0, .2, .5); // todo: tune this // audioShield.eqBands(-0.80, -0.10, 0, 0.10, 0.33); // todo: tune this //audioShield.eqBands(0.0, 0.0, 0.0, 0.1, 0.33); // todo: tune this // audioShield.eqBands(0.5, 0.5, 0.0, 0.0, 0.0); // todo: tune this audioShield.unmuteHeadphone(); // for debugging #if LIGHT_TYPE == EL_WIRE_8 // setup array for sorting for (int i = 0; i < numFreqBands; i++) { sortedLevelIndex[i] = i; } #endif } void setupRandom() { // randomSeed takes unsigned long, but analogRead only gives an int unsigned long seed = 0; // TODO: how many times? we aren't using this for crypto, so once was probably fine // someone said analogReady only gives 1-2 bits of entropy // another person said we should only care about the lowest byte for (int i = 0; i < 256; i++) { unsigned long seed_temp = 0; for (int i = 0; i < __SIZEOF_LONG__ / __SIZEOF_INT__; i++) { seed_temp |= analogRead(FLOATING_PIN)<<(i * __SIZEOF_INT__ * 8); } seed ^= seed_temp; } // use arduino's random to seed fastled's random // FastLED's random is ""significantly faster than Arduino random(), but also somewhat less random"" randomSeed(seed); random16_add_entropy(random(UINT32_MAX)); #ifdef DEBUG Serial.print(""Random: ""); Serial.println(random(100)); Serial.print(""Random: ""); Serial.println(random(100)); Serial.print(""Random: ""); Serial.println(random(100)); Serial.print(""Random: ""); Serial.println(random(100)); Serial.print(""Random8: ""); Serial.println(random8(100)); Serial.print(""Random8: ""); Serial.println(random8(100)); Serial.print(""Random8: ""); Serial.println(random8(100)); Serial.print(""Random8: ""); Serial.println(random8(100)); #endif } #ifdef INPUT_TOUCH void setupTouch() { pinMode(MPR121_IRQ, INPUT); g_touch_available = cap.begin(MPR121_ADDRESS); if (g_touch_available) { Serial.println(""MPR121 found.""); // cap.setThresholds(12, 6); // this is the default cap.setThresholds(48, 24); } else { Serial.println(""MPR121 not found!""); // TODO: print text on the LED matrix? } } #endif #ifdef OUTPUT_LED_MATRIX void setupMatrixText() { ScrollingMsg.SetFont(BSFontData); ScrollingMsg.Init(&text_matrix, text_matrix.Width(), ScrollingMsg.FontHeight() + 1, 0, 1); ScrollingMsg.SetScrollDirection(SCROLL_LEFT); setText(debug); } ScrollingText nextCheer() { static ScrollingText next_cheer = (ScrollingText)(random8(CHEER + 1, CHEER_END - 1)); ScrollingText result = next_cheer; next_cheer = (ScrollingText)(next_cheer + 1); if (next_cheer >= CHEER_END) { // TODO: randomize the order every loop. maybe shuffle 4 ""decks"" of words together so they can sometimes double up next_cheer = (ScrollingText)(CHEER + 1); } return result; } void setText(ScrollingText text) { if (text == CHEER || text == CHEER_END) { text = nextCheer(); } // TODO: make this optional? fill_solid(text_matrix[0], text_matrix.Size(), CRGB::Black); g_scrolling_text = text; unsigned char *text_chars; unsigned long text_len; // i miss rust's match statement if (text == none) { text_chars = (unsigned char *)text_woo1; text_len = 0; } else if (text == debug) { text_chars = (unsigned char *)text_debug; text_len = sizeof(text_debug); } else if (text == flashlight) { text_chars = (unsigned char *)text_flashlight; text_len = sizeof(text_flashlight) - 1; } else if (text == woo1) { text_chars = (unsigned char *)text_woo1; text_len = sizeof(text_woo1) - 1; } else if (text == woo2) { text_chars = (unsigned char *)text_woo2; text_len = sizeof(text_woo2) - 1; } else if (text == party) { text_chars = (unsigned char *)text_party; text_len = sizeof(text_party) - 1; } else if (text == dance) { text_chars = (unsigned char *)text_dance; text_len = sizeof(text_dance) - 1; } else if (text == gambino) { text_chars = (unsigned char *)text_gambino; text_len = sizeof(text_gambino) - 1; } else { Serial.print(""ERROR! Missed handling a ScrollingText enum ""); Serial.println(text); return; } ScrollingMsg.SetText(text_chars, text_len); } // void setupSprites() { // // sprites run at 60fps // Shape.SetPositionFrameMotionOptions( // 0/*X*/, // 0/*Y*/, // 0/*Frame*/, // 8/*FrameRate*/, // +1/*XChange*/, // 8/*XRate*/, // +1/*YChange*/, // 16/*YRate*/, // SPRITE_DETECT_EDGE | SPRITE_X_KEEPIN | SPRITE_Y_KEEPIN // ); // Sprites.AddSprite(&Shape); // } #endif void setup() { debug_serial(115200, 2000); Serial.println(""Setting up...""); // setup SPI for the Audio board (which has an SD card reader) SPI.setMOSI(SPI_MOSI_PIN); SPI.setSCK(SPI_SCK_PIN); SPI.begin(); setupSD(); // right now, once we setup an LED matrix, we can't use the SD card anymore // TODO: add a CS pin for the lights setupLights(); #ifdef INPUT_TOUCH setupTouch(); #endif setupAudio(); setupFFTBins(); // setupMatrixLevels(); setupRandom(); #ifdef OUTPUT_LED_MATRIX setupMatrixText(); // setupSprites(); #endif Serial.println(""Starting...""); } // we could/should pass fft and level as args void updateLevelsFromFFT() { // https://forum.pjrc.com/threads/32677-Is-there-a-logarithmic-function-for-FFT-bin-selection-for-any-given-of-bands // read the FFT frequencies into numOutputs levels // music is heard in octaves, but the FFT data // is linear, so for the higher octaves, read // many FFT bins together. float highest = 0; for (uint16_t i = 0; i < numFreqBands; i++) { if (i < numFreqBands - 1) { frequencies[i].current_magnitude = fft1024.read(freqBands[i], freqBands[i + 1] - 1); } else { // the last level always goes to maxBin frequencies[i].current_magnitude = fft1024.read(freqBands[numFreqBands - 1], maxBin); } highest = max(highest, frequencies[i].current_magnitude); } g_highest_current_magnitude = highest; } void updateFrequencies() { // read FFT frequency data into a bunch of levels. assign each level a color and a brightness updateLevelsFromFFT(); // exponential moving average float up_alpha = 0.98; // if going up, give the new measure a heavy weight float down_alpha = 0.98; // TODO: if going down... float alphaScale = 1.0; float highest_ema_magnitude = 0; for (uint16_t i = 0; i < numFreqBands; i++) { // TODO: don't scale linearly. sounds have to have a lot more energy in order to sound twice as loud // TODO: instead of scaling to an overall max. scale to some average of the overall and this frequency's max float current_reading = frequencies[i].current_magnitude; // cut off the bottom // TODO: learn more about decibles and phons. do something fancier // scaled_reading = map(scaled_reading, 0.0, 1.0, -0.3, 1.0); float last_reading = frequencies[i].ema_magnitude; if (current_reading < last_reading) { frequencies[i].ema_magnitude = (down_alpha * current_reading + (alphaScale - down_alpha) * last_reading) / alphaScale; } else { frequencies[i].ema_magnitude = (up_alpha * current_reading + (alphaScale - up_alpha) * last_reading) / alphaScale; } // TODO: is this right? the pjrc forum that I got this function from had a comment about using 94 for db spl, but it doesn't feel right to me // frequencies[i].ema_db_spl = db(frequencies[i].ema_magnitude, 94); // TODO: convert db_spl to phon or some other curve to match human hearing highest_ema_magnitude = max(highest_ema_magnitude, frequencies[i].ema_magnitude); } g_highest_ema_magnitude = highest_ema_magnitude; // g_highest_max_magnitude = max(previous frame's g_highest_max_magnitude * decayMax, g_highest_ema_magnitude, minMaxLevel) // g_highest_max_magnitude = max(g_highest_max_magnitude, g_highest_current_magnitude); // skip this! on loud sounds, it is always >ema which means we never get 1.0 for avg_scaled_magnitude g_highest_max_magnitude = max(g_highest_max_magnitude * decayMax, g_highest_ema_magnitude); g_highest_max_magnitude = max(g_highest_max_magnitude, minMaxLevel); float activate_threshold = g_highest_max_magnitude * activate_difference; for (uint16_t i = 0; i < numFreqBands; i++) { if (frequencies[i].ema_magnitude >= activate_threshold) { // TODO: include log here somehow. maybe convert to decibel spl? // frequencies[i].averaged_scaled_magnitude = 10 * log10f(frequencies[i].ema_magnitude / g_highest_max_magnitude); frequencies[i].averaged_scaled_magnitude = constrain(frequencies[i].ema_magnitude / g_highest_max_magnitude, 0.0f, 1.0f) * 255; } else { frequencies[i].averaged_scaled_magnitude = 0; } } } // TODO: args instead of globals void mapFrequenciesToOutputBuffer() { #ifdef OUTPUT_LED_MATRIX // shift increments every current_ms_per_shift milliseconds and is used to slowly modify the pattern static uint16_t shift = 0; static uint8_t ms_per_shift_index = 0; static uint16_t current_ms_per_shift = ms_per_shift[ms_per_shift_index]; static unsigned long next_shift_at_ms = 0; // cycle between shifting up and shifting down static bool reverse_rotation = true; // static unsigned long next_change_ms_per_shift = 0; // cycle between lights coming from the top and the bottom static bool should_flip_y[visualizerNumLEDsX] = {false}; static uint16_t map_visualizer_y[visualizerNumLEDsY] = {0}; static bool flip_y = false; static bool new_pattern = true; static uint8_t last_frame_height[visualizerNumLEDsX] = {0}; static uint8_t lowestIndexToLight = 1; // 0 is the border static uint8_t lowestIndexToLightWhite = 4;// visualizerNumLEDsY - 1; // OPTION 1: cycle frames_per_shift every X seconds // TODO: every X seconds change the frames_per_shift // if (millis() >= next_change_frames_per_shift) { // frames_per_shift_index++; // // TODO: we have 3, but slow is boring // if (frames_per_shift_index >= 2) { // frames_per_shift_index = 0; // } // // TODO: different lengths for different modes // // TODO: have a struct for this // next_change_frames_per_shift = millis() + 3000; // } // // TODO: do an interesting curve on current_frames_per_shift to head towards frames_per_shift[frames_per_shift_index]. ema might work for now // current_frames_per_shift = frames_per_shift[frames_per_shift_index]; // OPTION 2: oscillate frames_per_shift between a slow and a fast speed // static uint16_t loud_frame_counter = 0; // bool increment_loud_frame_counter = false; // current_frames_per_shift = map(cubicwave8(loud_frame_counter), 0, 255, frames_per_shift[0], frames_per_shift[2]); // Serial.print(""frames_per_shift: ""); // Serial.println(current_frames_per_shift); // OPTION 3: if loud_frame_counter was incremented multiple times in one frame, have a chance to rotate once at high speed instead of changing direction // TODO: if we are going too fast for too long, slow down if (new_pattern) { // TODO: more patterns. maybe one where it grows from the middle. or goes from the top and the bottom // flip the bottom and the top for (uint8_t y = 0; y < visualizerNumLEDsY; y++) { map_visualizer_y[y] = 7 - y; } new_pattern = false; } CRGB visualizer_white = CRGB(CHSV(0, 0, visualizer_white_value)); for (uint8_t x = 0; x < visualizerNumLEDsX; x++) { // we take the absolute value because shift might negative uint8_t shifted_x = abs((x + shift) % visualizerNumLEDsX); uint8_t visualizer_hue = map(x, 0, visualizerNumLEDsX - 1, 0, 255); // TODO: color palettes instead of simple rainbow hue // TODO: variable brightness? variable saturation? CHSV visualizer_color = CHSV(visualizer_hue, 255, visualizer_color_value); uint8_t i = visualizerXtoFrequencyId[x]; // draw a border visualizer_matrix(shifted_x, 0) = visualizer_color; if (g_flashlight_state == flashlight_state::on && shifted_x % 2 == 1) { // visualizer_matrix(shifted_x, 0) = visualizer_white; visualizer_matrix(shifted_x, visualizerNumLEDsY - 1) = visualizer_white; } else { visualizer_matrix(shifted_x, visualizerNumLEDsY - 1) = visualizer_color; } // if this column is on or should be turned on if (i < numFreqBands && (frequencies[i].level > 1 || frequencies[i].averaged_scaled_magnitude > 0)) { // use the averaged_scaled_magnitude to calculate the height for this color // TODO: this should be an exponential scale. i think we can use findE() uint8_t highestIndexToLight = map(frequencies[i].averaged_scaled_magnitude, UINT8_MIN, UINT8_MAX, 0, visualizerNumLEDsY - 1); // TODO: these should be on a different struct dedicated to the matrix if (highestIndexToLight != frequencies[i].level) { bool level_changed = true; if (highestIndexToLight > frequencies[i].level) { // if the bar is growing... if (millis() < frequencies[i].nextChangeMs) { // nevermind! we need to wait longer before changing this in order to reduce flicker highestIndexToLight = frequencies[i].level; level_changed = false; } } else { // if the bar is shrinking, limit to shrinking 1 level per X ms... if (millis() < frequencies[i].nextChangeMs) { // nevermind! we need to wait longer before changing this in order to reduce flicker highestIndexToLight = frequencies[i].level; level_changed = false; } else { highestIndexToLight = frequencies[i].level - 1; } } if (level_changed) { frequencies[i].level = highestIndexToLight; // the level has changed! set timer to prevent flicker // TODO: two timers so that lights can turn off slower than they turn on? frequencies[i].nextChangeMs = millis() + minOnMs; } } for (uint8_t y = lowestIndexToLight; y <= visualizerNumLEDsY - 1; y++) { uint8_t shifted_y = y; if (should_flip_y[x]) { shifted_y = map_visualizer_y[shifted_y]; } if (y < highestIndexToLight) { // simple color bar visualizer_matrix(shifted_x, shifted_y) = visualizer_color; } else if (y == highestIndexToLight) { if (y < lowestIndexToLightWhite) { // very short bars shouldn't have any white at the top visualizer_matrix(shifted_x, shifted_y) = visualizer_color; last_frame_height[x] = 0; } else { // taller bars should have white at the top // but only if they are the same height or taller than they were on the previous frame. this way shrinking bars are topped by colors if (highestIndexToLight >= last_frame_height[x]) { visualizer_matrix(shifted_x, shifted_y) = visualizer_white; last_frame_height[x] = highestIndexToLight; } else { visualizer_matrix(shifted_x, shifted_y) = visualizer_color; // todo: this is probably wrong last_frame_height[x] = highestIndexToLight + 1; } } if (highestIndexToLight >= visualizerNumLEDsY - 1) { // loud_frame_counter++; // increment_loud_frame_counter = true; uint8_t r = random8(100); // TODO: this doesn't work as well with the bars being two wide. need configurable if (r < 34) { EVERY_N_SECONDS(3) { // TODO: instead of a hard rotate, cycle speeds reverse_rotation = !reverse_rotation; // TODO: enum instead of bool? next_shift_at_ms = millis() + current_ms_per_shift; } } else if (r < 67) { // TODO: maybe instead of EVERY_N_SECONDS, have a timer for each x? EVERY_N_SECONDS(6) { // if we hit the top, light both ends white and flip this for the next time visualizer_matrix(shifted_x, 0) = visualizer_white; flip_y = should_flip_y[x] = !should_flip_y[x]; } } else { // do nothing } } } else if (y < visualizerNumLEDsY - 1) { // fill the rest in black (except the border) // TODO: not sure if this should fade or go direct to black. we already have fading on the visualizer // visualizer_matrix(x, y).fadeToBlackBy(fade_factor * 2); visualizer_matrix(shifted_x, shifted_y) = CRGB::Black; } } } else { // the visualizer (but not the border!) should be off if (i < numFreqBands) { if (millis() < frequencies[i].nextChangeMs) { // nevermind! we need to wait longer to reduce flicker // TODO: we might not need this continue; } frequencies[i].level = 0; } for (uint8_t y = lowestIndexToLight; y < numLEDsY - 1; y++) { // visualizer_matrix(x, y).fadeToBlackBy(fade_factor); // TODO: fading looks bad since they all fade at even rate and we want the top light to turn off first visualizer_matrix(shifted_x, y) = CRGB::Black; } // follow the loudest sound // TODO: do this in a seperate loop so that flip_y is the same for all entries? should_flip_y[x] = flip_y; } } // if (increment_loud_frame_counter) { // loud_frame_counter++; // } if (millis() >= next_shift_at_ms) { // DEBUG_PRINT(""SHIFTED! now: ""); // DEBUG_PRINT(millis()); // DEBUG_PRINT("" ms; goal: ""); // DEBUG_PRINT(next_shift_at_ms); // DEBUG_PRINT("" ms; diff: ""); // DEBUG_PRINT(millis() - next_shift_at_ms); // DEBUG_PRINT("" ms; next in: ""); // DEBUG_PRINTLN(current_ms_per_shift); next_shift_at_ms = millis() + current_ms_per_shift; if (reverse_rotation) { shift--; } else { shift++; } } // TODO: debug timer? #elif LIGHT_TYPE == EL_WIRE_8 // TODO: better support multiple sequencers // TODO: have 2 or 3 wires per frequency and turn more/less of them on // TODO: bring this back once it works // static uint8_t numOn = 0; for (int i = 0; i < numFreqBands; i++) { if (millis() < frequencies[i].nextChangeMs) { // this light hasn't shown its current state for long enough. skip for now continue; } bool should_be_on = frequencies[i].averaged_scaled_magnitude > 0; // TODO: better support multiple outputs. don't hard code 8 here since the el sequencer could have a different number of wires size_t output_sequencer = i / 8; size_t output_bit = i % 8; if (bitRead(el_output[output_sequencer], output_bit) != should_be_on) { // the wire's on/off state has changed! set timer to prevent flicker // TODO: two timers so that lights can turn off slower than they turn on? frequencies[i].nextChangeMs = millis() + minOnMs; if (should_be_on) { bitSet(el_output[output_sequencer], output_bit); } else { bitClear(el_output[output_sequencer], output_bit); } } } #endif } #ifdef INPUT_TOUCH bool setThingsFromTouch() { bool brightness_changed = false; // TODO: zfill DEBUG_PRINT(""changed touch: ""); DEBUG_PRINTLN2(g_changed_touch, BIN); DEBUG_PRINT(""current touch: ""); DEBUG_PRINTLN2(g_current_touch, BIN); if (g_changed_touch & _BV(brim_right) && g_current_touch & _BV(brim_right)) { // TODO: require another input to be held? // tap brim_left to increase brightness // TODO: this is too slow. allow holding to continue decreasing if (g_brightness < max_brightness) { brightness_changed = true; g_brightness++; DEBUG_PRINT(""Brightness increased to ""); DEBUG_PRINTLN(g_brightness); FastLED.setBrightness(g_brightness); } else { DEBUG_PRINTLN(""Brightness @ max""); } } else if (g_changed_touch & _BV(brim_left) && g_current_touch & _BV(brim_left)) { // TODO: require another input to be held? // tap brim_right to decrease brightness // TODO: this is too slow. allow holding to continue decreasing if (g_brightness > min_brightness) { brightness_changed = true; g_brightness--; DEBUG_PRINT(""Brightness decreased to ""); DEBUG_PRINTLN(g_brightness); FastLED.setBrightness(g_brightness); } else { DEBUG_PRINTLN(""Brightness @ min""); } } else if (g_changed_touch & _BV(brim_front) && g_current_touch & _BV(brim_front)) { // tap brim_front to toggle flashlight // TODO: make it so we have to hold it down for a moment if (g_scrolling_text == flashlight) { // the button was pressed while we were already scrolling ""flashlight"". cancel the currently scrolling text DEBUG_PRINTLN(""Stopping flashlight text""); setText(none); } else { // start scrolling ""flashlight"" // the flashlight will toggle once the message is done scrolling DEBUG_PRINTLN(""Starting flashlight text""); setText(flashlight); } } else if (g_changed_touch & _BV(top) && g_current_touch & _BV(top)) { if (g_scrolling_text == none) { DEBUG_PRINTLN(""Starting a cheer because the top was touched""); setText(CHEER); } else { DEBUG_PRINT(""Skipping cheer while other text is scrolling ""); DEBUG_PRINTLN(g_scrolling_text); } } else { if (g_current_touch != 0) { DEBUG_PRINTLN(""unimplemented touches detected""); } } if (brightness_changed) { // save different brightness for flashlight and visualizer if (g_flashlight_state == on) { g_brightness_flashlight = g_brightness; } else { g_brightness_visualizer = g_brightness; } } // TODO: check touch for button to trigger scrolling text // if (g_scrolling_text == none) { // } return brightness_changed; } #endif #ifdef OUTPUT_LED bool setBrightnessFromVolumeKnob() { bool brightness_changed = false; EVERY_N_MILLIS(100) { volume_knob.update(); } if (volume_knob.hasChanged() || g_brightness == 0) { int knob_value = volume_knob.getValue(); // TODO: we used to set uint8_t brightness = map(knob_value, 0, 1023, min_brightness, max_brightness); if (brightness != g_brightness) { brightness_changed = true; DEBUG_PRINT(""volume knob changed: ""); DEBUG_PRINT(knob_value); DEBUG_PRINT(""; new brightness: ""); DEBUG_PRINTLN(brightness); // TODO: only call this if we are actually changing // split brightness doesn't work with the knob g_brightness = brightness; FastLED.setBrightness(g_brightness); if (g_dither_works_with_framerate) { bool dither = (brightness >= dither_brightness_cutoff); if (dither != g_dither) { g_dither = dither; FastLED.setDither(g_dither); } } } } return brightness_changed; } #endif #ifdef OUTPUT_LED_MATRIX void combineMatrixes() { // TODO: what should we do here? how should we overlay/interleave the different matrixes into one? static CHSV visualizer_white = CHSV(0, 0, visualizer_white_value); static CRGB black = CRGB::Black; // update the value in case it changed visualizer_white.value = visualizer_white_value; // TODO: this could probably be a lot more efficient for (uint16_t x = 0; x < numLEDsX; x++) { uint16_t vis_x = x % visualizerNumLEDsX; for (uint16_t y = 0; y < numLEDsY; y++) { // if visualizer is white, display it // else if text, display it // else if sprite, display it // else display the visualizer // TODO: how are masks vs off going to be detected? // TODO: text_matrix OR sprite_matrix if (y < visualizerNumLEDsY && visualizer_matrix(vis_x, y) == visualizer_white) { leds(x, y) = visualizer_white; } else if (g_scrolling_text != none && text_matrix(numLEDsX - 1 - x, y) != black) { // TODO: mask? // why is this backwards, but the other matrixes aren't? leds(x, y) = text_matrix(numLEDsX - 1 - x, y); // } else if (g_text_complete && sprite_matrix(numLEDsX - x, y) != black) { // leds(x, y) = sprite_matrix(numLEDsX - x, y); } else if (y < visualizerNumLEDsY) { leds(x, y) = visualizer_matrix(vis_x, y); } else { leds(x, y) = CRGB::Black; } } } // TODO: return false if nothing changed? we can skip drawing then } #endif void loop() { static bool new_frame = false; #ifdef INPUT_TOUCH if (g_touch_available) { // if IRQ is low, there is new touch data to read if (digitalRead(MPR121_IRQ) == LOW) { g_current_touch = cap.touched(); g_changed_touch = g_current_touch ^ g_last_touch; if (setThingsFromTouch()) { // we can wait for a next audio frame // new_frame = true; }; g_last_touch = g_current_touch; } } else { #ifdef OUTPUT_LED if (setBrightnessFromVolumeKnob()) { // this floats a little and causes draws when we don't really care // we can wait for a next audio frame // new_frame = true; } #endif } #endif if (fft1024.available()) { updateFrequencies(); mapFrequenciesToOutputBuffer(); new_frame = true; } #ifdef OUTPUT_LED_MATRIX if (g_scrolling_text != none) { EVERY_N_MILLIS(90) { // draw text int scrolling_ret = ScrollingMsg.UpdateText(); // DEBUG_PRINT(""Scrolling ret: ""); // DEBUG_PRINTLN(scrolling_ret); if (scrolling_ret == -1) { // when UpdateText returns -1, there is no more text to display and text_matrix is empty DEBUG_PRINT(""Scrolling text #""); DEBUG_PRINT(g_scrolling_text); DEBUG_PRINTLN("" complete""); g_scrolling_text = none; } else { // UpdateText drew a new frame new_frame = true; if (scrolling_ret == 1) { // when UpdateText returns 1, ""FLASHLIGHT"" text and a delay is done being displayed // toggle flashlight mode if (g_flashlight_state == on) { g_flashlight_state = off; if (g_brightness_visualizer) { g_brightness = g_brightness_visualizer; } // TODO: remove a spinning white light sprite in the front } else { g_flashlight_state = on; if (g_brightness_flashlight) { g_brightness = g_brightness_flashlight; } // TODO: add a spinning white light sprite in the front } } } } } else { // TODO: how often? EVERY_N_SECONDS(300) { // scroll text again // TODO: cycle between different text // TODO: instead of every_n_seconds, tie to touch sensor and to a bunch of visualizer columns hitting the top in a single frame setText(CHEER); ScrollingMsg.UpdateText(); new_frame = true; } } // TODO: draw sprites if not drawing text // if (g_text_complete) { // EVERY_N_MILLIS(1000/60) { // fill_solid(sprite_matrix[0], sprite_matrix.Size(), CRGB::Black); // Sprites.UpdateSprites(); // // TODO: do collision detection for pacman // //Sprites.DetectCollisions(); // Sprites.RenderSprites(); // new_frame = true; // } // } #endif if (new_frame) { #ifdef OUTPUT_LED_MATRIX combineMatrixes(); #elif LIGHT_TYPE == EL_WIRE_8 // no need to combine frames on the el wire since it only shows frequencies #else DEBUG_PRINTLN(""WIP!""); #error WIP #endif #ifdef OUTPUT_LED // if dithering is off, we can run at a faster framerate if (g_dither) { FastLED.delay((draw_micros * num_dither_shows) / 1000); } else { FastLED.show(); } #elif LIGHT_TYPE == EL_WIRE_8 // send the bytes to their devices // TODO: better support multiple devices Serial1.write(el_output[0]); //Serial2.write(el_output[1]); //Serial3.write(el_output[2]); // TODO: delay? // delay(9); // make sure we finished writing Serial1.flush(); //Serial2.flush(); //Serial3.flush(); #endif // debug print #ifdef DEBUG_VERBOSE Serial.print(g_highest_ema_magnitude, 2); Serial.print("" / ""); Serial.print(g_highest_max_magnitude, 2); Serial.print("" = ""); Serial.print(g_highest_ema_magnitude / g_highest_max_magnitude, 2); Serial.print("" ""); for (uint16_t i = 0; i < numFreqBands; i++) { Serial.print(""| ""); #if LIGHT_TYPE == EL_WIRE_8 size_t output_sequencer = i / 8; size_t output_bit = i % 8; if (bitRead(el_output[output_sequencer], output_bit) == 1) { Serial.print(""X ""); } else { Serial.print("" ""); } #else // TODO: maybe do something with parity here? do some research if (frequencies[i].level > 0) { Serial.print(frequencies[i].level); Serial.print("" ""); } else { Serial.print("" ""); } #endif } Serial.print(""| ""); Serial.print(AudioMemoryUsageMax()); Serial.print("" blocks | ""); if (g_brightness) { Serial.print(g_brightness); Serial.print("" bright | ""); } // finish debug print Serial.print(micros() - last_update_micros); Serial.println("" us""); last_update_micros = micros(); Serial.flush(); #endif // DEBUG_VERBOSE new_frame = false; } } ",12175,False,2260.260275720219,median "/* Скетч к проекту ""Светомузыка на Arduino"" Страница проекта (схемы, описания): https://alexgyver.ru/colormusic/ Исходники на GitHub: https://github.com/AlexGyver/ColorMusic Нравится, как написан код? Поддержи автора! https://alexgyver.ru/support_alex/ Автор: AlexGyver Technologies, 2018 https://AlexGyver.ru/ Как откалибровать уровень шума и как пользоваться пультом расписано на странице проекта! https://alexgyver.ru/colormusic/ */ /* Версия 2.10 Исправлен глюк с большим количеством светодиодов на МЕГЕ */ // ***************************** НАСТРОЙКИ ***************************** // ----- настройка ИК пульта #define REMOTE_TYPE 1 // 0 - без пульта, 1 - пульт от WAVGAT, 2 - пульт от KEYES, 3 - кастомный пульт // система может работать С ЛЮБЫМ ИК ПУЛЬТОМ (практически). Коды для своего пульта можно задать начиная со строки 160 в прошивке. Коды пультов определяются скетчем IRtest_2.0, читай инструкцию // ----- настройки параметров #define KEEP_SETTINGS 1 // хранить ВСЕ настройки в энергонезависимой памяти #define KEEP_STATE 1 // сохранять в памяти состояние вкл/выкл системы (с пульта) #define RESET_SETTINGS 0 // сброс настроек в EEPROM памяти (поставить 1, прошиться, поставить обратно 0, прошиться. Всё) #define SETTINGS_LOG 0 // вывод всех настроек из EEPROM в порт при запуске // ----- настройки ленты #define NUM_LEDS 60 // количество светодиодов (данная версия поддерживает до 410 штук) #define CURRENT_LIMIT 3000 // лимит по току в МИЛЛИАМПЕРАХ, автоматически управляет яркостью (пожалей свой блок питания!) 0 - выключить лимит byte BRIGHTNESS = 200; // яркость по умолчанию (0 - 255) // ----- пины подключения #define SOUND_R A2 // аналоговый пин вход аудио, правый канал #define SOUND_L A1 // аналоговый пин вход аудио, левый канал #define SOUND_R_FREQ A3 // аналоговый пин вход аудио для режима с частотами (через кондер) #define BTN_PIN 3 // кнопка переключения режимов (PIN --- КНОПКА --- GND) #if defined(__AVR_ATmega32U4__) // Пины для Arduino Pro Micro (смотри схему для Pro Micro на странице проекта!!!) #define MLED_PIN 17 // пин светодиода режимов на ProMicro, т.к. обычный не выведен. #define MLED_ON LOW #define LED_PIN 9 // пин DI светодиодной ленты на ProMicro, т.к. обычный не выведен. #else // Пины для других плат Arduino (по умолчанию) #define MLED_PIN 13 // пин светодиода режимов #define MLED_ON HIGH #define LED_PIN 12 // пин DI светодиодной ленты #endif #define POT_GND A0 // пин земля для потенциометра #define IR_PIN 2 // пин ИК приёмника // ----- настройки радуги float RAINBOW_STEP = 5.00; // шаг изменения цвета радуги // ----- отрисовка #define MODE 0 // режим при запуске #define MAIN_LOOP 5 // период основного цикла отрисовки (по умолчанию 5) // ----- сигнал #define MONO 1 // 1 - только один канал (ПРАВЫЙ!!!!! SOUND_R!!!!!), 0 - два канала #define EXP 1.4 // степень усиления сигнала (для более ""резкой"" работы) (по умолчанию 1.4) #define POTENT 0 // 1 - используем потенциометр, 0 - используется внутренний источник опорного напряжения 1.1 В byte EMPTY_BRIGHT = 30; // яркость ""не горящих"" светодиодов (0 - 255) #define EMPTY_COLOR HUE_PURPLE // цвет ""не горящих"" светодиодов. Будет чёрный, если яркость 0 // ----- нижний порог шумов uint16_t LOW_PASS = 100; // нижний порог шумов режим VU, ручная настройка uint16_t SPEKTR_LOW_PASS = 40; // нижний порог шумов режим спектра, ручная настройка #define AUTO_LOW_PASS 0 // разрешить настройку нижнего порога шумов при запуске (по умолч. 0) #define EEPROM_LOW_PASS 1 // порог шумов хранится в энергонезависимой памяти (по умолч. 1) #define LOW_PASS_ADD 13 // ""добавочная"" величина к нижнему порогу, для надёжности (режим VU) #define LOW_PASS_FREQ_ADD 3 // ""добавочная"" величина к нижнему порогу, для надёжности (режим частот) // ----- режим шкала громкости float SMOOTH = 0.3; // коэффициент плавности анимации VU (по умолчанию 0.5) #define MAX_COEF 1.8 // коэффициент громкости (максимальное равно срднему * этот коэф) (по умолчанию 1.8) // ----- режим цветомузыки float SMOOTH_FREQ = 0.8; // коэффициент плавности анимации частот (по умолчанию 0.8) float MAX_COEF_FREQ = 1.2; // коэффициент порога для ""вспышки"" цветомузыки (по умолчанию 1.5) #define SMOOTH_STEP 20 // шаг уменьшения яркости в режиме цветомузыки (чем больше, тем быстрее гаснет) #define LOW_COLOR HUE_RED // цвет низких частот #define MID_COLOR HUE_GREEN // цвет средних #define HIGH_COLOR HUE_YELLOW // цвет высоких // ----- режим стробоскопа uint16_t STROBE_PERIOD = 140; // период вспышек, миллисекунды #define STROBE_DUTY 20 // скважность вспышек (1 - 99) - отношение времени вспышки ко времени темноты #define STROBE_COLOR HUE_YELLOW // цвет стробоскопа #define STROBE_SAT 0 // насыщенность. Если 0 - цвет будет БЕЛЫЙ при любом цвете (0 - 255) byte STROBE_SMOOTH = 200; // скорость нарастания/угасания вспышки (0 - 255) // ----- режим подсветки byte LIGHT_COLOR = 0; // начальный цвет подсветки byte LIGHT_SAT = 255; // начальная насыщенность подсветки byte COLOR_SPEED = 100; int RAINBOW_PERIOD = 1; float RAINBOW_STEP_2 = 0.5; // ----- режим бегущих частот byte RUNNING_SPEED = 11; // ----- режим анализатора спектра byte HUE_START = 0; byte HUE_STEP = 5; #define LIGHT_SMOOTH 2 /* Цвета для HSV HUE_RED HUE_ORANGE HUE_YELLOW HUE_GREEN HUE_AQUA HUE_BLUE HUE_PURPLE HUE_PINK */ // ----- КНОПКИ ПУЛЬТА WAVGAT ----- #if REMOTE_TYPE == 1 #define BUTT_UP 0xF39EEBAD #define BUTT_DOWN 0xC089F6AD #define BUTT_LEFT 0xE25410AD #define BUTT_RIGHT 0x14CE54AD #define BUTT_OK 0x297C76AD #define BUTT_1 0x4E5BA3AD #define BUTT_2 0xE51CA6AD #define BUTT_3 0xE207E1AD #define BUTT_4 0x517068AD #define BUTT_5 0x1B92DDAD #define BUTT_6 0xAC2A56AD #define BUTT_7 0x5484B6AD #define BUTT_8 0xD22353AD #define BUTT_9 0xDF3F4BAD #define BUTT_0 0xF08A26AD #define BUTT_STAR 0x68E456AD #define BUTT_HASH 0x151CD6AD #endif // ----- КНОПКИ ПУЛЬТА KEYES ----- #if REMOTE_TYPE == 2 #define BUTT_UP 0xE51CA6AD #define BUTT_DOWN 0xD22353AD #define BUTT_LEFT 0x517068AD #define BUTT_RIGHT 0xAC2A56AD #define BUTT_OK 0x1B92DDAD #define BUTT_1 0x68E456AD #define BUTT_2 0xF08A26AD #define BUTT_3 0x151CD6AD #define BUTT_4 0x18319BAD #define BUTT_5 0xF39EEBAD #define BUTT_6 0x4AABDFAD #define BUTT_7 0xE25410AD #define BUTT_8 0x297C76AD #define BUTT_9 0x14CE54AD #define BUTT_0 0xC089F6AD #define BUTT_STAR 0xAF3F1BAD #define BUTT_HASH 0x38379AD #endif // ----- КНОПКИ СВОЕГО ПУЛЬТА ----- #if REMOTE_TYPE == 3 #define BUTT_UP 0xE51CA6AD #define BUTT_DOWN 0xD22353AD #define BUTT_LEFT 0x517068AD #define BUTT_RIGHT 0xAC2A56AD #define BUTT_OK 0x1B92DDAD #define BUTT_1 0x68E456AD #define BUTT_2 0xF08A26AD #define BUTT_3 0x151CD6AD #define BUTT_4 0x18319BAD #define BUTT_5 0xF39EEBAD #define BUTT_6 0x4AABDFAD #define BUTT_7 0xE25410AD #define BUTT_8 0x297C76AD #define BUTT_9 0x14CE54AD #define BUTT_0 0xC089F6AD #define BUTT_STAR 0xAF3F1BAD // * #define BUTT_HASH 0x38379AD // # #endif // ------------------------------ ДЛЯ РАЗРАБОТЧИКОВ -------------------------------- #define MODE_AMOUNT 9 // количество режимов #define STRIPE NUM_LEDS / 5 float freq_to_stripe = NUM_LEDS / 40; // /2 так как симметрия, и /20 так как 20 частот #define FHT_N 64 // ширина спектра х2 #define LOG_OUT 1 #include // преобразование Хартли #include #define FASTLED_ALLOW_INTERRUPTS 1 #include ""FastLED.h"" CRGB leds[NUM_LEDS]; #include ""GyverButton.h"" GButton butt1(BTN_PIN); #include ""IRLremote.h"" CHashIR IRLremote; uint32_t IRdata; // градиент-палитра от зелёного к красному DEFINE_GRADIENT_PALETTE(soundlevel_gp) { 0, 0, 255, 0, // green 100, 255, 255, 0, // yellow 150, 255, 100, 0, // orange 200, 255, 50, 0, // red 255, 255, 0, 0 // red }; CRGBPalette32 myPal = soundlevel_gp; byte Rlenght, Llenght; float RsoundLevel, RsoundLevel_f; float LsoundLevel, LsoundLevel_f; float averageLevel = 50; int maxLevel = 100; byte MAX_CH = NUM_LEDS / 2; int hue; unsigned long main_timer, hue_timer, strobe_timer, running_timer, color_timer, rainbow_timer, eeprom_timer; float averK = 0.006; byte count; float index = (float)255 / MAX_CH; // коэффициент перевода для палитры boolean lowFlag; byte low_pass; int RcurrentLevel, LcurrentLevel; int colorMusic[3]; float colorMusic_f[3], colorMusic_aver[3]; boolean colorMusicFlash[3], strobeUp_flag, strobeDwn_flag; byte this_mode = MODE; int thisBright[3], strobe_bright = 0; unsigned int light_time = STROBE_PERIOD * STROBE_DUTY / 100; volatile boolean ir_flag; boolean settings_mode, ONstate = true; int8_t freq_strobe_mode, light_mode; int freq_max; float freq_max_f, rainbow_steps; int freq_f[32]; int this_color; boolean running_flag[3], eeprom_flag; #define cbi(sfr, bit) (_SFR_BYTE(sfr) &= ~_BV(bit)) #define sbi(sfr, bit) (_SFR_BYTE(sfr) |= _BV(bit)) // ------------------------------ ДЛЯ РАЗРАБОТЧИКОВ -------------------------------- void setup() { Serial.begin(9600); FastLED.addLeds(leds, NUM_LEDS).setCorrection( TypicalLEDStrip ); if (CURRENT_LIMIT > 0) FastLED.setMaxPowerInVoltsAndMilliamps(5, CURRENT_LIMIT); FastLED.setBrightness(BRIGHTNESS); #if defined(__AVR_ATmega32U4__) //Выключение светодиодов на Pro Micro TXLED1; //на ProMicro выключим и TXLED delay (1000); //При питании по usb от компьютера нужна задержка перед выключением RXLED. Если питать от БП, то можно убрать эту строку. #endif pinMode(MLED_PIN, OUTPUT); //Режим пина для светодиода режима на выход digitalWrite(MLED_PIN, !MLED_ON); //Выключение светодиода режима pinMode(POT_GND, OUTPUT); digitalWrite(POT_GND, LOW); butt1.setTimeout(900); IRLremote.begin(IR_PIN); // для увеличения точности уменьшаем опорное напряжение, // выставив EXTERNAL и подключив Aref к выходу 3.3V на плате через делитель // GND ---[10-20 кОм] --- REF --- [10 кОм] --- 3V3 // в данной схеме GND берётся из А0 для удобства подключения if (POTENT) analogReference(EXTERNAL); else #if defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) analogReference(INTERNAL1V1); #else analogReference(INTERNAL); #endif // жуткая магия, меняем частоту оцифровки до 18 кГц // команды на ебучем ассемблере, даже не спрашивайте, как это работает // поднимаем частоту опроса аналогового порта до 38.4 кГц, по теореме // Котельникова (Найквиста) частота дискретизации будет 19.2 кГц // http://yaab-arduino.blogspot.ru/2015/02/fast-sampling-from-analog-input.html sbi(ADCSRA, ADPS2); cbi(ADCSRA, ADPS1); sbi(ADCSRA, ADPS0); if (RESET_SETTINGS) EEPROM.write(100, 0); // сброс флага настроек if (AUTO_LOW_PASS && !EEPROM_LOW_PASS) { // если разрешена автонастройка нижнего порога шумов autoLowPass(); } if (EEPROM_LOW_PASS) { // восстановить значения шумов из памяти LOW_PASS = EEPROM.readInt(70); SPEKTR_LOW_PASS = EEPROM.readInt(72); } // в 100 ячейке хранится число 100. Если нет - значит это первый запуск системы if (KEEP_SETTINGS) { if (EEPROM.read(100) != 100) { //Serial.println(F(""First start"")); EEPROM.write(100, 100); updateEEPROM(); } else { readEEPROM(); } } #if (SETTINGS_LOG == 1) Serial.print(F(""this_mode = "")); Serial.println(this_mode); Serial.print(F(""freq_strobe_mode = "")); Serial.println(freq_strobe_mode); Serial.print(F(""light_mode = "")); Serial.println(light_mode); Serial.print(F(""RAINBOW_STEP = "")); Serial.println(RAINBOW_STEP); Serial.print(F(""MAX_COEF_FREQ = "")); Serial.println(MAX_COEF_FREQ); Serial.print(F(""STROBE_PERIOD = "")); Serial.println(STROBE_PERIOD); Serial.print(F(""LIGHT_SAT = "")); Serial.println(LIGHT_SAT); Serial.print(F(""RAINBOW_STEP_2 = "")); Serial.println(RAINBOW_STEP_2); Serial.print(F(""HUE_START = "")); Serial.println(HUE_START); Serial.print(F(""SMOOTH = "")); Serial.println(SMOOTH); Serial.print(F(""SMOOTH_FREQ = "")); Serial.println(SMOOTH_FREQ); Serial.print(F(""STROBE_SMOOTH = "")); Serial.println(STROBE_SMOOTH); Serial.print(F(""LIGHT_COLOR = "")); Serial.println(LIGHT_COLOR); Serial.print(F(""COLOR_SPEED = "")); Serial.println(COLOR_SPEED); Serial.print(F(""RAINBOW_PERIOD = "")); Serial.println(RAINBOW_PERIOD); Serial.print(F(""RUNNING_SPEED = "")); Serial.println(RUNNING_SPEED); Serial.print(F(""HUE_STEP = "")); Serial.println(HUE_STEP); Serial.print(F(""EMPTY_BRIGHT = "")); Serial.println(EMPTY_BRIGHT); Serial.print(F(""ONstate = "")); Serial.println(ONstate); #endif } void loop() { buttonTick(); // опрос и обработка кнопки #if REMOTE_TYPE != 0 remoteTick(); // опрос ИК пульта #endif mainLoop(); // главный цикл обработки и отрисовки eepromTick(); // проверка не пора ли сохранить настройки } void mainLoop() { // главный цикл отрисовки if (ONstate) { if (millis() - main_timer > MAIN_LOOP) { // сбрасываем значения RsoundLevel = 0; LsoundLevel = 0; // перваые два режима - громкость (VU meter) if (this_mode == 0 || this_mode == 1) { for (byte i = 0; i < 100; i ++) { // делаем 100 измерений RcurrentLevel = analogRead(SOUND_R); // с правого if (!MONO) LcurrentLevel = analogRead(SOUND_L); // и левого каналов if (RsoundLevel < RcurrentLevel) RsoundLevel = RcurrentLevel; // ищем максимальное if (!MONO) if (LsoundLevel < LcurrentLevel) LsoundLevel = LcurrentLevel; // ищем максимальное } // фильтруем по нижнему порогу шумов RsoundLevel = map(RsoundLevel, LOW_PASS, 1023, 0, 500); if (!MONO)LsoundLevel = map(LsoundLevel, LOW_PASS, 1023, 0, 500); // ограничиваем диапазон RsoundLevel = constrain(RsoundLevel, 0, 500); if (!MONO)LsoundLevel = constrain(LsoundLevel, 0, 500); // возводим в степень (для большей чёткости работы) RsoundLevel = pow(RsoundLevel, EXP); if (!MONO)LsoundLevel = pow(LsoundLevel, EXP); // фильтр RsoundLevel_f = RsoundLevel * SMOOTH + RsoundLevel_f * (1 - SMOOTH); if (!MONO)LsoundLevel_f = LsoundLevel * SMOOTH + LsoundLevel_f * (1 - SMOOTH); if (MONO) LsoundLevel_f = RsoundLevel_f; // если моно, то левый = правому // заливаем ""подложку"", если яркость достаточная if (EMPTY_BRIGHT > 5) { for (int i = 0; i < NUM_LEDS; i++) leds[i] = CHSV(EMPTY_COLOR, 255, EMPTY_BRIGHT); } // если значение выше порога - начинаем самое интересное if (RsoundLevel_f > 15 && LsoundLevel_f > 15) { // расчёт общей средней громкости с обоих каналов, фильтрация. // Фильтр очень медленный, сделано специально для автогромкости averageLevel = (float)(RsoundLevel_f + LsoundLevel_f) / 2 * averK + averageLevel * (1 - averK); // принимаем максимальную громкость шкалы как среднюю, умноженную на некоторый коэффициент MAX_COEF maxLevel = (float)averageLevel * MAX_COEF; // преобразуем сигнал в длину ленты (где MAX_CH это половина количества светодиодов) Rlenght = map(RsoundLevel_f, 0, maxLevel, 0, MAX_CH); Llenght = map(LsoundLevel_f, 0, maxLevel, 0, MAX_CH); // ограничиваем до макс. числа светодиодов Rlenght = constrain(Rlenght, 0, MAX_CH); Llenght = constrain(Llenght, 0, MAX_CH); animation(); // отрисовать } } // 3-5 режим - цветомузыка if (this_mode == 2 || this_mode == 3 || this_mode == 4 || this_mode == 7 || this_mode == 8) { analyzeAudio(); colorMusic[0] = 0; colorMusic[1] = 0; colorMusic[2] = 0; for (int i = 0 ; i < 32 ; i++) { if (fht_log_out[i] < SPEKTR_LOW_PASS) fht_log_out[i] = 0; } // низкие частоты, выборка со 2 по 5 тон (0 и 1 зашумленные!) for (byte i = 2; i < 6; i++) { if (fht_log_out[i] > colorMusic[0]) colorMusic[0] = fht_log_out[i]; } // средние частоты, выборка с 6 по 10 тон for (byte i = 6; i < 11; i++) { if (fht_log_out[i] > colorMusic[1]) colorMusic[1] = fht_log_out[i]; } // высокие частоты, выборка с 11 по 31 тон for (byte i = 11; i < 32; i++) { if (fht_log_out[i] > colorMusic[2]) colorMusic[2] = fht_log_out[i]; } freq_max = 0; for (byte i = 0; i < 30; i++) { if (fht_log_out[i + 2] > freq_max) freq_max = fht_log_out[i + 2]; if (freq_max < 5) freq_max = 5; if (freq_f[i] < fht_log_out[i + 2]) freq_f[i] = fht_log_out[i + 2]; if (freq_f[i] > 0) freq_f[i] -= LIGHT_SMOOTH; else freq_f[i] = 0; } freq_max_f = freq_max * averK + freq_max_f * (1 - averK); for (byte i = 0; i < 3; i++) { colorMusic_aver[i] = colorMusic[i] * averK + colorMusic_aver[i] * (1 - averK); // общая фильтрация colorMusic_f[i] = colorMusic[i] * SMOOTH_FREQ + colorMusic_f[i] * (1 - SMOOTH_FREQ); // локальная if (colorMusic_f[i] > ((float)colorMusic_aver[i] * MAX_COEF_FREQ)) { thisBright[i] = 255; colorMusicFlash[i] = true; running_flag[i] = true; } else colorMusicFlash[i] = false; if (thisBright[i] >= 0) thisBright[i] -= SMOOTH_STEP; if (thisBright[i] < EMPTY_BRIGHT) { thisBright[i] = EMPTY_BRIGHT; running_flag[i] = false; } } animation(); } if (this_mode == 5) { if ((long)millis() - strobe_timer > STROBE_PERIOD) { strobe_timer = millis(); strobeUp_flag = true; strobeDwn_flag = false; } if ((long)millis() - strobe_timer > light_time) { strobeDwn_flag = true; } if (strobeUp_flag) { // если настало время пыхнуть if (strobe_bright < 255) // если яркость не максимальная strobe_bright += STROBE_SMOOTH; // увелчить if (strobe_bright > 255) { // если пробили макс. яркость strobe_bright = 255; // оставить максимум strobeUp_flag = false; // флаг опустить } } if (strobeDwn_flag) { // гаснем if (strobe_bright > 0) // если яркость не минимальная strobe_bright -= STROBE_SMOOTH; // уменьшить if (strobe_bright < 0) { // если пробили мин. яркость strobeDwn_flag = false; strobe_bright = 0; // оставить 0 } } animation(); } if (this_mode == 6) animation(); if (!IRLremote.receiving()) // если на ИК приёмник не приходит сигнал (без этого НЕ РАБОТАЕТ!) FastLED.show(); // отправить значения на ленту if (this_mode != 7) // 7 режиму не нужна очистка!!! FastLED.clear(); // очистить массив пикселей main_timer = millis(); // сбросить таймер } } } void animation() { // согласно режиму switch (this_mode) { case 0: count = 0; for (int i = (MAX_CH - 1); i > ((MAX_CH - 1) - Rlenght); i--) { leds[i] = ColorFromPalette(myPal, (count * index)); // заливка по палитре "" от зелёного к красному"" count++; } count = 0; for (int i = (MAX_CH); i < (MAX_CH + Llenght); i++ ) { leds[i] = ColorFromPalette(myPal, (count * index)); // заливка по палитре "" от зелёного к красному"" count++; } if (EMPTY_BRIGHT > 0) { CHSV this_dark = CHSV(EMPTY_COLOR, 255, EMPTY_BRIGHT); for (int i = ((MAX_CH - 1) - Rlenght); i > 0; i--) leds[i] = this_dark; for (int i = MAX_CH + Llenght; i < NUM_LEDS; i++) leds[i] = this_dark; } break; case 1: if (millis() - rainbow_timer > 30) { rainbow_timer = millis(); hue = floor((float)hue + RAINBOW_STEP); } count = 0; for (int i = (MAX_CH - 1); i > ((MAX_CH - 1) - Rlenght); i--) { leds[i] = ColorFromPalette(RainbowColors_p, (count * index) / 2 - hue); // заливка по палитре радуга count++; } count = 0; for (int i = (MAX_CH); i < (MAX_CH + Llenght); i++ ) { leds[i] = ColorFromPalette(RainbowColors_p, (count * index) / 2 - hue); // заливка по палитре радуга count++; } if (EMPTY_BRIGHT > 0) { CHSV this_dark = CHSV(EMPTY_COLOR, 255, EMPTY_BRIGHT); for (int i = ((MAX_CH - 1) - Rlenght); i > 0; i--) leds[i] = this_dark; for (int i = MAX_CH + Llenght; i < NUM_LEDS; i++) leds[i] = this_dark; } break; case 2: for (int i = 0; i < NUM_LEDS; i++) { if (i < STRIPE) leds[i] = CHSV(HIGH_COLOR, 255, thisBright[2]); else if (i < STRIPE * 2) leds[i] = CHSV(MID_COLOR, 255, thisBright[1]); else if (i < STRIPE * 3) leds[i] = CHSV(LOW_COLOR, 255, thisBright[0]); else if (i < STRIPE * 4) leds[i] = CHSV(MID_COLOR, 255, thisBright[1]); else if (i < STRIPE * 5) leds[i] = CHSV(HIGH_COLOR, 255, thisBright[2]); } break; case 3: for (int i = 0; i < NUM_LEDS; i++) { if (i < NUM_LEDS / 3) leds[i] = CHSV(HIGH_COLOR, 255, thisBright[2]); else if (i < NUM_LEDS * 2 / 3) leds[i] = CHSV(MID_COLOR, 255, thisBright[1]); else if (i < NUM_LEDS) leds[i] = CHSV(LOW_COLOR, 255, thisBright[0]); } break; case 4: switch (freq_strobe_mode) { case 0: if (colorMusicFlash[2]) HIGHS(); else if (colorMusicFlash[1]) MIDS(); else if (colorMusicFlash[0]) LOWS(); else SILENCE(); break; case 1: if (colorMusicFlash[2]) HIGHS(); else SILENCE(); break; case 2: if (colorMusicFlash[1]) MIDS(); else SILENCE(); break; case 3: if (colorMusicFlash[0]) LOWS(); else SILENCE(); break; } break; case 5: if (strobe_bright > 0) for (int i = 0; i < NUM_LEDS; i++) leds[i] = CHSV(STROBE_COLOR, STROBE_SAT, strobe_bright); else for (int i = 0; i < NUM_LEDS; i++) leds[i] = CHSV(EMPTY_COLOR, 255, EMPTY_BRIGHT); break; case 6: switch (light_mode) { case 0: for (int i = 0; i < NUM_LEDS; i++) leds[i] = CHSV(LIGHT_COLOR, LIGHT_SAT, 255); break; case 1: if (millis() - color_timer > COLOR_SPEED) { color_timer = millis(); if (++this_color > 255) this_color = 0; } for (int i = 0; i < NUM_LEDS; i++) leds[i] = CHSV(this_color, LIGHT_SAT, 255); break; case 2: if (millis() - rainbow_timer > 30) { rainbow_timer = millis(); this_color += RAINBOW_PERIOD; if (this_color > 255) this_color = 0; if (this_color < 0) this_color = 255; } rainbow_steps = this_color; for (int i = 0; i < NUM_LEDS; i++) { leds[i] = CHSV((int)floor(rainbow_steps), 255, 255); rainbow_steps += RAINBOW_STEP_2; if (rainbow_steps > 255) rainbow_steps = 0; if (rainbow_steps < 0) rainbow_steps = 255; } break; } break; case 7: switch (freq_strobe_mode) { case 0: if (running_flag[2]) leds[NUM_LEDS / 2] = CHSV(HIGH_COLOR, 255, thisBright[2]); else if (running_flag[1]) leds[NUM_LEDS / 2] = CHSV(MID_COLOR, 255, thisBright[1]); else if (running_flag[0]) leds[NUM_LEDS / 2] = CHSV(LOW_COLOR, 255, thisBright[0]); else leds[NUM_LEDS / 2] = CHSV(EMPTY_COLOR, 255, EMPTY_BRIGHT); break; case 1: if (running_flag[2]) leds[NUM_LEDS / 2] = CHSV(HIGH_COLOR, 255, thisBright[2]); else leds[NUM_LEDS / 2] = CHSV(EMPTY_COLOR, 255, EMPTY_BRIGHT); break; case 2: if (running_flag[1]) leds[NUM_LEDS / 2] = CHSV(MID_COLOR, 255, thisBright[1]); else leds[NUM_LEDS / 2] = CHSV(EMPTY_COLOR, 255, EMPTY_BRIGHT); break; case 3: if (running_flag[0]) leds[NUM_LEDS / 2] = CHSV(LOW_COLOR, 255, thisBright[0]); else leds[NUM_LEDS / 2] = CHSV(EMPTY_COLOR, 255, EMPTY_BRIGHT); break; } leds[(NUM_LEDS / 2) - 1] = leds[NUM_LEDS / 2]; if (millis() - running_timer > RUNNING_SPEED) { running_timer = millis(); for (byte i = 0; i < NUM_LEDS / 2 - 1; i++) { leds[i] = leds[i + 1]; leds[NUM_LEDS - i - 1] = leds[i]; } } break; case 8: byte HUEindex = HUE_START; for (byte i = 0; i < NUM_LEDS / 2; i++) { byte this_bright = map(freq_f[(int)floor((NUM_LEDS / 2 - i) / freq_to_stripe)], 0, freq_max_f, 0, 255); this_bright = constrain(this_bright, 0, 255); leds[i] = CHSV(HUEindex, 255, this_bright); leds[NUM_LEDS - i - 1] = leds[i]; HUEindex += HUE_STEP; if (HUEindex > 255) HUEindex = 0; } break; } } void HIGHS() { for (int i = 0; i < NUM_LEDS; i++) leds[i] = CHSV(HIGH_COLOR, 255, thisBright[2]); } void MIDS() { for (int i = 0; i < NUM_LEDS; i++) leds[i] = CHSV(MID_COLOR, 255, thisBright[1]); } void LOWS() { for (int i = 0; i < NUM_LEDS; i++) leds[i] = CHSV(LOW_COLOR, 255, thisBright[0]); } void SILENCE() { for (int i = 0; i < NUM_LEDS; i++) leds[i] = CHSV(EMPTY_COLOR, 255, EMPTY_BRIGHT); } // вспомогательная функция, изменяет величину value на шаг incr в пределах minimum.. maximum int smartIncr(int value, int incr_step, int mininmum, int maximum) { int val_buf = value + incr_step; val_buf = constrain(val_buf, mininmum, maximum); return val_buf; } float smartIncrFloat(float value, float incr_step, float mininmum, float maximum) { float val_buf = value + incr_step; val_buf = constrain(val_buf, mininmum, maximum); return val_buf; } #if REMOTE_TYPE != 0 void remoteTick() { if (IRLremote.available()) { auto data = IRLremote.read(); IRdata = data.command; ir_flag = true; } if (ir_flag) { // если данные пришли eeprom_timer = millis(); eeprom_flag = true; switch (IRdata) { // режимы case BUTT_1: this_mode = 0; break; case BUTT_2: this_mode = 1; break; case BUTT_3: this_mode = 2; break; case BUTT_4: this_mode = 3; break; case BUTT_5: this_mode = 4; break; case BUTT_6: this_mode = 5; break; case BUTT_7: this_mode = 6; break; case BUTT_8: this_mode = 7; break; case BUTT_9: this_mode = 8; break; case BUTT_0: fullLowPass(); break; case BUTT_STAR: ONstate = !ONstate; FastLED.clear(); FastLED.show(); updateEEPROM(); break; case BUTT_HASH: switch (this_mode) { case 4: case 7: if (++freq_strobe_mode > 3) freq_strobe_mode = 0; break; case 6: if (++light_mode > 2) light_mode = 0; break; } break; case BUTT_OK: digitalWrite(MLED_PIN, settings_mode ^ MLED_ON); settings_mode = !settings_mode; break; case BUTT_UP: if (settings_mode) { // ВВЕРХ общие настройки EMPTY_BRIGHT = smartIncr(EMPTY_BRIGHT, 5, 0, 255); } else { switch (this_mode) { case 0: break; case 1: RAINBOW_STEP = smartIncrFloat(RAINBOW_STEP, 0.5, 0.5, 20); break; case 2: case 3: case 4: MAX_COEF_FREQ = smartIncrFloat(MAX_COEF_FREQ, 0.1, 0, 5); break; case 5: STROBE_PERIOD = smartIncr(STROBE_PERIOD, 20, 1, 1000); break; case 6: switch (light_mode) { case 0: LIGHT_SAT = smartIncr(LIGHT_SAT, 20, 0, 255); break; case 1: LIGHT_SAT = smartIncr(LIGHT_SAT, 20, 0, 255); break; case 2: RAINBOW_STEP_2 = smartIncrFloat(RAINBOW_STEP_2, 0.5, 0.5, 10); break; } break; case 7: MAX_COEF_FREQ = smartIncrFloat(MAX_COEF_FREQ, 0.1, 0.0, 10); break; case 8: HUE_START = smartIncr(HUE_START, 10, 0, 255); break; } } break; case BUTT_DOWN: if (settings_mode) { // ВНИЗ общие настройки EMPTY_BRIGHT = smartIncr(EMPTY_BRIGHT, -5, 0, 255); } else { switch (this_mode) { case 0: break; case 1: RAINBOW_STEP = smartIncrFloat(RAINBOW_STEP, -0.5, 0.5, 20); break; case 2: case 3: case 4: MAX_COEF_FREQ = smartIncrFloat(MAX_COEF_FREQ, -0.1, 0, 5); break; case 5: STROBE_PERIOD = smartIncr(STROBE_PERIOD, -20, 1, 1000); break; case 6: switch (light_mode) { case 0: LIGHT_SAT = smartIncr(LIGHT_SAT, -20, 0, 255); break; case 1: LIGHT_SAT = smartIncr(LIGHT_SAT, -20, 0, 255); break; case 2: RAINBOW_STEP_2 = smartIncrFloat(RAINBOW_STEP_2, -0.5, 0.5, 10); break; } break; case 7: MAX_COEF_FREQ = smartIncrFloat(MAX_COEF_FREQ, -0.1, 0.0, 10); break; case 8: HUE_START = smartIncr(HUE_START, -10, 0, 255); break; } } break; case BUTT_LEFT: if (settings_mode) { // ВЛЕВО общие настройки BRIGHTNESS = smartIncr(BRIGHTNESS, -20, 0, 255); FastLED.setBrightness(BRIGHTNESS); } else { switch (this_mode) { case 0: case 1: SMOOTH = smartIncrFloat(SMOOTH, -0.05, 0.05, 1); break; case 2: case 3: case 4: SMOOTH_FREQ = smartIncrFloat(SMOOTH_FREQ, -0.05, 0.05, 1); break; case 5: STROBE_SMOOTH = smartIncr(STROBE_SMOOTH, -20, 0, 255); break; case 6: switch (light_mode) { case 0: LIGHT_COLOR = smartIncr(LIGHT_COLOR, -10, 0, 255); break; case 1: COLOR_SPEED = smartIncr(COLOR_SPEED, -10, 0, 255); break; case 2: RAINBOW_PERIOD = smartIncr(RAINBOW_PERIOD, -1, -20, 20); break; } break; case 7: RUNNING_SPEED = smartIncr(RUNNING_SPEED, -10, 1, 255); break; case 8: HUE_STEP = smartIncr(HUE_STEP, -1, 1, 255); break; } } break; case BUTT_RIGHT: if (settings_mode) { // ВПРАВО общие настройки BRIGHTNESS = smartIncr(BRIGHTNESS, 20, 0, 255); FastLED.setBrightness(BRIGHTNESS); } else { switch (this_mode) { case 0: case 1: SMOOTH = smartIncrFloat(SMOOTH, 0.05, 0.05, 1); break; case 2: case 3: case 4: SMOOTH_FREQ = smartIncrFloat(SMOOTH_FREQ, 0.05, 0.05, 1); break; case 5: STROBE_SMOOTH = smartIncr(STROBE_SMOOTH, 20, 0, 255); break; case 6: switch (light_mode) { case 0: LIGHT_COLOR = smartIncr(LIGHT_COLOR, 10, 0, 255); break; case 1: COLOR_SPEED = smartIncr(COLOR_SPEED, 10, 0, 255); break; case 2: RAINBOW_PERIOD = smartIncr(RAINBOW_PERIOD, 1, -20, 20); break; } break; case 7: RUNNING_SPEED = smartIncr(RUNNING_SPEED, 10, 1, 255); break; case 8: HUE_STEP = smartIncr(HUE_STEP, 1, 1, 255); break; } } break; default: eeprom_flag = false; // если не распознали кнопку, не обновляем настройки! break; } ir_flag = false; } } #endif void autoLowPass() { // для режима VU delay(10); // ждём инициализации АЦП int thisMax = 0; // максимум int thisLevel; for (byte i = 0; i < 200; i++) { thisLevel = analogRead(SOUND_R); // делаем 200 измерений if (thisLevel > thisMax) // ищем максимумы thisMax = thisLevel; // запоминаем delay(4); // ждём 4мс } LOW_PASS = thisMax + LOW_PASS_ADD; // нижний порог как максимум тишины + некая величина // для режима спектра thisMax = 0; for (byte i = 0; i < 100; i++) { // делаем 100 измерений analyzeAudio(); // разбить в спектр for (byte j = 2; j < 32; j++) { // первые 2 канала - хлам thisLevel = fht_log_out[j]; if (thisLevel > thisMax) // ищем максимумы thisMax = thisLevel; // запоминаем } delay(4); // ждём 4мс } SPEKTR_LOW_PASS = thisMax + LOW_PASS_FREQ_ADD; // нижний порог как максимум тишины if (EEPROM_LOW_PASS && !AUTO_LOW_PASS) { EEPROM.updateInt(70, LOW_PASS); EEPROM.updateInt(72, SPEKTR_LOW_PASS); } } void analyzeAudio() { for (int i = 0 ; i < FHT_N ; i++) { int sample = analogRead(SOUND_R_FREQ); fht_input[i] = sample; // put real data into bins } fht_window(); // window the data for better frequency response fht_reorder(); // reorder the data before doing the fht fht_run(); // process the data in the fht fht_mag_log(); // take the output of the fht } void buttonTick() { butt1.tick(); // обязательная функция отработки. Должна постоянно опрашиваться if (butt1.isSingle()) // если единичное нажатие if (++this_mode >= MODE_AMOUNT) this_mode = 0; // изменить режим if (butt1.isHolded()) { // кнопка удержана fullLowPass(); } } void fullLowPass() { digitalWrite(MLED_PIN, MLED_ON); // включить светодиод FastLED.setBrightness(0); // погасить ленту FastLED.clear(); // очистить массив пикселей FastLED.show(); // отправить значения на ленту delay(500); // подождать чутка autoLowPass(); // измерить шумы delay(500); // подождать FastLED.setBrightness(BRIGHTNESS); // вернуть яркость digitalWrite(MLED_PIN, !MLED_ON); // выключить светодиод } void updateEEPROM() { EEPROM.updateByte(1, this_mode); EEPROM.updateByte(2, freq_strobe_mode); EEPROM.updateByte(3, light_mode); EEPROM.updateInt(4, RAINBOW_STEP); EEPROM.updateFloat(8, MAX_COEF_FREQ); EEPROM.updateInt(12, STROBE_PERIOD); EEPROM.updateInt(16, LIGHT_SAT); EEPROM.updateFloat(20, RAINBOW_STEP_2); EEPROM.updateInt(24, HUE_START); EEPROM.updateFloat(28, SMOOTH); EEPROM.updateFloat(32, SMOOTH_FREQ); EEPROM.updateInt(36, STROBE_SMOOTH); EEPROM.updateInt(40, LIGHT_COLOR); EEPROM.updateInt(44, COLOR_SPEED); EEPROM.updateInt(48, RAINBOW_PERIOD); EEPROM.updateInt(52, RUNNING_SPEED); EEPROM.updateInt(56, HUE_STEP); EEPROM.updateInt(60, EMPTY_BRIGHT); if (KEEP_STATE) EEPROM.updateByte(64, ONstate); } void readEEPROM() { this_mode = EEPROM.readByte(1); freq_strobe_mode = EEPROM.readByte(2); light_mode = EEPROM.readByte(3); RAINBOW_STEP = EEPROM.readInt(4); MAX_COEF_FREQ = EEPROM.readFloat(8); STROBE_PERIOD = EEPROM.readInt(12); LIGHT_SAT = EEPROM.readInt(16); RAINBOW_STEP_2 = EEPROM.readFloat(20); HUE_START = EEPROM.readInt(24); SMOOTH = EEPROM.readFloat(28); SMOOTH_FREQ = EEPROM.readFloat(32); STROBE_SMOOTH = EEPROM.readInt(36); LIGHT_COLOR = EEPROM.readInt(40); COLOR_SPEED = EEPROM.readInt(44); RAINBOW_PERIOD = EEPROM.readInt(48); RUNNING_SPEED = EEPROM.readInt(52); HUE_STEP = EEPROM.readInt(56); EMPTY_BRIGHT = EEPROM.readInt(60); if (KEEP_STATE) ONstate = EEPROM.readByte(64); } void eepromTick() { if (eeprom_flag) if (millis() - eeprom_timer > 30000) { // 30 секунд после последнего нажатия с пульта eeprom_flag = false; eeprom_timer = millis(); updateEEPROM(); } } ",12421,False,2159.8545392749497,median "#include-once #ignorefunc __SQLite_Inline_Version, __SQLite_Inline_Modified #include ""FileConstants.au3"" #include ""InetConstants.au3"" #include ""Array.au3"" ; Using: _ArrayAdd(),_ArrayDelete(),_ArraySearch() #include ""File.au3"" ; Using: _TempFile() ; #INDEX# ======================================================================================================================= ; Title .........: SQLite ; AutoIt Version : 3.3.14.5 ; Language ......: English ; Description ...: Functions that assist access to an SQLite database. ; Author(s) .....: Fida Florian (piccaso), jchd, jpm ; Dll ...........: sqlite3.dll ; =============================================================================================================================== ; ------------------------------------------------------------------------------ ; This software is provided 'as-is', without any express or ; implied warranty. In no event will the authors be held liable for any ; damages arising from the use of this software. ; #VARIABLES# =================================================================================================================== Global $__g_hDll_SQLite = 0 Global $__g_hDB_SQLite = 0 Global $__g_bUTF8ErrorMsg_SQLite = False Global $__g_hPrintCallback_SQLite = __SQLite_ConsoleWrite Global $__g_bSafeModeState_SQLite = True ; Safemode State (boolean) Global $__g_ahDBs_SQLite[1] = [''] ; Array of known $hDB handles Global $__g_ahQuerys_SQLite[1] = [''] ; Array of known $hQuery handles Global $__g_hMsvcrtDll_SQLite = 0 ; pseudo dll handle for 'msvcrt.dll' ; =============================================================================================================================== ; #CONSTANTS# =================================================================================================================== Global Const $SQLITE_OK = 0 ; /* Successful result */ Global Const $SQLITE_ERROR = 1 ; /* SQL error or missing database */ Global Const $SQLITE_INTERNAL = 2 ; /* An internal logic error in SQLite */ Global Const $SQLITE_PERM = 3 ; /* Access permission denied */ Global Const $SQLITE_ABORT = 4 ; /* Callback routine requested an abort */ Global Const $SQLITE_BUSY = 5 ; /* The database file is locked */ Global Const $SQLITE_LOCKED = 6 ; /* A table in the database is locked */ Global Const $SQLITE_NOMEM = 7 ; /* A malloc() failed */ Global Const $SQLITE_READONLY = 8 ; /* Attempt to write a readonly database */ Global Const $SQLITE_INTERRUPT = 9 ; /* Operation terminated by sqlite_interrupt() */ Global Const $SQLITE_IOERR = 10 ; /* Some kind of disk I/O error occurred */ Global Const $SQLITE_CORRUPT = 11 ; /* The database disk image is malformed */ Global Const $SQLITE_NOTFOUND = 12 ; /* (Internal Only) Table or record not found */ Global Const $SQLITE_FULL = 13 ; /* Insertion failed because database is full */ Global Const $SQLITE_CANTOPEN = 14 ; /* Unable to open the database file */ Global Const $SQLITE_PROTOCOL = 15 ; /* Database lock protocol error */ Global Const $SQLITE_EMPTY = 16 ; /* (Internal Only) Database table is empty */ Global Const $SQLITE_SCHEMA = 17 ; /* The database schema changed */ Global Const $SQLITE_TOOBIG = 18 ; /* Too much data for one row of a table */ Global Const $SQLITE_CONSTRAINT = 19 ; /* Abort due to constraint violation */ Global Const $SQLITE_MISMATCH = 20 ; /* Data type mismatch */ Global Const $SQLITE_MISUSE = 21 ; /* Library used incorrectly */ Global Const $SQLITE_NOLFS = 22 ; /* Uses OS features not supported on host */ Global Const $SQLITE_AUTH = 23 ; /* Authorization denied */ Global Const $SQLITE_ROW = 100 ; /* sqlite_step() has another row ready */ Global Const $SQLITE_DONE = 101 ; /* sqlite_step() has finished executing */ Global Const $SQLITE_OPEN_READONLY = 0x01 ; /* Database opened as read-only */ Global Const $SQLITE_OPEN_READWRITE = 0x02 ; /* Database opened as read-write */ Global Const $SQLITE_OPEN_CREATE = 0x04 ; /* Database will be created if not exists */ Global Const $SQLITE_ENCODING_UTF8 = 0 ; /* Database will be created if not exists with UTF8 encoding (default) */ Global Const $SQLITE_ENCODING_UTF16 = 1 ; /* Database will be created if not exists with UTF16le encoding */ Global Const $SQLITE_ENCODING_UTF16be = 2 ; /* Database will be created if not exists with UTF16be encoding (special usage) */ Global Const $SQLITE_TYPE_INTEGER = 1 ; /* column types */ Global Const $SQLITE_TYPE_FLOAT = 2 Global Const $SQLITE_TYPE_TEXT = 3 Global Const $SQLITE_TYPE_BLOB = 4 Global Const $SQLITE_TYPE_NULL = 5 ; =============================================================================================================================== ; #CURRENT# ===================================================================================================================== ; _SQLite_Startup ; _SQLite_Shutdown ; _SQLite_Open ; _SQLite_Close ; _SQLite_GetTable ; _SQLite_Exec ; _SQLite_LibVersion ; _SQLite_LastInsertRowID ; _SQLite_GetTable2d ; _SQLite_Changes ; _SQLite_TotalChanges ; _SQLite_ErrCode ; _SQLite_ErrMsg ; _SQLite_Display2DResult ; _SQLite_FetchData ; _SQLite_Query ; _SQLite_SetTimeout ; _SQLite_SafeMode ; _SQLite_QueryFinalize ; _SQLite_QueryReset ; _SQLite_FetchNames ; _SQLite_QuerySingleRow ; _SQLite_SQLiteExe ; _SQLite_Encode ; _SQLite_Escape ; _SQLite_FastEncode ; _SQLite_FastEscape ; =============================================================================================================================== ; #INTERNAL_USE_ONLY# =========================================================================================================== ; __SQLite_hChk ; __SQLite_hAdd ; __SQLite_hDel ; __SQLite_VersCmp ; __SQLite_hDbg ; __SQLite_ReportError ; __SQLite_szStringRead ; __SQLite_szFree ; __SQLite_StringToUtf8Struct ; __SQLite_Utf8StructToString ; __SQLite_ConsoleWrite ;~ ; __SQLite_Download_SQLite3File ;~ ; __SQLite_Download_Confirmation ; __SQLite_Print ; =============================================================================================================================== #comments-start Changelog: 26.11.05 Added _SQLite_QueryReset() 26.11.05 Added _SQLite_QueryFinalize() 26.11.05 Added _SQLite_SaveMode() 26.11.05 Implemented SaveMode 27.11.05 Renamed _SQLite_FetchArray() -> _SQLite_FetchData() 27.11.05 Added _SQLite_FetchNames(), Example 28.11.05 Removed _SQLite_Commit(), _SQLite_Close() handles $SQLITE_BUSY issues 28.11.05 Added Function Headers 28.11.05 Fixed Bug in _SQLite_Exec(), $sErrorMsg was set to 0 instead of 'Successful result' 29.11.05 Changed _SQLite_Display2DResult(), Better Formating for Larger Tables & Ability to Return the Result 30.11.05 Changed _SQLite_GetTable2d(), Ability to Switch Dimensions 30.11.05 Fixed _SQLite_Display2DResult() $iCellWidth was ignored 03.12.05 Added _SQLite_QuerySingleRow() 04.12.05 Changed Standard $hDB Handling (Thank you jpm) 04.12.05 Fixed Return Values of _SQLite_LibVersion(),_SQLite_LastInsertRowID(),_SQLite_Changes(),_SQLite_TotalChanges() 04.12.05 Changed _SQLite_Open() now opens a ':memory:' database if no name specified 05.12.05 Changed _SQLite_FetchData() NULL Values will be Skipped 10.12.05 Changed _SQLite_QuerySingleResult() now uses 'sqlite3_get_table' API 13.12.05 Added _SQLite_SQLiteExe() Wrapper for SQLite3.exe 29.03.06 Removed _SQLite_SetGlobalTimeout() 29.03.06 Added _SQLite_SetTimeout() 17.05.06 :cdecl to support autoit debugging version 18.05.06 _SQLite_SQLiteExe() now Creates nonexistent Directories 18.05.06 Fixed SyntaxCheck Warnings (_SQLite_GetTable2d()) 21.05.06 Added support for Default Keyword for all Optional parameters 25.05.06 Added _SQLite_Encode() 25.05.06 Changed _SQLite_QueryNoResult() -> _SQLite_Execute() 25.05.06 Changed _SQLite_FetchData() Binary Mode 26.05.06 Removed _SQLite_GlobalRecover() out-of-memory recovery is automatic since SQLite 3.3.0 26.05.06 Changed @error Values & Improved error catching (see Function headers) 31.05.06 jpm's Nice @error values setting 04.06.06 Inline SQLite3.dll 08.06.06 Changed _SQLite_Exec(), _SQLite_GetTable2d(), _SQLite_GetTable() Removed '$sErrorMsg' parameter 08.06.06 Removed _SQLite_Execute() because _SQLite_Exec() was the same 08.06.06 Cleaning _SQLite_Startup(). (jpm) 23.09.06 Fixed _SQLite_Exec() Memory Leak on SQL error 23.09.06 Added SQL Error Reporting (only in interpreted mode) 23.09.06 Added _SQLite_Escape() 24.09.06 Changed _SQLite_Escape(), Changed _SQLite_GetTable*() New szString Reading method, Result will no longer be truncated 25.09.06 Fixed Bug in szString read procedure (_SQLite_GetTable*, _SQLite_QuerySingleRow, _SQLite_Escape) 29.09.06 Faster szString Reading, Function Header corrections 29.09.06 Changed _SQLite_Exec() Callback 12.03.07 Changed _SQLite_Query() to use 'sqlite3_prepare_v2' API 16.03.07 Fixed _SQLite_Open() not setting @error, Missing DllClose() in _SQLite_Shutdown(), Stack corruption in szString reading procedure 17.03.07 Improved Error handling/Reporting 08.07.07 Fixed Bug in version comparison procedure 26.10.07 Fixed _SQLite_SQLiteExe() referencing by default ""Extras\\SQLite\\SQlite3.exe"" 23.06.08 Fixed _SQLite_* misuse if _SQLite_Startup() failed 23.01.09 Fixed memory leak on error -> __SQLite_szFree() internal function 01.05.09 Changed _SQLite_*() functions dealing with AutoIt Strings (Unicode string) for queries and results, without ANSI conversion. Note: no point for a Unicode version of _SQLite_SQLiteExe() since the DOS console doesn't handle Unicode. (jchd) 02.05.09 Added _SQLite_Open() accepts a second parameter for read/write/create access mode. (jchd) 04.05.09 Added _SQLite_Open() accepts a third parameter for UTF8/UTF16 encoding mode (Only use at creation time). (jpm) Warn: _SQLite_Open() is using now Filename that are Unicode as SQLite expects. Previous version was sending only Filenames with ASCII characters so previously script can have create valid ASCII filenames no more unreachable. 25.05.09 _SQLite_Startup extra parameter to force UTF8 char on SciTE console with output.code.page=65001. 09.06.09 _SQLite_SaveMode renamed to _SQLite_SafeMode(). 01.06.10 jchd updates ... _SQLite_FetchData, $iCharSize, _SQLite_QuerySingleRow, _SQLite_GetTable2d, _SQLite_Display2DResult. 04.04.10 jchd Fixed _SQLite_Escape 05.04.10 jchd Added _SQLite_FastEscape & _SQLite_FastEncode. 06.04.10 jchd Updated _SQLite_GetTable.. optimization 20.04.10 _SQLite_Startup() use FTP download instead of SQLite.dll.au3 05.06.10 jchd Fixed _SQLite_Fetch_Data by forcing binary retrieval of BLOB items. This fixes _SQLite_GetTable[2d] for blobs as well. 05.08.10 Added _SQLite_Startup() can download maintenance version as 3.7.0.1. 20.09.11 Valik Fixed SQLite library needs to support a user-defined callback for diagnostic messages instead of hard-coding ConsoleWrite(). 06.02.12 Fixed _SQLite_Startup() download error checking. 08.11.13 Fixed running in X64 mode 08.11.13 Fixed _SQLite_Startup() parameter checking and doc 30.12.13 Changed Now using first class objects instead of Call(). 04.02.14 Added _SQLite_SQLiteExe() download sqlite3.exe if needed. 05.04.14 Added __SQLite_Download_SQLite3File() download sqlite3.exe or sqlite3.dll if needed. 08.04.14 Fixed __SQLite_Download_SQLite3File() when running in Admin mode. 11.09.15 Fixed _SQLite_Startup() No Download, search dll in @LocalAppDataDir & ""\\AutoIt v3\\SQLite"" if needed. #comments-end ; #FUNCTION# ==================================================================================================================== ; Author ........: piccaso (Fida Florian) ; Modified.......: jpm ; =============================================================================================================================== Func _SQLite_Startup($sDll_Filename = """", $bUTF8ErrorMsg = False, $iForceLocal = 0, $hPrintCallback = $__g_hPrintCallback_SQLite) If $sDll_Filename = Default Or $sDll_Filename = -1 Then $sDll_Filename = """" ; The $hPrintCallback parameter may look strange to assign it to $__g_hPrintCallback_SQLite as ; a default. This is done so that $__g_hPrintCallback_SQLite can be pre-initialized with the internal ; callback in a single place in case that callback changes. If the user overrides it then ; that value becomes the new default. An empty string will suppress any display. If $hPrintCallback = Default Then $hPrintCallback = __SQLite_ConsoleWrite $__g_hPrintCallback_SQLite = $hPrintCallback If $bUTF8ErrorMsg = Default Then $bUTF8ErrorMsg = False $__g_bUTF8ErrorMsg_SQLite = $bUTF8ErrorMsg Local $sDll_Dirname = """" If $sDll_Filename = """" Then $sDll_Filename = ""sqlite3.dll"" If @AutoItX64 And (StringInStr($sDll_Filename, ""_x64"") = 0) Then $sDll_Filename = StringReplace($sDll_Filename, "".dll"", ""_x64.dll"") Local $iExt = 0 If $iForceLocal < 1 Then Local $bDownloadDLL = True Local $vInlineVersion = Call('__SQLite_Inline_Version') If @error Then $bDownloadDLL = False ; no valid SQLite version define so invalidate download If $iForceLocal = 0 Then ; check SQLite version if local file exists If __SQLite_VersCmp(@ScriptDir & ""\\"" & $sDll_Filename, $vInlineVersion) = $SQLITE_OK Then $sDll_Dirname = @ScriptDir & ""\\"" $bDownloadDLL = False ElseIf __SQLite_VersCmp(@SystemDir & ""\\"" & $sDll_Filename, $vInlineVersion) = $SQLITE_OK Then $sDll_Dirname = @SystemDir & ""\\"" $bDownloadDLL = False ElseIf __SQLite_VersCmp(@WindowsDir & ""\\"" & $sDll_Filename, $vInlineVersion) = $SQLITE_OK Then $sDll_Dirname = @WindowsDir & ""\\"" $bDownloadDLL = False ElseIf __SQLite_VersCmp(@WorkingDir & ""\\"" & $sDll_Filename, $vInlineVersion) = $SQLITE_OK Then $sDll_Dirname = @WorkingDir & ""\\"" $bDownloadDLL = False Else $sDll_Filename = StringReplace($sDll_Filename, "".dll"", """") & ""_"" & $vInlineVersion & "".dll"" If __SQLite_VersCmp(@ScriptDir & ""\\"" & $sDll_Filename, $vInlineVersion) = $SQLITE_OK Then $sDll_Dirname = @ScriptDir & ""\\"" $bDownloadDLL = False ElseIf __SQLite_VersCmp(@SystemDir & ""\\"" & $sDll_Filename, $vInlineVersion) = $SQLITE_OK Then $sDll_Dirname = @SystemDir & ""\\"" $bDownloadDLL = False ElseIf __SQLite_VersCmp(@WindowsDir & ""\\"" & $sDll_Filename, $vInlineVersion) = $SQLITE_OK Then $sDll_Dirname = @WindowsDir & ""\\"" $bDownloadDLL = False ElseIf __SQLite_VersCmp(@WorkingDir & ""\\"" & $sDll_Filename, $vInlineVersion) = $SQLITE_OK Then $sDll_Dirname = @WorkingDir & ""\\"" $bDownloadDLL = False EndIf EndIf EndIf If $bDownloadDLL Then If Not FileExists($sDll_Dirname & $sDll_Filename) Then ; Create in @LocalAppDataDir & ""\\AutoIt v3\\"" to avoid reloading (only valid for the current user) $sDll_Dirname = @LocalAppDataDir & ""\\AutoIt v3\\SQLite"" EndIf If $iForceLocal Then ; download the latest version. Usely related with internal testing. $vInlineVersion = """" Else ; download the version related with the include version $vInlineVersion = ""_"" & $vInlineVersion $iExt = 1 EndIf $sDll_Filename = $sDll_Dirname & ""\\"" & StringReplace($sDll_Filename, "".dll"", """") & $vInlineVersion & "".dll"" ;~ $sDll_Filename = __SQLite_Download_SQLite3File($sDll_Dirname, StringReplace($sDll_Filename, "".dll"", """"), $vInlineVersion, "".dll"") ;~ If @error Then Return SetError(@error, @extended, """") ; download not successful ;~ $iExt = @extended EndIf EndIf ;~ If Not FileExists($sDll_Filename) Then Then Return SetError(2, 0, """") ; File not found Local $hDll = DllOpen($sDll_Filename) If $hDll = -1 Then $__g_hDll_SQLite = 0 Return SetError(1, $iExt, """") Else $__g_hDll_SQLite = $hDll Return SetExtended($iExt, $sDll_Filename) EndIf EndFunc ;==>_SQLite_Startup ; #FUNCTION# ==================================================================================================================== ; Author ........: piccaso (Fida Florian) ; =============================================================================================================================== Func _SQLite_Shutdown() If $__g_hDll_SQLite > 0 Then DllClose($__g_hDll_SQLite) $__g_hDll_SQLite = 0 If $__g_hMsvcrtDll_SQLite > 0 Then DllClose($__g_hMsvcrtDll_SQLite) $__g_hMsvcrtDll_SQLite = 0 EndFunc ;==>_SQLite_Shutdown ; #FUNCTION# ==================================================================================================================== ; Author ........: piccaso (Fida Florian) ; Modified.......: jchd, jpm ; =============================================================================================================================== Func _SQLite_Open($sDatabase_Filename = Default, $iAccessMode = Default, $iEncoding = Default) If Not $__g_hDll_SQLite Then Return SetError(3, $SQLITE_MISUSE, 0) If $sDatabase_Filename = Default Or Not IsString($sDatabase_Filename) Then $sDatabase_Filename = "":memory:"" Local $tFilename = __SQLite_StringToUtf8Struct($sDatabase_Filename) If @error Then Return SetError(2, @error, 0) If $iAccessMode = Default Then $iAccessMode = BitOR($SQLITE_OPEN_READWRITE, $SQLITE_OPEN_CREATE) Local $bOldBase = FileExists($sDatabase_Filename) ; encoding cannot be changed if base already exists If $iEncoding = Default Then $iEncoding = $SQLITE_ENCODING_UTF8 EndIf Local $avRval = DllCall($__g_hDll_SQLite, ""int:cdecl"", ""sqlite3_open_v2"", ""struct*"", $tFilename, _ ; UTF-8 Database filename ""ptr*"", 0, _ ; OUT: SQLite db handle ""int"", $iAccessMode, _ ; database access mode ""ptr"", 0) If @error Then Return SetError(1, @error, 0) ; DllCall error If $avRval[0] <> $SQLITE_OK Then __SQLite_ReportError($avRval[2], ""_SQLite_Open"") _SQLite_Close($avRval[2]) Return SetError(-1, $avRval[0], 0) EndIf $__g_hDB_SQLite = $avRval[2] __SQLite_hAdd($__g_ahDBs_SQLite, $avRval[2]) If Not $bOldBase Then Local $aEncoding[3] = [""8"", ""16"", ""16be""] _SQLite_Exec($avRval[2], 'PRAGMA encoding=""UTF-' & $aEncoding[$iEncoding] & '"";') EndIf Return SetExtended($avRval[0], $avRval[2]) EndFunc ;==>_SQLite_Open ; #FUNCTION# ==================================================================================================================== ; Author ........: piccaso (Fida Florian) ; Modified.......: jchd ; =============================================================================================================================== Func _SQLite_GetTable($hDB, $sSQL, ByRef $aResult, ByRef $iRows, ByRef $iColumns, $iCharSize = -1) $aResult = '' If __SQLite_hChk($hDB, 1) Then Return SetError(@error, 0, $SQLITE_MISUSE) If $iCharSize = """" Or $iCharSize < 1 Or $iCharSize = Default Then $iCharSize = -1 ; see comments in _SQLite_GetTable2d Local $hQuery Local $r = _SQLite_Query($hDB, $sSQL, $hQuery) If @error Then Return SetError(2, @error, $r) ; we need column count and names Local $aDataRow $r = _SQLite_FetchNames($hQuery, $aDataRow) Local $iError = @error If $iError Then _SQLite_QueryFinalize($hQuery) Return SetError(3, $iError, $r) EndIf $iColumns = UBound($aDataRow) Local Const $iRowsIncr = 64 ; initially allocate 64 datarows then grow by 4/3 of row count $iRows = 0 ; actual number of data rows Local $iAllocRows = $iRowsIncr ; number of allocated data rows Dim $aResult[($iAllocRows + 1) * $iColumns + 1] For $idx = 0 To $iColumns - 1 If $iCharSize > 0 Then $aDataRow[$idx] = StringLeft($aDataRow[$idx], $iCharSize) EndIf $aResult[$idx + 1] = $aDataRow[$idx] Next While 1 $r = _SQLite_FetchData($hQuery, $aDataRow, 0, 0, $iColumns) $iError = @error Switch $r Case $SQLITE_OK $iRows += 1 If $iRows = $iAllocRows Then $iAllocRows = Round($iAllocRows * 4 / 3) ReDim $aResult[($iAllocRows + 1) * $iColumns + 1] EndIf For $j = 0 To $iColumns - 1 If $iCharSize > 0 Then $aDataRow[$j] = StringLeft($aDataRow[$j], $iCharSize) EndIf $idx += 1 $aResult[$idx] = $aDataRow[$j] Next Case $SQLITE_DONE ExitLoop Case Else $aResult = '' _SQLite_QueryFinalize($hQuery) Return SetError(4, $iError, $r) EndSwitch WEnd $aResult[0] = ($iRows + 1) * $iColumns ReDim $aResult[$aResult[0] + 1] Return ($SQLITE_OK) EndFunc ;==>_SQLite_GetTable ; #FUNCTION# ==================================================================================================================== ; Author ........: piccaso (Fida Florian) ; Modified.......: jchd ; =============================================================================================================================== Func _SQLite_Exec($hDB, $sSQL, $sCallBack = """") If __SQLite_hChk($hDB, 2) Then Return SetError(@error, 0, $SQLITE_MISUSE) If $sCallBack <> """" Then Local $iRows, $iColumns Local $aResult = ""SQLITE_CALLBACK:"" & $sCallBack Local $iRval = _SQLite_GetTable2d($hDB, $sSQL, $aResult, $iRows, $iColumns) If @error Then Return SetError(3, @error, $iRval) Return $iRval EndIf Local $tSQL8 = __SQLite_StringToUtf8Struct($sSQL) If @error Then Return SetError(4, @error, 0) Local $avRval = DllCall($__g_hDll_SQLite, ""int:cdecl"", ""sqlite3_exec"", _ ""ptr"", $hDB, _ ; An open database ""struct*"", $tSQL8, _ ; SQL to be executed ""ptr"", 0, _ ; Callback function ""ptr"", 0, _ ; 1st argument to callback function ""ptr*"", 0) ; Error msg written here If @error Then Return SetError(1, @error, $SQLITE_MISUSE) ; DllCall error __SQLite_szFree($avRval[5]) ; free error message If $avRval[0] <> $SQLITE_OK Then __SQLite_ReportError($hDB, ""_SQLite_Exec"", $sSQL) SetError(-1) EndIf Return $avRval[0] EndFunc ;==>_SQLite_Exec ; #FUNCTION# ==================================================================================================================== ; Author ........: piccaso (Fida Florian) ; =============================================================================================================================== Func _SQLite_LibVersion() If $__g_hDll_SQLite = 0 Then Return SetError(1, $SQLITE_MISUSE, 0) Local $r = DllCall($__g_hDll_SQLite, ""str:cdecl"", ""sqlite3_libversion"") If @error Then Return SetError(1, @error, 0) ; DllCall error Return $r[0] EndFunc ;==>_SQLite_LibVersion ; #FUNCTION# ==================================================================================================================== ; Author ........: piccaso (Fida Florian) ; =============================================================================================================================== Func _SQLite_LastInsertRowID($hDB = -1) If __SQLite_hChk($hDB, 2) Then Return SetError(@error, @extended, 0) Local $r = DllCall($__g_hDll_SQLite, ""long:cdecl"", ""sqlite3_last_insert_rowid"", ""ptr"", $hDB) If @error Then Return SetError(1, @error, 0) ; DllCall error Return $r[0] EndFunc ;==>_SQLite_LastInsertRowID ; #FUNCTION# ==================================================================================================================== ; Author ........: piccaso (Fida Florian) ; =============================================================================================================================== Func _SQLite_Changes($hDB = -1) If __SQLite_hChk($hDB, 2) Then Return SetError(@error, @extended, 0) Local $r = DllCall($__g_hDll_SQLite, ""long:cdecl"", ""sqlite3_changes"", ""ptr"", $hDB) If @error Then Return SetError(1, @error, 0) ; DllCall error Return $r[0] EndFunc ;==>_SQLite_Changes ; #FUNCTION# ==================================================================================================================== ; Author ........: piccaso (Fida Florian) ; =============================================================================================================================== Func _SQLite_TotalChanges($hDB = -1) If __SQLite_hChk($hDB, 2) Then Return SetError(@error, @extended, 0) Local $r = DllCall($__g_hDll_SQLite, ""long:cdecl"", ""sqlite3_total_changes"", ""ptr"", $hDB) If @error Then Return SetError(1, @error, 0) ; DllCall error Return $r[0] EndFunc ;==>_SQLite_TotalChanges ; #FUNCTION# ==================================================================================================================== ; Author ........: piccaso (Fida Florian) ; =============================================================================================================================== Func _SQLite_ErrCode($hDB = -1) If __SQLite_hChk($hDB, 2) Then Return SetError(@error, 0, $SQLITE_MISUSE) Local $r = DllCall($__g_hDll_SQLite, ""long:cdecl"", ""sqlite3_errcode"", ""ptr"", $hDB) If @error Then Return SetError(1, @error, $SQLITE_MISUSE) ; DllCall error Return $r[0] EndFunc ;==>_SQLite_ErrCode ; #FUNCTION# ==================================================================================================================== ; Author ........: piccaso (Fida Florian) ; Modified.......: jchd ; =============================================================================================================================== Func _SQLite_ErrMsg($hDB = -1) If __SQLite_hChk($hDB, 2) Then Return SetError(@error, @extended, ""Library used incorrectly"") Local $r = DllCall($__g_hDll_SQLite, ""wstr:cdecl"", ""sqlite3_errmsg16"", ""ptr"", $hDB) If @error Then __SQLite_ReportError($hDB, ""_SQLite_ErrMsg"", Default, ""Call Failed"") Return SetError(1, @error, ""Library used incorrectly"") ; DllCall error EndIf Return $r[0] EndFunc ;==>_SQLite_ErrMsg ; #FUNCTION# ==================================================================================================================== ; Author ........: piccaso (Fida Florian) ; Modified.......: jchd ; =============================================================================================================================== Func _SQLite_Display2DResult($aResult, $iCellWidth = 0, $bReturn = False) If Not IsArray($aResult) Or UBound($aResult, $UBOUND_DIMENSIONS) <> 2 Or $iCellWidth < 0 Then Return SetError(1, 0, """") Local $aiCellWidth If $iCellWidth = 0 Or $iCellWidth = Default Then Local $iCellWidthMax Dim $aiCellWidth[UBound($aResult, $UBOUND_COLUMNS)] For $iRow = 0 To UBound($aResult, $UBOUND_ROWS) - 1 For $iCol = 0 To UBound($aResult, $UBOUND_COLUMNS) - 1 $iCellWidthMax = StringLen($aResult[$iRow][$iCol]) If $iCellWidthMax > $aiCellWidth[$iCol] Then $aiCellWidth[$iCol] = $iCellWidthMax EndIf Next Next EndIf Local $sOut = """", $iCellWidthUsed For $iRow = 0 To UBound($aResult, $UBOUND_ROWS) - 1 For $iCol = 0 To UBound($aResult, $UBOUND_COLUMNS) - 1 If $iCellWidth = 0 Then $iCellWidthUsed = $aiCellWidth[$iCol] Else $iCellWidthUsed = $iCellWidth EndIf $sOut &= StringFormat("" %-"" & $iCellWidthUsed & ""."" & $iCellWidthUsed & ""s "", $aResult[$iRow][$iCol]) Next $sOut &= @CRLF If Not $bReturn Then __SQLite_Print($sOut) $sOut = """" EndIf Next If $bReturn Then Return $sOut EndFunc ;==>_SQLite_Display2DResult ; #FUNCTION# ==================================================================================================================== ; Author ........: piccaso (Fida Florian), blink314 ; Modified.......: jchd ; =============================================================================================================================== Func _SQLite_GetTable2d($hDB, $sSQL, ByRef $aResult, ByRef $iRows, ByRef $iColumns, $iCharSize = -1, $bSwichDimensions = False) If __SQLite_hChk($hDB, 1) Then Return SetError(@error, 0, $SQLITE_MISUSE) If $iCharSize = """" Or $iCharSize < 1 Or $iCharSize = Default Then $iCharSize = -1 Local $sCallBack = """", $bCallBack = False If IsString($aResult) Then If StringLeft($aResult, 16) = ""SQLITE_CALLBACK:"" Then $sCallBack = StringTrimLeft($aResult, 16) $bCallBack = True EndIf EndIf $aResult = '' If $bSwichDimensions = Default Then $bSwichDimensions = False Local $hQuery Local $r = _SQLite_Query($hDB, $sSQL, $hQuery) If @error Then Return SetError(2, @error, $r) If $r <> $SQLITE_OK Then __SQLite_ReportError($hDB, ""_SQLite_GetTable2d"", $sSQL) _SQLite_QueryFinalize($hQuery) Return SetError(-1, 0, $r) EndIf $iRows = 0 Local $iRval_Step, $iError While True $iRval_Step = DllCall($__g_hDll_SQLite, ""int:cdecl"", ""sqlite3_step"", ""ptr"", $hQuery) If @error Then $iError = @error _SQLite_QueryFinalize($hQuery) Return SetError(3, $iError, $SQLITE_MISUSE) ; DllCall error EndIf Switch $iRval_Step[0] Case $SQLITE_ROW $iRows += 1 Case $SQLITE_DONE ExitLoop Case Else _SQLite_QueryFinalize($hQuery) Return SetError(3, $iError, $iRval_Step[0]) EndSwitch WEnd Local $iRet = _SQLite_QueryReset($hQuery) If @error Then $iError = @error _SQLite_QueryFinalize($hQuery) Return SetError(4, $iError, $iRet) EndIf Local $aDataRow $r = _SQLite_FetchNames($hQuery, $aDataRow) If @error Then $iError = @error _SQLite_QueryFinalize($hQuery) Return SetError(5, $iError, $r) EndIf $iColumns = UBound($aDataRow) If $iColumns <= 0 Then _SQLite_QueryFinalize($hQuery) Return SetError(-1, 0, $SQLITE_DONE) EndIf If Not $bCallBack Then If $bSwichDimensions Then Dim $aResult[$iColumns][$iRows + 1] For $i = 0 To $iColumns - 1 If $iCharSize > 0 Then $aDataRow[$i] = StringLeft($aDataRow[$i], $iCharSize) EndIf $aResult[$i][0] = $aDataRow[$i] Next Else Dim $aResult[$iRows + 1][$iColumns] For $i = 0 To $iColumns - 1 If $iCharSize > 0 Then $aDataRow[$i] = StringLeft($aDataRow[$i], $iCharSize) EndIf $aResult[0][$i] = $aDataRow[$i] Next EndIf Else Local $iCbRval $iCbRval = Call($sCallBack, $aDataRow) If $iCbRval = $SQLITE_ABORT Or $iCbRval = $SQLITE_INTERRUPT Or @error Then $iError = @error _SQLite_QueryFinalize($hQuery) Return SetError(7, $iError, $iCbRval) EndIf EndIf If $iRows > 0 Then For $i = 1 To $iRows $r = _SQLite_FetchData($hQuery, $aDataRow, 0, 0, $iColumns) If @error Then $iError = @error _SQLite_QueryFinalize($hQuery) Return SetError(6, $iError, $r) EndIf If $bCallBack Then $iCbRval = Call($sCallBack, $aDataRow) If $iCbRval = $SQLITE_ABORT Or $iCbRval = $SQLITE_INTERRUPT Or @error Then $iError = @error _SQLite_QueryFinalize($hQuery) Return SetError(7, $iError, $iCbRval) EndIf Else For $j = 0 To $iColumns - 1 If $iCharSize > 0 Then $aDataRow[$j] = StringLeft($aDataRow[$j], $iCharSize) EndIf If $bSwichDimensions Then $aResult[$j][$i] = $aDataRow[$j] Else $aResult[$i][$j] = $aDataRow[$j] EndIf Next EndIf Next EndIf Return (_SQLite_QueryFinalize($hQuery)) EndFunc ;==>_SQLite_GetTable2d ; #FUNCTION# ==================================================================================================================== ; Author ........: piccaso (Fida Florian) ; =============================================================================================================================== Func _SQLite_SetTimeout($hDB = -1, $iTimeout = 1000) If __SQLite_hChk($hDB, 2) Then Return SetError(@error, 0, $SQLITE_MISUSE) If $iTimeout = Default Then $iTimeout = 1000 Local $avRval = DllCall($__g_hDll_SQLite, ""int:cdecl"", ""sqlite3_busy_timeout"", ""ptr"", $hDB, ""int"", $iTimeout) If @error Then Return SetError(1, @error, $SQLITE_MISUSE) ; DllCall error If $avRval[0] <> $SQLITE_OK Then SetError(-1) Return $avRval[0] EndFunc ;==>_SQLite_SetTimeout ; #FUNCTION# ==================================================================================================================== ; Author ........: piccaso (Fida Florian) ; Modified.......: jchd ; =============================================================================================================================== Func _SQLite_Query($hDB, $sSQL, ByRef $hQuery) If __SQLite_hChk($hDB, 2) Then Return SetError(@error, 0, $SQLITE_MISUSE) Local $iRval = DllCall($__g_hDll_SQLite, ""int:cdecl"", ""sqlite3_prepare16_v2"", _ ""ptr"", $hDB, _ ""wstr"", $sSQL, _ ""int"", -1, _ ""ptr*"", 0, _ ; OUT: Statement handle ""ptr*"", 0) ; OUT: Pointer to unused portion of zSql If @error Then Return SetError(1, @error, $SQLITE_MISUSE) ; DllCall error If $iRval[0] <> $SQLITE_OK Then __SQLite_ReportError($hDB, ""_SQLite_Query"", $sSQL) Return SetError(-1, 0, $iRval[0]) EndIf $hQuery = $iRval[4] __SQLite_hAdd($__g_ahQuerys_SQLite, $iRval[4]) Return $iRval[0] EndFunc ;==>_SQLite_Query ; #FUNCTION# ==================================================================================================================== ; Author ........: piccaso (Fida Florian) ; Modified.......: jchd ; =============================================================================================================================== Func _SQLite_FetchData($hQuery, ByRef $aRow, $bBinary = False, $bDoNotFinalize = False, $iColumns = 0) Dim $aRow[1] If __SQLite_hChk($hQuery, 7, False) Then Return SetError(@error, 0, $SQLITE_MISUSE) If $bBinary = Default Then $bBinary = False If $bDoNotFinalize = Default Then $bDoNotFinalize = False Local $iRval_Step = DllCall($__g_hDll_SQLite, ""int:cdecl"", ""sqlite3_step"", ""ptr"", $hQuery) If @error Then Return SetError(1, @error, $SQLITE_MISUSE) ; DllCall error If $iRval_Step[0] <> $SQLITE_ROW Then If $bDoNotFinalize = False And $iRval_Step[0] = $SQLITE_DONE Then _SQLite_QueryFinalize($hQuery) EndIf Return SetError(-1, 0, $iRval_Step[0]) EndIf If Not $iColumns Then Local $iRval_ColCnt = DllCall($__g_hDll_SQLite, ""int:cdecl"", ""sqlite3_data_count"", ""ptr"", $hQuery) If @error Then Return SetError(2, @error, $SQLITE_MISUSE) ; DllCall error If $iRval_ColCnt[0] <= 0 Then Return SetError(-1, 0, $SQLITE_DONE) $iColumns = $iRval_ColCnt[0] EndIf ReDim $aRow[$iColumns] For $i = 0 To $iColumns - 1 Local $iRval_coltype = DllCall($__g_hDll_SQLite, ""int:cdecl"", ""sqlite3_column_type"", ""ptr"", $hQuery, ""int"", $i) If @error Then Return SetError(4, @error, $SQLITE_MISUSE) ; DllCall error If $iRval_coltype[0] = $SQLITE_TYPE_NULL Then $aRow[$i] = """" ContinueLoop EndIf If (Not $bBinary) And ($iRval_coltype[0] <> $SQLITE_TYPE_BLOB) Then Local $sRval = DllCall($__g_hDll_SQLite, ""wstr:cdecl"", ""sqlite3_column_text16"", ""ptr"", $hQuery, ""int"", $i) If @error Then Return SetError(3, @error, $SQLITE_MISUSE) ; DllCall error $aRow[$i] = $sRval[0] Else Local $vResult = DllCall($__g_hDll_SQLite, ""ptr:cdecl"", ""sqlite3_column_blob"", ""ptr"", $hQuery, ""int"", $i) If @error Then Return SetError(6, @error, $SQLITE_MISUSE) ; DllCall error Local $iColBytes = DllCall($__g_hDll_SQLite, ""int:cdecl"", ""sqlite3_column_bytes"", ""ptr"", $hQuery, ""int"", $i) If @error Then Return SetError(5, @error, $SQLITE_MISUSE) ; DllCall error Local $tResultStruct = DllStructCreate(""byte["" & $iColBytes[0] & ""]"", $vResult[0]) $aRow[$i] = Binary(DllStructGetData($tResultStruct, 1)) EndIf Next Return $SQLITE_OK EndFunc ;==>_SQLite_FetchData ; #FUNCTION# ==================================================================================================================== ; Author ........: piccaso (Fida Florian) ; =============================================================================================================================== Func _SQLite_Close($hDB = -1) If __SQLite_hChk($hDB, 2) Then Return SetError(@error, 0, $SQLITE_MISUSE) Local $iRval = DllCall($__g_hDll_SQLite, ""int:cdecl"", ""sqlite3_close"", ""ptr"", $hDB) ; An open database If @error Then Return SetError(1, @error, $SQLITE_MISUSE) ; DllCall error If $iRval[0] <> $SQLITE_OK Then __SQLite_ReportError($hDB, ""_SQLite_Close"") Return SetError(-1, 0, $iRval[0]) EndIf $__g_hDB_SQLite = 0 __SQLite_hDel($__g_ahDBs_SQLite, $hDB) Return $iRval[0] EndFunc ;==>_SQLite_Close ; #FUNCTION# ==================================================================================================================== ; Author ........: piccaso (Fida Florian) ; =============================================================================================================================== Func _SQLite_SafeMode($bSafeModeState) $__g_bSafeModeState_SQLite = ($bSafeModeState = True) Return $SQLITE_OK EndFunc ;==>_SQLite_SafeMode ; #FUNCTION# ==================================================================================================================== ; Author ........: piccaso (Fida Florian) ; =============================================================================================================================== Func _SQLite_QueryFinalize($hQuery) If __SQLite_hChk($hQuery, 2, False) Then Return SetError(@error, 0, $SQLITE_MISUSE) Local $avRval = DllCall($__g_hDll_SQLite, ""int:cdecl"", ""sqlite3_finalize"", ""ptr"", $hQuery) If @error Then Return SetError(1, @error, $SQLITE_MISUSE) ; DllCall error __SQLite_hDel($__g_ahQuerys_SQLite, $hQuery) If $avRval[0] <> $SQLITE_OK Then SetError(-1) Return $avRval[0] EndFunc ;==>_SQLite_QueryFinalize ; #FUNCTION# ==================================================================================================================== ; Author ........: piccaso (Fida Florian) ; =============================================================================================================================== Func _SQLite_QueryReset($hQuery) If __SQLite_hChk($hQuery, 2, False) Then Return SetError(@error, 0, $SQLITE_MISUSE) Local $avRval = DllCall($__g_hDll_SQLite, ""int:cdecl"", ""sqlite3_reset"", ""ptr"", $hQuery) If @error Then Return SetError(1, @error, $SQLITE_MISUSE) ; DllCall error If $avRval[0] <> $SQLITE_OK Then SetError(-1) Return $avRval[0] EndFunc ;==>_SQLite_QueryReset ; #FUNCTION# ==================================================================================================================== ; Author ........: piccaso (Fida Florian) ; Modified.......: jchd ; =============================================================================================================================== Func _SQLite_FetchNames($hQuery, ByRef $aNames) Dim $aNames[1] If __SQLite_hChk($hQuery, 3, False) Then Return SetError(@error, 0, $SQLITE_MISUSE) Local $avDataCnt = DllCall($__g_hDll_SQLite, ""int:cdecl"", ""sqlite3_column_count"", ""ptr"", $hQuery) If @error Then Return SetError(1, @error, $SQLITE_MISUSE) ; DllCall error If $avDataCnt[0] <= 0 Then Return SetError(-1, 0, $SQLITE_DONE) ReDim $aNames[$avDataCnt[0]] Local $avColName For $iCnt = 0 To $avDataCnt[0] - 1 $avColName = DllCall($__g_hDll_SQLite, ""wstr:cdecl"", ""sqlite3_column_name16"", ""ptr"", $hQuery, ""int"", $iCnt) If @error Then Return SetError(2, @error, $SQLITE_MISUSE) ; DllCall error $aNames[$iCnt] = $avColName[0] Next Return $SQLITE_OK EndFunc ;==>_SQLite_FetchNames ; #FUNCTION# ==================================================================================================================== ; Author ........: piccaso (Fida Florian), jchd ; =============================================================================================================================== Func _SQLite_QuerySingleRow($hDB, $sSQL, ByRef $aRow) $aRow = '' If __SQLite_hChk($hDB, 2) Then Return SetError(@error, 0, $SQLITE_MISUSE) Local $hQuery Local $iRval = _SQLite_Query($hDB, $sSQL, $hQuery) If @error Then _SQLite_QueryFinalize($hQuery) Return SetError(1, 0, $iRval) Else $iRval = _SQLite_FetchData($hQuery, $aRow) If $iRval = $SQLITE_OK Then _SQLite_QueryFinalize($hQuery) If @error Then Return SetError(4, 0, $iRval) Else Return $SQLITE_OK EndIf Else _SQLite_QueryFinalize($hQuery) Return SetError(3, 0, $iRval) EndIf EndIf EndFunc ;==>_SQLite_QuerySingleRow ; #FUNCTION# ==================================================================================================================== ; Author ........: piccaso (Fida Florian) ; =============================================================================================================================== Func _SQLite_SQLiteExe($sDatabaseFile, $sInput, ByRef $sOutput, $sSQLiteExeFilename = ""sqlite3.exe"", $bDebug = False) If $sSQLiteExeFilename = -1 Or $sSQLiteExeFilename = Default Then $sSQLiteExeFilename = ""sqlite3.exe"" If Not FileExists($sSQLiteExeFilename) Then Local $sInlineVersion = ""_"" & Call('__SQLite_Inline_Version') If @error Then $sInlineVersion = """" ; no valid SQLite version define so use any version $sSQLiteExeFilename = StringReplace($sSQLiteExeFilename, "".exe"", """") & $sInlineVersion & "".exe"" If Not FileExists($sSQLiteExeFilename) Then Return SetError(2, 0, $SQLITE_MISUSE) ; Can't Found sqlite3.exe ;~ $sSQLiteExeFilename = __SQLite_Download_SQLite3File($sSQLiteExe_FilePath, ""sqlite3"", $sInlineVersion, "".exe"") ;~ If @error Then Return SetError(2, 0, $SQLITE_MISUSE) ; Can't Found sqlite3.exe ;~ If StringInStr($sSQLiteExeFilename, ""\\"") = 0 Then $sSQLiteExeFilename = $sSQLiteExe_FilePath & $sSQLiteExeFilename EndIf EndIf If Not FileExists($sDatabaseFile) Then Local $hNewFile = FileOpen($sDatabaseFile, $FO_OVERWRITE + $FO_CREATEPATH) If $hNewFile = -1 Then Return SetError(1, 0, $SQLITE_CANTOPEN) ; Can't Create new Database EndIf FileClose($hNewFile) EndIf Local $sInputFile = _TempFile(), $sOutputFile = _TempFile(), $iRval = $SQLITE_OK Local $hInputFile = FileOpen($sInputFile, $FO_OVERWRITE) If $hInputFile > -1 Then $sInput = "".output stdout"" & @CRLF & $sInput FileWrite($hInputFile, $sInput) FileClose($hInputFile) Local $sCmd = @ComSpec & "" /c "" & FileGetShortName($sSQLiteExeFilename) & ' ""' _ & FileGetShortName($sDatabaseFile) _ & '"" > ""' & FileGetShortName($sOutputFile) _ & '"" < ""' & FileGetShortName($sInputFile) & '""' Local $nErrorLevel = RunWait($sCmd, @WorkingDir, @SW_HIDE) If $bDebug = True Then Local $nErrorTemp = @error If @error Then __SQLite_Print('@@ Debug(_SQLite_SQLiteExe) : $sCmd = ' & $sCmd & @CRLF & '>ErrorLevel: ' & $nErrorLevel & @CRLF) SetError($nErrorTemp) EndIf If @error = 1 Or $nErrorLevel = 1 Then $iRval = $SQLITE_MISUSE ; SQLite.exe not found Else $sOutput = FileRead($sOutputFile, FileGetSize($sOutputFile)) If StringInStr($sOutput, ""SQL error:"", $STR_CASESENSE) > 0 Or StringInStr($sOutput, ""Incomplete SQL:"", $STR_CASESENSE) > 0 Then $iRval = $SQLITE_ERROR ; SQL error / Incomplete SQL EndIf Else $iRval = $SQLITE_CANTOPEN ; Can't open Input File EndIf If FileExists($sInputFile) Then FileDelete($sInputFile) Switch $iRval Case $SQLITE_MISUSE SetError(2) Case $SQLITE_ERROR SetError(3) Case $SQLITE_CANTOPEN SetError(4) EndSwitch Return $iRval EndFunc ;==>_SQLite_SQLiteExe ; #FUNCTION# ==================================================================================================================== ; Author ........: piccaso (Fida Florian) ; Modified.......: jchd ; =============================================================================================================================== Func _SQLite_Encode($vData) If IsNumber($vData) Then $vData = String($vData) If Not IsString($vData) And Not IsBinary($vData) Then Return SetError(1, 0, """") Local $vRval = ""X'"" If StringLower(StringLeft($vData, 2)) = ""0x"" And Not IsBinary($vData) Then ; BinaryString would mess this up... For $iCnt = 1 To StringLen($vData) $vRval &= Hex(Asc(StringMid($vData, $iCnt, 1)), 2) Next Else ; BinaryString is Faster If Not IsBinary($vData) Then $vData = StringToBinary($vData, 4) $vRval &= Hex($vData) EndIf $vRval &= ""'"" Return $vRval EndFunc ;==>_SQLite_Encode ; #FUNCTION# ==================================================================================================================== ; Author ........: piccaso (Fida Florian) ; Modified.......: jchd ; =============================================================================================================================== Func _SQLite_Escape($sString, $iBuffSize = Default) If $__g_hDll_SQLite = 0 Then Return SetError(1, $SQLITE_MISUSE, """") If IsNumber($sString) Then $sString = String($sString) ; to help number passing common error Local $tSQL8 = __SQLite_StringToUtf8Struct($sString) If @error Then Return SetError(2, @error, 0) Local $aRval = DllCall($__g_hDll_SQLite, ""ptr:cdecl"", ""sqlite3_mprintf"", ""str"", ""'%q'"", ""struct*"", $tSQL8) If @error Then Return SetError(1, @error, """") ; DllCall error If $iBuffSize = Default Or $iBuffSize < 1 Then $iBuffSize = -1 Local $sResult = __SQLite_szStringRead($aRval[0], $iBuffSize) If @error Then Return SetError(3, @error, """") ; DllCall error DllCall($__g_hDll_SQLite, ""none:cdecl"", ""sqlite3_free"", ""ptr"", $aRval[0]) Return $sResult EndFunc ;==>_SQLite_Escape ; #FUNCTION# ==================================================================================================================== ; Author ........: jchd ; =============================================================================================================================== Func _SQLite_FastEncode($vData) If Not IsBinary($vData) Then $vData = Binary($vData) Return ""X'"" & StringTrimLeft($vData, 2) & ""'"" EndFunc ;==>_SQLite_FastEncode ; #FUNCTION# ==================================================================================================================== ; Author ........: jchd ; =============================================================================================================================== Func _SQLite_FastEscape($sString) If IsNumber($sString) Then $sString = String($sString) ; don't raise error if passing a numeric parameter If Not IsString($sString) Then Return SetError(1, 0, """") Return (""'"" & StringReplace($sString, ""'"", ""''"", 0, $STR_CASESENSE) & ""'"") EndFunc ;==>_SQLite_FastEscape #Region SQLite.au3 Internal Functions ; #INTERNAL_USE_ONLY# =========================================================================================================== ; Name...........: __xxx ; Author ........: piccaso (Fida Florian) ; =============================================================================================================================== Func __SQLite_hChk(ByRef $hGeneric, $nError, $bDB = True) If $__g_hDll_SQLite = 0 Then Return SetError(1, $SQLITE_MISUSE, $SQLITE_MISUSE) If $hGeneric = -1 Or $hGeneric = """" Or $hGeneric = Default Then If Not $bDB Then Return SetError($nError, 0, $SQLITE_ERROR) $hGeneric = $__g_hDB_SQLite EndIf If Not $__g_bSafeModeState_SQLite Then Return $SQLITE_OK If $bDB Then If _ArraySearch($__g_ahDBs_SQLite, $hGeneric) > 0 Then Return $SQLITE_OK Else If _ArraySearch($__g_ahQuerys_SQLite, $hGeneric) > 0 Then Return $SQLITE_OK EndIf Return SetError($nError, 0, $SQLITE_ERROR) EndFunc ;==>__SQLite_hChk Func __SQLite_hAdd(ByRef $ahLists, $hGeneric) _ArrayAdd($ahLists, $hGeneric) EndFunc ;==>__SQLite_hAdd Func __SQLite_hDel(ByRef $ahLists, $hGeneric) Local $iElement = _ArraySearch($ahLists, $hGeneric) If $iElement > 0 Then _ArrayDelete($ahLists, $iElement) EndFunc ;==>__SQLite_hDel Func __SQLite_VersCmp($sFile, $sVersion) ; sqlite3_libversion_number cannot be used as it does not contain maintenance number as X.Y.Z.M Local $avRval = DllCall($sFile, ""str:cdecl"", ""sqlite3_libversion"") If @error Then Return $SQLITE_CORRUPT ; Not SQLite3.dll or Not found Local $sFileVersion = StringSplit($avRval[0], ""."") Local $iMaintVersion = 0 If $sFileVersion[0] = 4 Then $iMaintVersion = $sFileVersion[4] $sFileVersion = (($sFileVersion[1] * 1000 + $sFileVersion[2]) * 1000 + $sFileVersion[3]) * 100 + $iMaintVersion If $sVersion < 10000000 Then $sVersion = $sVersion * 100 ; SQLite.dll.au3::__SQLite_Inline_Version() before 3.7.0.1 does not contain maintenance number If $sFileVersion >= $sVersion Then Return $SQLITE_OK ; Version OK Return $SQLITE_MISMATCH ; Version Older EndFunc ;==>__SQLite_VersCmp Func __SQLite_hDbg() __SQLite_Print(""State : "" & $__g_bSafeModeState_SQLite & @CRLF) Local $aTmp = $__g_ahDBs_SQLite For $i = 0 To UBound($aTmp) - 1 __SQLite_Print(""$__g_ahDBs_SQLite -> ["" & $i & ""]"" & $aTmp[$i] & @CRLF) Next $aTmp = $__g_ahQuerys_SQLite For $i = 0 To UBound($aTmp) - 1 __SQLite_Print(""$__g_ahQuerys_SQLite -> ["" & $i & ""]"" & $aTmp[$i] & @CRLF) Next EndFunc ;==>__SQLite_hDbg Func __SQLite_ReportError($hDB, $sFunction, $sQuery = Default, $sError = Default, $vReturnValue = Default, $iCurErr = @error, $iCurExt = @extended) If @Compiled Then Return SetError($iCurErr, $iCurExt) If $sError = Default Then $sError = _SQLite_ErrMsg($hDB) If $sQuery = Default Then $sQuery = """" Local $sOut = ""! SQLite.au3 Error"" & @CRLF $sOut &= ""--> Function: "" & $sFunction & @CRLF If $sQuery <> """" Then $sOut &= ""--> Query: "" & $sQuery & @CRLF $sOut &= ""--> Error: "" & $sError & @CRLF __SQLite_Print($sOut & @CRLF) If Not ($vReturnValue = Default) Then Return SetError($iCurErr, $iCurExt, $vReturnValue) Return SetError($iCurErr, $iCurExt) EndFunc ;==>__SQLite_ReportError Func __SQLite_szStringRead($pPtr, $iMaxLen = -1) If $pPtr = 0 Then Return """" If $__g_hMsvcrtDll_SQLite < 1 Then $__g_hMsvcrtDll_SQLite = DllOpen(""msvcrt.dll"") Local $aStrLen = DllCall($__g_hMsvcrtDll_SQLite, ""ulong_ptr:cdecl"", ""strlen"", ""ptr"", $pPtr) If @error Then Return SetError(1, @error, """") ; DllCall error Local $iLen = $aStrLen[0] + 1 Local $tString = DllStructCreate(""byte["" & $iLen & ""]"", $pPtr) If @error Then Return SetError(2, @error, """") Local $iError = 0 Local $sRtn = __SQLite_Utf8StructToString($tString) If @error Then $iError = 3 EndIf If $iMaxLen <= 0 Then Return SetError($iError, @extended, $sRtn) Else Return SetError($iError, @extended, StringLeft($sRtn, $iMaxLen)) EndIf EndFunc ;==>__SQLite_szStringRead Func __SQLite_szFree($pPtr, $iCurErr = @error) If $pPtr <> 0 Then DllCall($__g_hDll_SQLite, ""none:cdecl"", ""sqlite3_free"", ""ptr"", $pPtr) SetError($iCurErr) EndFunc ;==>__SQLite_szFree ; #INTERNAL_USE_ONLY# =========================================================================================================== ; Name...........: __SQLite_StringToUtf8Struct ; Description ...: UTF-16 to UTF-8 (as struct) conversion ; Syntax.........: __SQLite_StringToUtf8Struct ( $sString ) ; Parameters ....: $sString - String to be converted ; Return values .: Success - Utf8 structure ; Failure - Set @error ; Author ........: jchd ; Modified.......: jpm ; =============================================================================================================================== Func __SQLite_StringToUtf8Struct($sString) Local $aResult = DllCall(""kernel32.dll"", ""int"", ""WideCharToMultiByte"", ""uint"", 65001, ""dword"", 0, ""wstr"", $sString, ""int"", -1, _ ""ptr"", 0, ""int"", 0, ""ptr"", 0, ""ptr"", 0) If @error Then Return SetError(1, @error, """") ; DllCall error Local $tText = DllStructCreate(""char["" & $aResult[0] & ""]"") $aResult = DllCall(""kernel32.dll"", ""int"", ""WideCharToMultiByte"", ""uint"", 65001, ""dword"", 0, ""wstr"", $sString, ""int"", -1, _ ""struct*"", $tText, ""int"", $aResult[0], ""ptr"", 0, ""ptr"", 0) If @error Then Return SetError(2, @error, """") ; DllCall error Return $tText EndFunc ;==>__SQLite_StringToUtf8Struct ; #INTERNAL_USE_ONLY# =========================================================================================================== ; Name...........: __SQLite_Utf8StructToString ; Description ...: UTF-8 (as struct) to UTF-16 conversion ; Syntax.........: __SQLite_Utf8StructToString ( $tText ) ; Parameters ....: $tText - Uft8 Structure ; Return values .: Success - String converted ; Failure - Set @error ; Author ........: jchd ; Modified.......: jpm ; =============================================================================================================================== Func __SQLite_Utf8StructToString($tText) Local $aResult = DllCall(""kernel32.dll"", ""int"", ""MultiByteToWideChar"", ""uint"", 65001, ""dword"", 0, ""struct*"", $tText, ""int"", -1, _ ""ptr"", 0, ""int"", 0) If @error Then Return SetError(1, @error, """") ; DllCall error Local $tWstr = DllStructCreate(""wchar["" & $aResult[0] & ""]"") $aResult = DllCall(""kernel32.dll"", ""int"", ""MultiByteToWideChar"", ""uint"", 65001, ""dword"", 0, ""struct*"", $tText, ""int"", -1, _ ""struct*"", $tWstr, ""int"", $aResult[0]) If @error Then Return SetError(2, @error, """") ; DllCall error Return DllStructGetData($tWstr, 1) EndFunc ;==>__SQLite_Utf8StructToString ; #INTERNAL_USE_ONLY# =========================================================================================================== ; Name...........: __SQLite_ConsoleWrite ; Description ...: write an ANSI or UNICODE String to Console ; Syntax.........: __SQLite_ConsoleWrite ( $sText ) ; Parameters ....: $sText - Unicode String ; Return values .: none ; Author ........: jchd ; Modified.......: jpm ; =============================================================================================================================== Func __SQLite_ConsoleWrite($sText) ConsoleWrite($sText) EndFunc ;==>__SQLite_ConsoleWrite ;~ Func __SQLite_Download_SQLite3File(ByRef $sFilePath, $sFileName, $sVersion, $sFileExt, $iScripLineNumber = @ScriptLineNumber) ;~ Local $sRetFile = $sFileName & $sVersion & $sFileExt ;~ Local $sTempfile = $sFilePath & $sRetFile ;~ If FileExists($sTempfile) Then Return $sTempfile ;~ If Not __SQLite_Download_Confirmation(""Sqlite File Download"") Then Return SetError(-1, 0, """") ;~ If Not FileExists($sFilePath) Then DirCreate($sFilePath) ;~ Local $sURL = ""http://www.autoitscript.com/autoit3/files/beta/autoit/archive/sqlite.new/"" ;~ Local $iInetRet = InetGet($sURL & $sRetFile, $sTempfile, $INET_FORCERELOAD) ;~ Local $iError = @error ;~ If $iError Then __SQLite_Print('@@ Debug(' & $iScripLineNumber & ') : __SQLite_Download_SQLite3File : $URL = ' & $sURL & $sFileName & $sFileExt & @CRLF & @TAB & '$sTempfile = ' & $sTempfile & @CRLF & '>Error: ' & $iError & @CRLF) ;~ Local $sModifiedTime = Call('__SQLite_Inline_Modified') ;~ If Not @error Then FileSetTime($sTempfile, $sModifiedTime, 0) ; update filetime if defined ;~ Return SetError($iError, $iInetRet, $sRetFile) ;~ EndFunc ;==>__SQLite_Download_SQLite3File ;~ Func __SQLite_Download_Confirmation($sTitle) ;~ Local $sTemp = _TempFile(@TempDir, """", """") ;~ Local $aArray = StringRegExp($sTemp, ""^\\h*((?:\\\\\\\\\\?\\\\)*(\\\\\\\\[^\\?\\/\\\\]+|[A-Za-z]:)?(.*[\\/\\\\]\\h*)?((?:[^\\.\\/\\\\]|(?(?=\\.[^\\/\\\\]*\\.)\\.))*)?([^\\/\\\\]*))$"", $STR_REGEXPARRAYMATCH) ;~ Local $s = InputBox($sTitle, ""Please confirm by typing :"" & @lf & @lf & "" "" & $aArray[3] & @lf & @lf & ""It will be dowloaded only on first use"") ;~ If $s == $aArray[3] Then Return True ;~ Return False ;~ EndFunc ;==>__SQLite_Download_Confirmation ; #INTERNAL_USE_ONLY# =========================================================================================================== ; Name...........: __SQLite_Print ; Description ...: Prints an ANSI or UNICODE String to the user-specified callback function. ; Syntax.........: __SQLite_Print ( $sText ) ; Parameters ....: $sText - Unicode String ; Return values .: none ; Author ........: Valik ; =============================================================================================================================== Func __SQLite_Print($sText) ; Don't do anything if there is no callback registered. If IsFunc($__g_hPrintCallback_SQLite) Then If $__g_bUTF8ErrorMsg_SQLite Then ; can be used when sending to application such SciTE configured with output.code.page=65001 Local $tStr8 = __SQLite_StringToUtf8Struct($sText) $__g_hPrintCallback_SQLite(DllStructGetData($tStr8, 1)) Else $__g_hPrintCallback_SQLite($sText) EndIf EndIf EndFunc ;==>__SQLite_Print #EndRegion SQLite.au3 Internal Functions ",16255,True,3105.9941225502457,median "/* * ░█▀▄░█▀▄░▀█▀░█░░░█░░░▀█▀░█▀█░█▀█░▀█▀░░░█▀▄░█▀▀░█▀▀░█░░░█▀█░█░█ * ░█▀▄░█▀▄░░█░░█░░░█░░░░█░░█▀█░█░█░░█░░░░█▀▄░█▀▀░█▀▀░█░░░█░█░█▄█ * ░▀▀░░▀░▀░▀▀▀░▀▀▀░▀▀▀░▀▀▀░▀░▀░▀░▀░░▀░░░░▀░▀░▀▀▀░▀░░░▀▀▀░▀▀▀░▀░▀ * Project: Brilliant Reflow * Code by: Anuradha Gunawardhana * version: v1.0.0 * Date: 2022.01.30 * * Hardware: Display - ST7735(128x160)TFT * Thermocouple Interface - MAX6675 * Microcontroller - STM32F103C8T6 * ST-LINK - CubeProgrammer - https://www.st.com/en/development-tools/stm32cubeprog.html * * Libraries: PID(v1.2.0) by Brett Beauregard : https://github.com/br3ttb/Arduino-PID-Library * Ucglib(v1.5.2) by Oliver: https://github.com/olikraus/ucglib * MAX6675(v1.1.0) by Adafruit: https://github.com/adafruit/MAX6675-library * * Arduino STM32 Boards:(v2.0.0) https://github.com/stm32duino/Arduino_Core_STM32 * * Note: If Ucglib did not compile with the STM32(arm architecture) add the following lines just * after ""Ucglib.h"" line at the begining of the 'Ucglib.cpp'. * * #if defined(__NOP) * #undef __NOP * #endif * #define __NOP __asm volatile (""nop"") * #endif * * You can find the Ucglib.cpp' on; Windows: Documents/Arduino/libraries/Ucglib/src/Ucglib.cpp * Linux: /home/USERNAME/Arduino/libraries/Ucglib/src/Ucglib.cpp * * License: MIT License * * Copyright (c) 2021 Anuradha Gunawardhana * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the ""Software""), to deal * in the Software without restriction, including without limitation the rights * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the Software is * furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all * copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE * SOFTWARE. */ #include #include #include #include ""Ucglib.h"" #include ""max6675.h"" // Unique identifiers for colors #define black 100 #define yellow 101 #define red 102 #define green 103 #define blackOnYellow 201 #define yellowOnBlack 202 #define SSR_out PB8 #define btnDebounceDelay 300 #define btnHoldDelay 1000 #define btnHoldUpdateRate 50 #define tempSampleRate 200 Ucglib_ST7735_18x128x160_HWSPI ucg(PA2, PA4, PA3); MAX6675 thermocouple(PA9, PA8, PA10); bool debug = false; // Show PID output info on the disply when heating bool blinkState = false; bool editSettings = false; bool resetRequest = false; bool saveRequest = false; bool save_pressed = false; bool reset_pressed = false; double default_K_pid[3] = {4, 0.01, 5}; double K_pid[3]={0,0,0}; String pid[3] = {""Kp:"",""Ki:"",""Kd:""}; String pid_[3] = {""P"",""I"",""D""}; bool pidInit = false; double Setpoint, Input, Output; PID myPID(&Input, &Output, &Setpoint, K_pid[0], K_pid[1], K_pid[2], DIRECT); byte p4LastSelect_v = 1; byte p4LastSelect_h = 1; bool backRequest = false; bool startStopRequest = false; bool settingsPageRequest = false; byte request_draw_profile_page = 0; unsigned long lstTempRead = 0; unsigned long lstBlink = 0; float temp = 0; byte tempPos[2] = {94, 52}; bool heating = false; unsigned long lstPlotDraw = 0; float plotTime = 0; float plotDrawRate = 500; // in milliseconds int default_profiles[3][6][2] = {{{25, 0}, {150, 100}, {180, 160}, {240, 200}, {240, 210}, {100, 300}}, // Profile 1 {{25, 0}, {130, 80}, {150, 240}, {230, 300}, {230, 310}, {100, 400}}, // Profile 2 {{25, 0}, {130, 60}, {150, 230}, {240, 290}, {240, 310}, {100, 380}}}; // Profile 3 int profiles[3][6][2]; int maxTemp = 0; int minTemp = 0; int maxTime = 0; const byte main_btn_pos[3][2] = {{70, 20}, {40, 20}, {10, 20}}; const byte main_btn_text_pos[3][2] = {{77, 51}, {47, 51}, {17, 51}}; const String main_btn_labels[3] = {""PROFILE 1"", ""PROFILE 2"", ""PROFILE 3""}; const byte main_btn_height = 25; const byte main_btn_width = 120; byte h_btn_pos[3][2] = {{83, 5}, {83, 56}, {83, 107}}; byte h_btn_text_pos[3][2] = {{87, 17}, {87, 66}, {87, 120}}; String h_btn_labels[3] = {""BACK"", ""START"", ""EDIT""}; byte h_btn_height = 18; byte h_btn_width = 47; volatile byte vertical_pos = 1; volatile byte horizontal_pos = 1; byte page = 0; byte previosPage = 0; volatile unsigned long lstBtnBounce = 0; volatile unsigned long hold_start = 0; unsigned long last_val_change = 0; void setup(void) { pinMode(PB3, INPUT_PULLUP); pinMode(PB4, INPUT_PULLUP); pinMode(PB5, INPUT_PULLUP); pinMode(PB6, INPUT_PULLUP); pinMode(PB7, INPUT_PULLUP); pinMode(PB8, OUTPUT); attachInterrupt(digitalPinToInterrupt(PB3), up, FALLING); attachInterrupt(digitalPinToInterrupt(PB4), center, RISING); attachInterrupt(digitalPinToInterrupt(PB5), right, FALLING); attachInterrupt(digitalPinToInterrupt(PB6), down, FALLING); attachInterrupt(digitalPinToInterrupt(PB7), left, FALLING); ucg.begin(UCG_FONT_MODE_SOLID); ucg.setFontPosBaseline(); ucg.setPrintDir(1); draw_main_page(); // initiate the emulated EEPROM if (!EEPROM_check()) EEPROM_set_default(); EEPROM_get(); // PID Controller Setpoint = 50; temp = thermocouple.readCelsius(); Input = temp; myPID.SetOutputLimits(0, 255); myPID.SetTunings(K_pid[0], K_pid[1], K_pid[2]); } void loop(void) { if (backRequest) { backRequest = false; goBack(); } if (startStopRequest) { startStopRequest = false; startStop(); } if (request_draw_profile_page != 0) { request_draw_profile_page = 0; horizontal_pos = 1; // select the ""BACK"" draw_profile_page(vertical_pos); } if (settingsPageRequest){ settingsPageRequest = false; draw_settings_page(1); } if (resetRequest){ resetRequest = false; EEPROM_set_default(); EEPROM_get(); // get the new save values from the EEPROM default_h_btn_para(); page = previosPage; // setting the correct page draw_settings_page(3); } if (saveRequest){ saveRequest = false; EEPROM_save(); EEPROM_get(); default_h_btn_para(); page = previosPage; // setting the correct page draw_settings_page(2); } if (heating) { // Plot the temperature on the graph if (!pidInit) { pidInit = true; myPID.SetMode(AUTOMATIC); } // Show the real time value of the Temperature setColor(yellowOnBlack); ucg.setFont(ucg_font_6x12_mr); // use 'mr' font to completely fill the background if ((millis() - lstTempRead) > tempSampleRate) { // Read the thermocouple in the set interval temp = thermocouple.readCelsius(); lstTempRead = millis(); } ucg.setPrintPos(tempPos[0], tempPos[1]); ucg.print(String(temp)); if (temp < 100.0){ setColor(black); ucg.drawBox(tempPos[0]+1,tempPos[1]+30,7,5); // to clear the last decimal when going from 100.00 to 99.75 } if ((millis() - lstPlotDraw) > plotDrawRate) { // draw the plot in a set interval plotTime = plotTime + plotDrawRate / 1000; setColor(yellowOnBlack); ucg.setPrintPos(tempPos[0]-10, tempPos[1]); ucg.print(String(plotTime)); float currentTemp = thermocouple.readCelsius(); float T = ((60 * (currentTemp - minTemp)) / (maxTemp - minTemp)) + 10; // height of plot is 60 float t = ((120 * plotTime) / maxTime) + 20; // width of plot is 120 if (T > 70) T = 70; // use constrain(x, a, b) if (T < 11) T = 11; if (t < 21) t = 21; setColor(red); ucg.drawPixel(T, t); // Plot the temperature on the graph if(debug){ ucg.setPrintPos(73,35); ucg.print(""out:""+String(Output)); ucg.setPrintPos(63,35); ucg.print(""set:""+String(Setpoint)); for (byte i=0; i<=2; i++){ ucg.setFont(ucg_font_6x12_tr); ucg.setPrintPos(72 - i*10, 127); ucg.print(pid_[i]); ucg.setFont(ucg_font_6x12_mr); ucg.setPrintPos(72 - i*10, 134); ucg.print(K_pid[i]); } } if (plotTime > maxTime) { startStopRequest = true; } lstPlotDraw = millis(); } blinking_dot(red); // PID Controller calculateSetPoint(); // calculate the setpoint based on the plot Input = temp; // if the temperature function directly provided, the displaying of the temp will stop myPID.Compute(); analogWrite(SSR_out, Output); } if(!digitalRead(PB3) && (millis()-hold_start)>=btnHoldDelay) holding_up(); if(!digitalRead(PB6) && (millis()-hold_start)>=btnHoldDelay) holding_down(); } void up() { if ((millis() - lstBtnBounce) > btnDebounceDelay) { hold_start = millis(); if (!editSettings){ vertical_pos -= 1; if (page == 0 && vertical_pos == 0) vertical_pos = 3; else if (page == 4 && horizontal_pos == 1 && vertical_pos == 0) vertical_pos = 7; else if (page == 4 && horizontal_pos == 2 && vertical_pos == 0) vertical_pos = 7; else if (page == 4 && horizontal_pos == 3 && vertical_pos == 0) vertical_pos = 4; } else{ if (horizontal_pos == 1 && profiles[previosPage-1][vertical_pos-2][1] < 500) profiles[previosPage-1][vertical_pos-2][1] += 1; // Max Time limit else if (horizontal_pos == 2 && profiles[previosPage-1][vertical_pos-2][0] < 250) profiles[previosPage-1][vertical_pos-2][0] += 1; // Max Temp limit else if (horizontal_pos == 3 && K_pid[vertical_pos-2] < 9.99) K_pid[vertical_pos-2] += 0.01; } drawSelector(); lstBtnBounce = millis(); } } void down() { if ((millis() - lstBtnBounce) > btnDebounceDelay) { hold_start = millis(); if (!editSettings){ vertical_pos += 1; if (page == 0 && vertical_pos == 4) vertical_pos = 1; else if (page == 4 && horizontal_pos == 1 && vertical_pos == 8) vertical_pos = 1; else if (page == 4 && horizontal_pos == 2 && vertical_pos == 8) vertical_pos = 1; else if (page == 4 && horizontal_pos == 3 && vertical_pos == 5) vertical_pos = 1; } else{ if (horizontal_pos == 1 && profiles[previosPage-1][vertical_pos-2][1] > 0) profiles[previosPage-1][vertical_pos-2][1] -= 1; // Min Time limit else if (horizontal_pos == 2 && profiles[previosPage-1][vertical_pos-2][0] > 25) profiles[previosPage-1][vertical_pos-2][0] -= 1; // Min Temp limit else if (horizontal_pos == 3 && K_pid[vertical_pos-2] > 0) K_pid[vertical_pos-2] -= 0.01; } drawSelector(); lstBtnBounce = millis(); } } void left() { if ((millis() - lstBtnBounce) > btnDebounceDelay) { if (!heating && !editSettings){ horizontal_pos -= 1; if (!save_pressed && !reset_pressed && horizontal_pos == 0) horizontal_pos = 3; if (page == 4){ if ((save_pressed || reset_pressed) && (horizontal_pos == 1)) horizontal_pos = 3; else if (horizontal_pos == 3 && vertical_pos > 4) vertical_pos = 4; // jump to the shorter PID list } drawSelector(); lstBtnBounce = millis(); } } } void right() { if ((millis() - lstBtnBounce) > btnDebounceDelay) { if (!heating && !editSettings){ horizontal_pos += 1; if (!save_pressed && !reset_pressed && horizontal_pos == 4) horizontal_pos = 1; if (page == 4){ if ((save_pressed || reset_pressed) && (horizontal_pos == 4)) horizontal_pos = 2; else if (horizontal_pos == 3 && vertical_pos > 4) vertical_pos = 4; // jump to the shorter PID list } drawSelector(); lstBtnBounce = millis(); } } } void holding_up(){ if (editSettings && (millis() - last_val_change) > btnHoldUpdateRate){ if (horizontal_pos == 1 && profiles[previosPage-1][vertical_pos-2][1] < 500) profiles[previosPage-1][vertical_pos-2][1] += 1; // Max Time limit else if (horizontal_pos == 2 && profiles[previosPage-1][vertical_pos-2][0] < 250) profiles[previosPage-1][vertical_pos-2][0] += 1; // Max Temp limit else if (horizontal_pos == 3 && K_pid[vertical_pos-2] < 9.99) K_pid[vertical_pos-2] += 0.01; drawSelector(); last_val_change = millis(); } } void holding_down(){ if (editSettings && (millis() - last_val_change) > btnHoldUpdateRate){ if (horizontal_pos == 1 && profiles[previosPage-1][vertical_pos-2][1] > 0) profiles[previosPage-1][vertical_pos-2][1] -= 1; // Min Time limit else if (horizontal_pos == 2 && profiles[previosPage-1][vertical_pos-2][0] > 25) profiles[previosPage-1][vertical_pos-2][0] -= 1; // Min Temp limit else if (horizontal_pos == 3 && K_pid[vertical_pos-2] > 0) K_pid[vertical_pos-2] -= 0.01; drawSelector(); last_val_change = millis(); } } void center() { if ((millis() - lstBtnBounce) > btnDebounceDelay) { if (page == 0) { request_draw_profile_page = vertical_pos; } else if (page == 1 || page == 2 || page == 3) { if (horizontal_pos == 1) backRequest = true; else if (horizontal_pos == 2) startStopRequest = true; else if (heating == false && horizontal_pos == 3) settingsPageRequest = true; else if (heating == true && horizontal_pos == 3) startStopRequest = true; } else if (page == 4) { if (vertical_pos == 1 && horizontal_pos == 1) backRequest = true; else if (vertical_pos == 1 && horizontal_pos == 2){ if (!save_pressed && !reset_pressed){ save_pressed = true; draw_yes_no_buttons(""save""); } else if (save_pressed){ saveRequest = true; save_pressed = false; reset_pressed = false; } else if (reset_pressed){ resetRequest = true; save_pressed = false; reset_pressed = false; } } else if (vertical_pos == 1 && horizontal_pos == 3){ if (!reset_pressed && !save_pressed){ reset_pressed = true; draw_yes_no_buttons(""reset""); } else if (save_pressed || reset_pressed){ default_h_btn_para(); page = previosPage; // setting the correct page if (save_pressed) draw_settings_page(2); else if (reset_pressed) draw_settings_page(3); save_pressed = false; reset_pressed = false; } } else { editSettings = !editSettings; drawSelector(); } } lstBtnBounce = millis(); } } void drawBorder() { // Frame ucg.drawVLine(0, 0, 144); ucg.drawLine(0, 144, 15, 159); ucg.drawHLine(15, 159, 113); ucg.drawVLine(127, 132, 27); ucg.drawLine(127, 132, 105, 110); ucg.drawVLine(105, 0, 110); ucg.drawHLine(0, 0, 105); // Title ucg.drawBox(108, 0, 127, 109); ucg.drawTriangle(108, 109, 128, 109, 127, 129); } void drawBtn(byte x, byte y, byte h, byte w, byte font_x, byte font_y, String label) { // x,y - (bottom left), h - height ucg.setColor(0, 250, 245, 0); // Bright Yellow ucg.drawBox(x, y, h, w); ucg.setColor(0, 0, 0, 0); ucg.drawTriangle(x + (h / 2) + 1, y, x + h, y, x + h, y + (h / 2)); // top left triangle ucg.drawTriangle(x, (y + w) - (h / 2), x, y + w, x + (h / 2), y + w); // bottom right triangle ucg.setColor(1, 250, 245, 0); // background Yellow ucg.setPrintPos(font_x, font_y); ucg.print(label); } void title(String label) { ucg.setFont(ucg_font_7x14_tr); // Final ucg.setPrintPos(112, 2); ucg.print(label); } void draw_main_buttons() { ucg.setFont(ucg_font_7x14_tr); for (byte i = 0; i <= 2; i++) { drawBtn(main_btn_pos[i][0], main_btn_pos[i][1], main_btn_height, main_btn_width, main_btn_text_pos[i][0], main_btn_text_pos[i][1], main_btn_labels[i]); } } void draw_horizontal_buttons() { setColor(black); ucg.drawBox(81,2,23,100); // clear the temp and time info after heating ucg.setFont(ucg_font_6x13_tr); for (byte i = 0; i < 3; i++) { drawBtn(h_btn_pos[i][0], h_btn_pos[i][1], h_btn_height, h_btn_width, h_btn_text_pos[i][0], h_btn_text_pos[i][1], h_btn_labels[i]); } } void drawSelector() { if (page == 0) selector_main_buttons(vertical_pos); else if (page == 1 || page == 2 || page == 3) selector_horizontal_buttons(horizontal_pos); else if (page == 4){ if (save_pressed || reset_pressed) selector_horizontal_buttons(horizontal_pos); else selector_settings_page(vertical_pos,horizontal_pos); } } void selector_main_buttons(byte v) { for (byte u = 1; u <= 3; u++) { if (v != u) { ucg.setColor(0, 0, 0, 0); ucg.drawLine((main_btn_pos[u - 1][0] + main_btn_height / 2) + 3, main_btn_pos[u - 1][1], main_btn_pos[u - 1][0] + main_btn_height, (main_btn_pos[u - 1][1] + main_btn_height / 2) - 2); ucg.drawLine((main_btn_pos[u - 1][0] + main_btn_height / 2) + 4, main_btn_pos[u - 1][1], main_btn_pos[u - 1][0] + main_btn_height, (main_btn_pos[u - 1][1] + main_btn_height / 2) - 3); ucg.drawLine(main_btn_pos[u - 1][0], (main_btn_pos[u - 1][1] + main_btn_width - main_btn_height / 2) + 3, (main_btn_pos[u - 1][0] + main_btn_height / 2) - 3, main_btn_pos[u - 1][1] + main_btn_width); ucg.drawLine(main_btn_pos[u - 1][0], (main_btn_pos[u - 1][1] + main_btn_width - main_btn_height / 2) + 4, (main_btn_pos[u - 1][0] + main_btn_height / 2) - 4, main_btn_pos[u - 1][1] + main_btn_width); } } ucg.setColor(0, 250, 245, 0); // Bright Yellow ucg.drawLine((main_btn_pos[v - 1][0] + main_btn_height / 2) + 3, main_btn_pos[v - 1][1], main_btn_pos[v - 1][0] + main_btn_height, (main_btn_pos[v - 1][1] + main_btn_height / 2) - 2); ucg.drawLine((main_btn_pos[v - 1][0] + main_btn_height / 2) + 4, main_btn_pos[v - 1][1], main_btn_pos[v - 1][0] + main_btn_height, (main_btn_pos[v - 1][1] + main_btn_height / 2) - 3); ucg.drawLine(main_btn_pos[v - 1][0], (main_btn_pos[v - 1][1] + main_btn_width - main_btn_height / 2) + 3, (main_btn_pos[v - 1][0] + main_btn_height / 2) - 3, main_btn_pos[v - 1][1] + main_btn_width); ucg.drawLine(main_btn_pos[v - 1][0], (main_btn_pos[v - 1][1] + main_btn_width - main_btn_height / 2) + 4, (main_btn_pos[v - 1][0] + main_btn_height / 2) - 4, main_btn_pos[v - 1][1] + main_btn_width); } void selector_horizontal_buttons(byte h) { byte u; if (save_pressed || reset_pressed) u = 1; else u = 0; for (u; u < 3; u++) { if (h != u+1) { ucg.setColor(0, 0, 0, 0); ucg.drawLine((h_btn_pos[u][0] + h_btn_height / 2) + 3, h_btn_pos[u][1], h_btn_pos[u][0] + h_btn_height, (h_btn_pos[u][1] + h_btn_height / 2) - 3); ucg.drawLine((h_btn_pos[u][0] + h_btn_height / 2) + 4, h_btn_pos[u][1], h_btn_pos[u][0] + h_btn_height, (h_btn_pos[u][1] + h_btn_height / 2) - 4); ucg.drawLine(h_btn_pos[u][0], (h_btn_pos[u][1] + h_btn_width - h_btn_height / 2) + 3, (h_btn_pos[u][0] + h_btn_height / 2) - 3, h_btn_pos[u][1] + h_btn_width); ucg.drawLine(h_btn_pos[u][0], (h_btn_pos[u][1] + h_btn_width - h_btn_height / 2) + 4, (h_btn_pos[u][0] + h_btn_height / 2) - 4, h_btn_pos[u][1] + h_btn_width); } } ucg.setColor(0, 250, 245, 0); // Bright Yellow ucg.drawLine((h_btn_pos[h - 1][0] + h_btn_height / 2) + 3, h_btn_pos[h - 1][1], h_btn_pos[h - 1][0] + h_btn_height, (h_btn_pos[h - 1][1] + h_btn_height / 2) - 3); ucg.drawLine((h_btn_pos[h - 1][0] + h_btn_height / 2) + 4, h_btn_pos[h - 1][1], h_btn_pos[h - 1][0] + h_btn_height, (h_btn_pos[h - 1][1] + h_btn_height / 2) - 4); ucg.drawLine(h_btn_pos[h - 1][0], (h_btn_pos[h - 1][1] + h_btn_width - h_btn_height / 2) + 3, (h_btn_pos[h - 1][0] + h_btn_height / 2) - 3, h_btn_pos[h - 1][1] + h_btn_width); ucg.drawLine(h_btn_pos[h - 1][0], (h_btn_pos[h - 1][1] + h_btn_width - h_btn_height / 2) + 4, (h_btn_pos[h - 1][0] + h_btn_height / 2) - 4, h_btn_pos[h - 1][1] + h_btn_width); } void selector_settings_page(byte v, byte h){ if(editSettings == true){ // when editing - highlight the selected value setColor(black); // Remove the rectangle around selected values if (h == 1) ucg.drawFrame(55 - (p4LastSelect_v-2)*10, 18, 11, 22); else if (h == 2) ucg.drawFrame(55 - (p4LastSelect_v-2)*10, 53, 11, 22); else if (h == 3 && p4LastSelect_v <= 4) ucg.drawFrame(55 - (p4LastSelect_v-2)*10, 118, 11, 27); ucg.setFont(ucg_font_6x12_mr); int val; if (h == 1){ setColor(blackOnYellow); ucg.setPrintPos(56 - (v-2)*10, 20); val = profiles[previosPage-1][vertical_pos-2][1]; ucg.print(String(val)); setColor(black); if (val >= 10 && val < 100) ucg.drawBox(55 - (v-2)*10, 32,12,7); // manually remove last digit else if (val < 10) ucg.drawBox(55 - (v-2)*10, 26,12,7); } else if (h == 2){ setColor(blackOnYellow); ucg.setPrintPos(56 - (v-2)*10, 55); val = profiles[previosPage-1][vertical_pos-2][0]; ucg.print(String(val)); setColor(black); if (val >= 10 && val < 100) ucg.drawBox(55 - (v-2)*10, 67,12,7); // manually remove last digit else if (val < 10) ucg.drawBox(55 - (v-2)*10, 61,12,7); } else if (h == 3 && v != 5){ setColor(blackOnYellow); ucg.setPrintPos(56 - (v-2)*10, 120); ucg.print(String(K_pid[v-2])); } } else{ // Rectangle around the value if (vertical_pos != 1){ setColor(yellowOnBlack); ucg.setFont(ucg_font_6x12_mr); if (h == 1){ ucg.setPrintPos(56 - (v-2)*10, 20); ucg.print(String(profiles[previosPage-1][vertical_pos-2][1])); } else if (h == 2){ ucg.setPrintPos(56 - (v-2)*10, 55); ucg.print(String(profiles[previosPage-1][vertical_pos-2][0])); } else if (h == 3 && v != 5){ ucg.setPrintPos(56 - (v-2)*10, 120); ucg.print(String(K_pid[v-2])); } } // Remove rectangle around the last selection if(p4LastSelect_v != 1){ setColor(black); if (h == 1) ucg.drawFrame(55 - (p4LastSelect_v-2)*10, 18, 11, 22); else if (h == 2) ucg.drawFrame(55 - (p4LastSelect_v-2)*10, 53, 11, 22); else if (h == 3 && p4LastSelect_v <= 4) ucg.drawFrame(55 - (p4LastSelect_v-2)*10, 118, 11, 27); if (p4LastSelect_h != h && p4LastSelect_h == 1) ucg.drawFrame(55 - (p4LastSelect_v-2)*10, 18, 11, 22); else if (p4LastSelect_h != h && p4LastSelect_h == 2) ucg.drawFrame(55 - (p4LastSelect_v-2)*10, 53, 11, 22); else if (p4LastSelect_h != h && p4LastSelect_h == 3 && p4LastSelect_v != 5) ucg.drawFrame(55 - (p4LastSelect_v-2)*10, 118, 11, 27); } // Draw horizontal button selectors if (v == 1){ for (byte u = 0; u < 3; u++) { if (h != u+1) { setColor(black); ucg.drawLine((h_btn_pos[u][0] + h_btn_height / 2) + 3, h_btn_pos[u][1], h_btn_pos[u][0] + h_btn_height, (h_btn_pos[u][1] + h_btn_height / 2) - 3); ucg.drawLine((h_btn_pos[u][0] + h_btn_height / 2) + 4, h_btn_pos[u][1], h_btn_pos[u][0] + h_btn_height, (h_btn_pos[u][1] + h_btn_height / 2) - 4); ucg.drawLine(h_btn_pos[u][0], (h_btn_pos[u][1] + h_btn_width - h_btn_height / 2) + 3, (h_btn_pos[u][0] + h_btn_height / 2) - 3, h_btn_pos[u][1] + h_btn_width); ucg.drawLine(h_btn_pos[u][0], (h_btn_pos[u][1] + h_btn_width - h_btn_height / 2) + 4, (h_btn_pos[u][0] + h_btn_height / 2) - 4, h_btn_pos[u][1] + h_btn_width); } } setColor(yellow); ucg.drawLine((h_btn_pos[h - 1][0] + h_btn_height / 2) + 3, h_btn_pos[h - 1][1], h_btn_pos[h - 1][0] + h_btn_height, (h_btn_pos[h - 1][1] + h_btn_height / 2) - 3); ucg.drawLine((h_btn_pos[h - 1][0] + h_btn_height / 2) + 4, h_btn_pos[h - 1][1], h_btn_pos[h - 1][0] + h_btn_height, (h_btn_pos[h - 1][1] + h_btn_height / 2) - 4); ucg.drawLine(h_btn_pos[h - 1][0], (h_btn_pos[h - 1][1] + h_btn_width - h_btn_height / 2) + 3, (h_btn_pos[h - 1][0] + h_btn_height / 2) - 3, h_btn_pos[h - 1][1] + h_btn_width); ucg.drawLine(h_btn_pos[h - 1][0], (h_btn_pos[h - 1][1] + h_btn_width - h_btn_height / 2) + 4, (h_btn_pos[h - 1][0] + h_btn_height / 2) - 4, h_btn_pos[h - 1][1] + h_btn_width); } else { // Clear the button slectors setColor(black); for (byte u = 0; u < 3; u++) { ucg.drawLine((h_btn_pos[u][0] + h_btn_height / 2) + 3, h_btn_pos[u][1], h_btn_pos[u][0] + h_btn_height, (h_btn_pos[u][1] + h_btn_height / 2) - 3); ucg.drawLine((h_btn_pos[u][0] + h_btn_height / 2) + 4, h_btn_pos[u][1], h_btn_pos[u][0] + h_btn_height, (h_btn_pos[u][1] + h_btn_height / 2) - 4); ucg.drawLine(h_btn_pos[u][0], (h_btn_pos[u][1] + h_btn_width - h_btn_height / 2) + 3, (h_btn_pos[u][0] + h_btn_height / 2) - 3, h_btn_pos[u][1] + h_btn_width); ucg.drawLine(h_btn_pos[u][0], (h_btn_pos[u][1] + h_btn_width - h_btn_height / 2) + 4, (h_btn_pos[u][0] + h_btn_height / 2) - 4, h_btn_pos[u][1] + h_btn_width); } setColor(yellow); if (h == 1) ucg.drawFrame(55 - (v-2)*10, 18, 11, 22); else if (h == 2)ucg.drawFrame(55 - (v-2)*10, 53, 11, 22); else if (h == 3 && v != 5) ucg.drawFrame(55 - (v-2)*10, 118, 11, 27); p4LastSelect_h = h; p4LastSelect_v = v; } } } void draw_main_page() { ucg.clearScreen(); setColor(yellow); drawBorder(); setColor(blackOnYellow); title(""BRILLIANT REFLOW""); draw_main_buttons(); previosPage = page; page = 0; drawSelector(); } void draw_profile_page(byte i) { ucg.clearScreen(); setColor(yellow); drawBorder(); setColor(blackOnYellow); title(main_btn_labels[i - 1]); draw_horizontal_buttons(); previosPage = page; page = i; drawSelector(); drawPlot(i); } void goBack() { if (page != 4) { vertical_pos = page; // draw the selector on the last selected page draw_main_page(); } else{ horizontal_pos = 3; draw_profile_page(previosPage); } } void drawPlot(byte i) { i = i - 1; ucg.setColor(0, 0, 0, 0); // Font Yellow ucg.drawBox(11,21,70,120); ucg.setColor(0, 250, 245, 0); // Font Yellow ucg.setColor(1, 0, 0, 0); // background Black ucg.drawHLine(10, 20, 61); // Time limits - 20, 80, 140 ucg.drawVLine(10, 20, 120); // Temp limits - 10, 40, 70 ucg.drawHLine(10, 140, 3); ucg.drawHLine(10, 80, 3); ucg.drawVLine(10, 18, 2); ucg.drawVLine(70, 18, 2); ucg.drawVLine(40, 18, 2); ucg.setFont(ucg_font_6x10_tr); // texts ucg.setPrintPos(72, 8); ucg.print(""T(C)""); ucg.setPrintPos(13, 136); ucg.print(""t(s)""); // map the values maxTemp = profiles[i][0][0]; minTemp = profiles[i][0][0]; maxTime = profiles[i][5][1]; for (byte u = 0; u < 5; u++) { // finding the max and min Temperatures from the preset points if ( maxTemp < profiles[i][u][0]) maxTemp = profiles[i][u][0]; if ( minTemp > profiles[i][u][0]) minTemp = profiles[i][u][0]; } ucg.setFont(ucg_font_5x7_tr); // numbers ucg.setPrintPos(62, 4); ucg.print(String(maxTemp)); ucg.setPrintPos(32, 4); ucg.print(String((maxTemp + minTemp) / 2)); ucg.setPrintPos(7, 6); ucg.print(String(minTemp)); ucg.setPrintPos(2, 18); ucg.print(""0""); ucg.setPrintPos(2, 73); ucg.print(String(maxTime / 2)); ucg.setPrintPos(2, 130); ucg.print(String(maxTime)); for (byte k = 0; k < 5; k++) { float tem_1 = ((60 * (profiles[i][k][0] - minTemp)) / (maxTemp - minTemp)) + 10; // height of plot is 60 float t_1 = ((120 * profiles[i][k][1]) / maxTime) + 20; // width of plot is 120 float tem_2 = ((60 * (profiles[i][k + 1][0] - minTemp)) / (maxTemp - minTemp)) + 10; float t_2 = ((120 * profiles[i][k + 1][1]) / maxTime) + 20; ucg.drawLine(tem_1, t_1, tem_2, t_2); } } void startStop() { ucg.setFont(ucg_font_6x13_tr); if (heating == false) { drawStopBtn(); drawPlot(page); setColor (black); heating = true; } else { heating = false; myPID.SetMode(MANUAL); // turn off the PID Output = 0; digitalWrite(SSR_out, LOW); // turn off the heater pidInit = false; draw_horizontal_buttons(); horizontal_pos = 2; drawSelector(); plotTime=0; } } void blinking_dot(int c){ if ((millis() - lstBlink) > 500){ blinkState = !blinkState; if (blinkState) setColor(c); else setColor(black); ucg.drawDisc(120, 152, 3, UCG_DRAW_ALL); lstBlink = millis(); } } void setColor(int i){ switch (i) { case black: ucg.setColor(0, 0, 0, 0); break; case red: ucg.setColor(0, 250, 0, 0); break; case yellow: ucg.setColor(0, 250, 245, 0); break; case green: ucg.setColor(0, 0, 250, 0); break; case blackOnYellow: ucg.setColor(0, 0, 0, 0); ucg.setColor(1, 250, 245, 0); break; case yellowOnBlack: ucg.setColor(0, 250, 245, 0); ucg.setColor(1, 0, 0, 0); break; } } void drawStopBtn(){ setColor(black); ucg.drawBox(h_btn_pos[0][0],h_btn_pos[0][1],h_btn_height, h_btn_pos[2][1]-1); h_btn_labels [2] = ""STOP""; setColor(yellow); drawBtn(h_btn_pos[2][0], h_btn_pos[2][1], h_btn_height, h_btn_width, h_btn_text_pos[2][0], h_btn_text_pos[2][1], h_btn_labels[2]); horizontal_pos = 3; drawSelector(); h_btn_labels [2] = ""EDIT""; // Time and Temperature setColor(yellowOnBlack); ucg.setFont(ucg_font_6x12_tr); ucg.setPrintPos(95, 4); ucg.print(""Temp(C):""); ucg.setPrintPos(85, 4); ucg.print(""Time(s):""); } void draw_settings_page(byte h){ previosPage = page; page = 4; ucg.clearScreen(); setColor(yellow); drawBorder(); setColor(blackOnYellow); title(""Settings Prof_"" + String(previosPage)); // previous page number is the profile number h_btn_labels [1] = ""SAVE""; h_btn_labels [2] = ""RESET""; h_btn_text_pos[1][1] = 68; h_btn_text_pos[2][1] = 117; setColor(yellow); draw_horizontal_buttons(); default_h_btn_para(); setColor(yellowOnBlack); ucg.setFont(ucg_font_6x12_mr); ucg.setPrintPos(68, 17); ucg.print(""t(s)""); ucg.setPrintPos(68, 45); ucg.print(""Temp(C)""); ucg.setPrintPos(68, 94); ucg.print(""Global PID""); for (byte i = 0; i<=5; i++){ // plot coordinates ucg.setPrintPos(56 - i*10, 6); ucg.print(String(i+1)+"":""); int p = profiles[previosPage-1][i][1]; ucg.setPrintPos(56 - i*10, 20); ucg.print(String(p)); int k = profiles[previosPage-1][i][0]; ucg.setPrintPos(56 - i*10, 55); ucg.print(String(k)); } for (byte i=0; i<=2; i++){ // PID values ucg.setFont(ucg_font_6x12_tr); ucg.setPrintPos(56 - i*10, 100); ucg.print(pid[i]); ucg.setFont(ucg_font_6x12_mr); ucg.setPrintPos(56 - i*10, 120); ucg.print(K_pid[i]); } setColor(yellow); ucg.drawHLine(6,88,70); horizontal_pos = h; // starting selector positions vertical_pos = 1; drawSelector(); } void calculateSetPoint(){ // calculate the temperature values for every time steps byte k = page - 1; for (byte i = 0; i<=5; i++){ if (profiles[k][i][1] < plotTime && plotTime < profiles[k][i+1][1]) Setpoint = ((profiles[k][i+1][0] - profiles[k][i][0])*(plotTime - profiles[k][i][1])/(profiles[k][i+1][1] - profiles[k][i][1])) + profiles[k][i][0]; } } void EEPROM_get(){ int addr = 0; addr += sizeof(int); // skip the first value for (byte u = 0; u < 3; u++){ for (byte i = 0; i < 6; i++){ for (byte k = 0; k < 2; k++){ EEPROM.get(addr, profiles[u][i][k]); addr += sizeof(int); // move the address a size of `int` } } } for (byte m = 0; m < 3; m++){ EEPROM.get(addr, K_pid[m]); addr += sizeof(double); } } void EEPROM_set_default(){ int addr = 0; addr += sizeof(int); // placeholder for for the initial value for (byte u = 0; u < 3; u++){ for (byte i = 0; i < 6; i++){ for (byte k = 0; k < 2; k++){ EEPROM.put(addr, default_profiles[u][i][k]); addr += sizeof(int); // move the address a size of `int` } } } for (byte m = 0; m < 3; m++){ EEPROM.put(addr, default_K_pid[m]); addr += sizeof(double); } EEPROM.put(addr, 101); EEPROM.put(0, addr); } void EEPROM_save(){ int addr = 0; addr += sizeof(int); // placeholder for for the initial value for (byte u = 0; u < 3; u++){ for (byte i = 0; i < 6; i++){ for (byte k = 0; k < 2; k++){ EEPROM.put(addr, profiles[u][i][k]); addr += sizeof(int); // move the address a size of `int` } } } for (byte m = 0; m < 3; m++){ EEPROM.put(addr, K_pid[m]); addr += sizeof(double); } EEPROM.put(addr, 101); EEPROM.put(0, addr); } bool EEPROM_check(){ byte addr, ck; EEPROM.get(0,addr); // read the address 0 to get the address of the last value EEPROM.get(addr,ck); if (ck == 101) return true; else return false; } void draw_yes_no_buttons(String s) { h_btn_labels [1] = ""YES""; h_btn_labels [2] = ""NO""; h_btn_pos[1][1] = 80; h_btn_pos[2][1] = 120; h_btn_text_pos[1][1] = 89; h_btn_text_pos[2][1] = 133; h_btn_width = 35; setColor(black); ucg.drawBox(81,2,23,157); // clear the buttons setColor(blackOnYellow); ucg.setFont(ucg_font_6x13_tr); for (byte i = 1; i < 3; i++) { drawBtn(h_btn_pos[i][0], h_btn_pos[i][1], h_btn_height, h_btn_width, h_btn_text_pos[i][0], h_btn_text_pos[i][1], h_btn_labels[i]); } setColor(yellowOnBlack); if (s == ""save""){ ucg.setFont(ucg_font_6x12_tr); ucg.setPrintPos(95, 4); ucg.print(""Save values""); ucg.setPrintPos(85, 4); ucg.print(""to memory?""); } if (s == ""reset""){ ucg.setFont(ucg_font_6x12_tr); ucg.setPrintPos(95, 4); ucg.print(""Reset values""); ucg.setPrintPos(85, 4); ucg.print(""to default?""); } horizontal_pos = 2; // initially select YES drawSelector(); } void default_h_btn_para(){ byte p[3][2] = {{83, 5}, {83, 56}, {83, 107}}; byte q[3][2] = {{87, 17}, {87, 66}, {87, 120}}; for (byte i=0; i<3; i++){ for (byte u=0; u<2; u++){ h_btn_pos[i][u] = p[i][u]; } } for (byte i=0; i<3; i++){ for (byte u=0; u<2; u++){ h_btn_text_pos[i][u] = q[i][u]; } } h_btn_labels[0] = ""BACK""; h_btn_labels[1] = ""START""; h_btn_labels[2] = ""EDIT""; h_btn_height = 18; h_btn_width = 47; } ",12424,False,2277.9378370460336,median "#include ""Arduboy2.h"" #define MAXINT16 65535 static Arduboy2 arduboy; BeepPin1 beep; #define DRAW_PIXEL(x,y,c) arduboy.drawPixel((x), (y), (c)); #define GET_PIXEL(x,y) arduboy.getPixel((x), (y)) #define DRAW_BITMAP(x,y,b,w,h,c) arduboy.drawBitmap((x), (y), (b), (w), (h), (c)) #define DRAW_RECT(x,y,w,h,c) arduboy.drawRect((x), (y), (w), (h), (c)) #define FILL_RECT(x,y,w,h,c) arduboy.fillRect((x), (y), (w), (h), (c)) #define DRAW_H_LINE(x,y,l,c) arduboy.drawFastHLine((x),(y),(l),(c)) #define DRAW_V_LINE(x,y,l ,c) arduboy.drawFastVLine((x),(y),(l),(c)) #define G_TXT_CURSOR(c,r) arduboy.setCursor((c),(r)) #define G_PRINT(s) arduboy.print((s)) #define KEY_PRESSED(k) arduboy.pressed((k)) #define KEY_NOT_PRESSED(k) arduboy.notPressed((k)) #define SOUND_ON arduboy.audio.on() #define SOUND_OFF arduboy.audio.off() #define SCRN_LEFT 19 #define SCRN_RIGHT 107 #define SCRN_BOTTOM 64 #define SCRN_FPS 60 const unsigned int FRAME_RATE = 60; // 3x6 pixel digit font const uint8_t digit[10][3] PROGMEM = { { 0x3f, 0x21, 0x3f }, { 0x00, 0x3f, 0x00 }, { 0x3d, 0x25, 0x27 }, { 0x25, 0x25, 0x3f }, { 0x07, 0x04, 0x3f }, { 0x27, 0x25, 0x3d }, { 0x3f, 0x25, 0x3d }, { 0x01, 0x01, 0x3f }, { 0x3f, 0x25, 0x3f }, { 0x27, 0x25, 0x3f }, }; void draw_digit(int16_t x, int16_t y, uint8_t n) { FILL_RECT(x, y, 3, 6, BLACK); DRAW_BITMAP(x, y, digit[n % 10], 3, 5, WHITE); } void print_int(int16_t x, int16_t y, uint16_t s, uint8_t digit) { x += 4 * (digit - 1); for (; digit > 0; digit--) { draw_digit(x, y, s % 10); x -= 4; s /= 10; } } // Sound utilities #include ""pitches.h"" #define TICKS2MSECS(t) ((t) * (1000 / SCRN_FPS)) enum SoundState { SoundReady, SoundPlaying, SoundDone }; struct sound_fx_t { int16_t *data; // array of frequencies, use -1 as end marker uint8_t gate_time; // note gate time in msec uint8_t clk; // ticks per note boolean loop; // true for loop play uint8_t idx; uint8_t clk_cnt; enum SoundState status; }; void sound_start(struct sound_fx_t *s) { if (s->status == SoundReady) { s->status = SoundPlaying; s->clk_cnt = 0; s->idx = 0; } } void sound_stop(struct sound_fx_t *s) { if (s->status == SoundPlaying) s->status = SoundDone; } void sound_restart(struct sound_fx_t *s) { if (s->status == SoundDone) s->status = SoundReady; } boolean sound_ready(struct sound_fx_t *s) { return (s->status == SoundReady); } void sound_set_tempo(struct sound_fx_t *s, uint8_t t) { s->clk = t; } void sound_play(struct sound_fx_t *s) { if (s->status == SoundPlaying) { int16_t t = s->gate_time - TICKS2MSECS(s->clk_cnt++); if (t > 0) { if (arduboy.audio.enabled()) beep.tone(beep.freq((s->data[s->idx])), t/4 ); // beep.tone(beep.freq((s->data[s->idx])), t/ (1000 / FRAME_RATE)); // TONE(s->data[s->idx], t); } if (s->clk_cnt > s->clk) { s->clk_cnt = 0; if (s->data[++(s->idx)] < 0) { if (!s->loop) // beep.noTone(); s->status = SoundDone; s->idx = 0; } } } } // true when a button pressed and released boolean button_pressed(uint8_t button, boolean *b_state) { if (*b_state && KEY_NOT_PRESSED(button)) { *b_state = false; return true; } else if (!*b_state && KEY_PRESSED(button)) *b_state = true; return false; } ///////////////////////////////////////////////////////// // Common status definition ///////////////////////////////////////////////////////// #define OBJ_ACTIVE 0 // object is visible and moving #define OBJ_READY -1 // object is not active but ready to be active #define OBJ_RECYCLE 1 // object is in the end of explosion, going to be ready ///////////////////////////////////////////////////////// // Invaders ///////////////////////////////////////////////////////// #define ALN_ROW 5 #define ALN_COLUMN 10 #define ALN_NUM (ALN_ROW * ALN_COLUMN) #define ALN_TOP 7 #define ALN_W 5 #define ALN_H 3 #define ALN_HSPACING 2 #define ALN_VSPACING 3 #define ALN_VMOVE 3 #define ALN_EXPLOSION 24 #define ALN_W_OF_ALIENS (ALN_COLUMN * (ALN_W + ALN_HSPACING) - ALN_HSPACING) #define ALN_H_OF_ALIENS (ALN_ROW * (ALN_H + ALN_VSPACING) - ALN_VSPACING) const uint8_t aln1_img[2][ALN_W] PROGMEM = { { 0x00, 0x03, 0x06, 0x03, 0x00 }, { 0x00, 0x06, 0x03, 0x06, 0x00 } }; const uint8_t aln2_img[2][ALN_W] PROGMEM = { { 0x03, 0x06, 0x03, 0x06, 0x03 }, { 0x06, 0x03, 0x06, 0x03, 0x06 } }; const uint8_t aln3_img[2][ALN_W] PROGMEM = { { 0x03, 0x05, 0x06, 0x05, 0x03 }, { 0x06, 0x05, 0x02, 0x05, 0x06 } }; const uint8_t ALN_hit_img[ALN_W] PROGMEM = { 0x05, 0x00, 0x05, 0x00, 0x05 }; struct aliens_t { boolean exist[ALN_NUM]; uint8_t alive; // number of aliens alive int16_t cur_left; int16_t cur_top; int16_t nxt_left; int16_t nxt_top; int16_t v; // left move or right move uint8_t nxt_update; // which invader will be moved at the next tick uint8_t pose; // index num for iv?_img[] int16_t bottom; // be updated in aliens_draw boolean move_down; // down-move flag (updated in aliens_draw) boolean touch_down; // an alien touched bottom line flag int8_t status; uint8_t hit_idx; // which invader is been hit } g_aliens; void aliens_init(struct aliens_t *a, uint8_t stg) { const int8_t top[9] = { 0, 2, 4, 5, 5, 5, 6, 6, 6 }; int16_t y = ALN_TOP + top[stg % 9] * ALN_H; for (uint8_t i = 0; i < ALN_NUM; i++) a->exist[i] = true; a->cur_left = SCRN_LEFT + 9; a->v = 1; a->nxt_left = a->cur_left + a->v; a->cur_top = y; a->nxt_top = y; a->bottom = 0; a->nxt_update = 0; a->pose = 0; a->move_down = false; a->touch_down = false; a->status = 0; a->hit_idx = 0; a->alive = ALN_NUM; } #define A_ROW(a) (ALN_ROW - 1 - (a) / ALN_COLUMN) #define A_COL(a) ((a) % ALN_COLUMN) #define A_IDX(r,c) ((c) + ALN_COLUMN * (ALN_ROW - (r) - 1)) #define A_XOFS(c) (c * (ALN_W + ALN_HSPACING)) #define A_YOFS(r) (r * (ALN_H + ALN_VSPACING)) void aliens_erase(struct aliens_t *a) { uint8_t row = A_ROW(a->nxt_update); uint8_t col = A_COL(a->nxt_update); int16_t x = a->cur_left + A_XOFS(col); int16_t y = a->cur_top + A_YOFS(row); FILL_RECT(x, y, ALN_W, ALN_H, BLACK); } void aliens_draw(struct aliens_t *a) { if (!a->exist[a->nxt_update]) return; uint8_t row = A_ROW(a->nxt_update); uint8_t col = A_COL(a->nxt_update); int16_t x = a->nxt_left + col * (ALN_W + ALN_HSPACING); int16_t y = a->nxt_top + row * (ALN_H + ALN_VSPACING); uint8_t *img; switch (row) { case 0: img = (uint8_t *)aln1_img[a->pose]; break; case 1: case 2: img = (uint8_t *)aln2_img[a->pose]; break; case 3: case 4: img = (uint8_t *)aln3_img[a->pose]; break; } DRAW_BITMAP(x, y, img, ALN_W, ALN_H, WHITE); if (((x <= SCRN_LEFT) && (a->v < 0)) || ((x >= SCRN_RIGHT - ALN_W) && (a->v > 0))) a->move_down = true; a->bottom = maxVal(a->bottom, y + ALN_H); } void aliens_hitimg_erase_alien(struct aliens_t *a) { uint8_t row = A_ROW(a->hit_idx); uint8_t col = A_COL(a->hit_idx); int16_t x; int16_t y; if (a->hit_idx >= a->nxt_update) { x = a->cur_left; y = a->cur_top; } else { x = a->nxt_left; y = a->nxt_top; } x += A_XOFS(col); y += A_YOFS(row);; FILL_RECT(x, y, ALN_W, ALN_H, BLACK); } void aliens_hitimg_erase(struct aliens_t *a) { uint8_t row = A_ROW(a->hit_idx); uint8_t col = A_COL(a->hit_idx); int16_t x = a->nxt_left + A_XOFS(col); int16_t y = a->nxt_top + A_YOFS(row); FILL_RECT(x, y, ALN_W, ALN_H, BLACK); } void aliens_hitimg_draw(struct aliens_t *a) { uint8_t row = A_ROW(a->hit_idx); uint8_t col = A_COL(a->hit_idx); int16_t x = a->nxt_left + A_XOFS(col); int16_t y = a->nxt_top + A_YOFS(row); DRAW_BITMAP(x, y, ALN_hit_img, ALN_W, ALN_H, WHITE); } void aliens_move(struct aliens_t *a) { uint8_t u = a->nxt_update; do { u++; } while ((u < ALN_NUM) && (!a->exist[u])); if (u < ALN_NUM) { a->nxt_update = u; } else { // all aliens have moved if (a->bottom >= SCRN_BOTTOM) a->touch_down = true; for (u = 0; (u < ALN_NUM) && (!a->exist[u]); u++); a->nxt_update = u; a->pose = (a->pose + 1) % 2; a->cur_left = a->nxt_left; a->nxt_left += a->v; a->cur_top = a->nxt_top; if (a->move_down) { // this flag had been set in aliens_draw() a->move_down = false; a->v = -a->v; a->nxt_top = a->cur_top + ALN_VMOVE; a->nxt_left = a->cur_left + a->v; } } } void aliens_hit(struct aliens_t *a, uint8_t idx) { a->exist[idx] = false; a->hit_idx = idx; a->status = ALN_EXPLOSION; a->alive--; } int8_t aliens_hit_test(struct aliens_t *a, int16_t x, int16_t y) { // returns alien index int16_t lmin = min(a->cur_left, a->nxt_left); int16_t tmin = min(a->cur_top, a->nxt_top); if ((x > lmin) && (x < lmin + ALN_W_OF_ALIENS) && (y > tmin) && (y < tmin + ALN_H_OF_ALIENS)) { for (uint8_t i = 0; i < a->nxt_update; i++) if (a->exist[i]) { int16_t ax = a->nxt_left + A_XOFS(A_COL(i)); int16_t ay = a->nxt_top + A_YOFS(A_ROW(i)); if ((x >= ax) && (x < ax + ALN_W) && (y >= ay) && (y < ay + ALN_H)) return i; } for (uint8_t i = a->nxt_update; i < ALN_NUM; i++) if (a->exist[i]) { int16_t ax = a->cur_left + A_XOFS(A_COL(i)); int16_t ay = a->cur_top + A_YOFS(A_ROW(i)); if ((x >= ax) && (x < ax + ALN_W) && (y >= ay) && (y < ay + ALN_H)) return i; } } return -1; // no aliens hits } void aliens_update(struct aliens_t *a) { switch (a->status) { case OBJ_ACTIVE: aliens_erase(a); aliens_draw(a); aliens_move(a); break; case ALN_EXPLOSION: aliens_hitimg_erase_alien(a); aliens_hitimg_draw(a); a->status--; break; case OBJ_RECYCLE: aliens_hitimg_erase(a); a->status = OBJ_ACTIVE; break; default: a->status--; } } ///////////////////////////////////////////////////////// // UFO ///////////////////////////////////////////////////////// #define UFO_TOP 0 #define UFO_BOTTOM 3 #define UFO_W 7 #define UFO_H 3 #define UFO_INTERVAL (25 * SCRN_FPS) #define UFO_WAIT (SCRN_FPS / 30) #define UFO_EXPLOSION (2 * SCRN_FPS) const uint8_t ufo_img[UFO_W] PROGMEM = { 0x06, 0x05, 0x07, 0x03, 0x07, 0x05, 0x06 }; const uint8_t ufo_score_img[4][UFO_W] PROGMEM = { { 0x00, 0x05, 0x03, 0x00, 0x06, 0x06, 0x00 }, { 0x07, 0x00, 0x06, 0x06, 0x00, 0x06, 0x06 }, { 0x07, 0x00, 0x05, 0x03, 0x00, 0x06, 0x06 }, { 0x05, 0x07, 0x00, 0x06, 0x06, 0x06, 0x06 } }; struct ufo_t { uint16_t wait_ctr; uint16_t x; int8_t v; int8_t l_or_r; int8_t status; uint8_t img_idx; // index for ufo_score_img } g_ufo; void ufo_init(struct ufo_t *u) { u->wait_ctr = 0; u->status = OBJ_READY; } void ufo_appear(struct ufo_t *u) { if ((g_aliens.alive > 7) && (u->wait_ctr++ > UFO_INTERVAL)) { u->status = OBJ_ACTIVE; u->wait_ctr = 0; switch (u->l_or_r) { case 0: u->v = 1; u->x = SCRN_LEFT; break; default: u->v = -1; u->x = SCRN_RIGHT - UFO_W; } } } void ufo_draw(struct ufo_t *u) { DRAW_BITMAP(u->x, UFO_TOP, ufo_img, UFO_W, UFO_H, WHITE); } void ufo_erase(struct ufo_t *u) { FILL_RECT(u->x, UFO_TOP, UFO_W, UFO_H, BLACK); } void ufo_move(struct ufo_t *u) { ufo_erase(u); u->x += u->v; if ((u->x <= SCRN_LEFT) || (u->x >= SCRN_RIGHT - UFO_W)) u->status = OBJ_RECYCLE; ufo_draw(u); } void ufo_hit(struct ufo_t *u, uint8_t idx) { u->status = UFO_EXPLOSION; ufo_erase(u); u->img_idx = idx; } boolean ufo_hit_test(struct ufo_t *u, uint16_t x, uint16_t y) { if ((u->status == OBJ_ACTIVE) && (y < UFO_BOTTOM) && (x >= u->x) && (x < u->x + UFO_W)) { u->status = UFO_EXPLOSION; ufo_erase(u); return true; } else return false; } void ufo_update(struct ufo_t *u) { switch (u->status) { case OBJ_ACTIVE: if (u->wait_ctr++ > UFO_WAIT) { u->wait_ctr = 0; ufo_move(u); } break; case OBJ_READY: ufo_appear(u); break; case OBJ_RECYCLE: ufo_erase(u); u->status = OBJ_READY; break; case UFO_EXPLOSION: DRAW_BITMAP(u->x, UFO_TOP, ufo_score_img[u->img_idx], UFO_W, UFO_H, WHITE); default: u->status--; } } ///////////////////////////////////////////////////////// // Bunkers ///////////////////////////////////////////////////////// #define BUNKER_TOP 52 #define BUNKER_BOTTOM (BUNKER_TOP + BUNKER_H) #define BUNKER_W 8 #define BUNKER_H 6 #define BUNKER_LEFT 13 #define BUNKER_SPACE 10 #define BUNKER_NUM 4 const uint8_t bunker_img[BUNKER_W] PROGMEM = { 0x3c, 0x3e, 0x1f, 0x0f, 0x0f, 0x1f, 0x3e, 0x3c }; void draw_bunkers() { uint16_t x = BUNKER_LEFT + SCRN_LEFT; for (uint8_t i = 0; i < BUNKER_NUM; i++) { DRAW_BITMAP(x, BUNKER_TOP, bunker_img, BUNKER_W, BUNKER_H, WHITE); x += BUNKER_W + BUNKER_SPACE; } } ///////////////////////////////////////////////////////// // Bombs ///////////////////////////////////////////////////////// #define BOMB_NUM 3 #define BOMB_WAIT (SCRN_FPS / 20) #define BOMB_V 2 #define BOMB_EXPLOSION (SCRN_FPS / 3) #define BOMB_SHOT_INTERVAL SCRN_FPS struct bomb_t { int16_t x; int16_t y; int8_t wait_ctr; int8_t status; void(*draw_func)(struct bomb_t *b, uint8_t color); void(*shot_func)(struct bomb_t *b); } bombs[BOMB_NUM]; void bomb_draw(struct bomb_t *b, uint8_t color) { b->draw_func(b, color); } void bomb_draw_a(struct bomb_t *b, uint8_t color) { DRAW_PIXEL(b->x + ((1 + b->y / BOMB_V) % 2), b->y - 3, color); DRAW_PIXEL(b->x + (b->y / BOMB_V % 2), b->y - 2, color); DRAW_PIXEL(b->x + ((1 + b->y / BOMB_V) % 2), b->y - 1, color); DRAW_PIXEL(b->x + (b->y / BOMB_V % 2), b->y, color); } void bomb_draw_b(struct bomb_t *b, uint8_t color) { DRAW_PIXEL(b->x + 1, b->y - 1 - (b->y / BOMB_V % 2), color); DRAW_PIXEL(b->x, b->y - 1 - (b->y / BOMB_V % 2), color); DRAW_PIXEL(b->x + 1, b->y, color); DRAW_PIXEL(b->x, b->y, color); } void bomb_draw_c(struct bomb_t *b, uint8_t color) { DRAW_PIXEL(b->x + ((1 + b->y) / BOMB_V % 2), b->y - 2, color); DRAW_PIXEL(b->x + 1, b->y - 1, color); DRAW_PIXEL(b->x, b->y - 1, color); DRAW_PIXEL(b->x + (b->y / BOMB_V % 2), b->y, color); } int8_t search_alien(struct aliens_t *a, int8_t x) { int8_t a_idx = -1; int8_t y = a->bottom - ALN_H; for (uint8_t i = 0; i < ALN_ROW; i++) { a_idx = aliens_hit_test(a, x + ALN_W / 2, y); if (a_idx >= 0) break; else y -= ALN_VSPACING + ALN_H; } return a_idx; } void bomb_shot_from(struct bomb_t *b, uint8_t a_idx) { int8_t i = a_idx; while ((i -= ALN_COLUMN) >= 0) if (g_aliens.exist[i]) a_idx = i; b->status = OBJ_ACTIVE; b->x = g_aliens.nxt_left + A_XOFS(A_COL(a_idx)) + ALN_W / 2 - 1; b->y = g_aliens.nxt_top + A_YOFS(A_ROW(a_idx)) + ALN_H + ALN_VSPACING; } void bomb_shot_a(struct bomb_t *b) { bomb_shot_from(b, g_aliens.nxt_update); } void bomb_shot_c(struct bomb_t *b) { int8_t a_idx = (g_aliens.nxt_update + ALN_COLUMN + ALN_NUM) % ALN_NUM; if (!g_aliens.exist[a_idx]) return; bomb_shot_from(b, a_idx); } void bomb_init(struct bomb_t *b) { b->wait_ctr = 0; b->status = BOMB_EXPLOSION - 1; b->y = SCRN_BOTTOM; b->draw_func = bomb_draw_a; b->shot_func = bomb_shot_a; } void bomb_hitimg_draw(struct bomb_t *b, uint8_t color) { DRAW_PIXEL(b->x, b->y, color); DRAW_PIXEL(b->x + 1, b->y, color); DRAW_PIXEL(b->x, b->y - 1, color); DRAW_PIXEL(b->x + 1, b->y - 1, color); } boolean bomb_bunker_test(struct bomb_t *b) { if ((b->y < BUNKER_BOTTOM) && (b->y > BUNKER_TOP)) if (GET_PIXEL(b->x, b->y) || GET_PIXEL(b->x + 1, b->y) || GET_PIXEL(b->x, b->y - 1) || GET_PIXEL(b->x + 1, b->y - 1)) { return true; } return false; } void bomb_move(struct bomb_t *b) { if (b->wait_ctr++ > BOMB_WAIT) { b->wait_ctr = 0; bomb_draw(b, BLACK); b->y += BOMB_V; if (b->y > SCRN_BOTTOM) b->status = BOMB_EXPLOSION - 1; else if (bomb_bunker_test(b)) b->status = BOMB_EXPLOSION; else bomb_draw(b, WHITE); } } void bomb_shot(struct bomb_t *b) { static uint8_t last_shot = 0; if ((++b->wait_ctr > BOMB_SHOT_INTERVAL) && (++last_shot > BOMB_SHOT_INTERVAL / BOMB_NUM)) { b->shot_func(b); last_shot = 0; } } ///////////////////////////////////////////////////////// // Laser ///////////////////////////////////////////////////////// #define LASER_V 2 #define LASER_WAIT 0 #define LASER_CNTR_INIT 14 // to adjust points of ufo #define LASER_CNTR_MOD 15 #define LASER_EXPLOSION ALN_EXPLOSION const uint8_t laser_explosion_img[3] PROGMEM = { 0x05, 0x02, 0x05 }; struct laser_t { int16_t x; int16_t y; uint8_t shot_ctr; // for calculating ufo score int8_t status; }; void laser_init(struct laser_t *l) { l->status = OBJ_READY; l->shot_ctr = LASER_CNTR_INIT; } void laser_draw_explosion(struct laser_t *l, uint8_t color) { DRAW_BITMAP(l->x - 1, l->y, laser_explosion_img, 3, 3, color); } boolean laser_bunker_test(struct laser_t *l) { if ((l->y < BUNKER_BOTTOM) && (l->y > BUNKER_TOP) && (l->y > g_aliens.bottom)) if (GET_PIXEL(l->x, l->y) || (GET_PIXEL(l->x, l->y + 1))) return true; return false; } void laser_move(struct laser_t *l) { if (l->status == OBJ_ACTIVE) { l->y -= LASER_V; if (l->y <= 0) l->status = LASER_EXPLOSION; } } void laser_draw(struct laser_t *l, uint8_t color) { DRAW_PIXEL(l->x, l->y, color); DRAW_PIXEL(l->x, l->y + 1, color); } void laser_shoot(struct laser_t *l, uint16_t x, uint16_t y) { if ((l->status == OBJ_READY) && (g_aliens.status == OBJ_ACTIVE)) if (KEY_PRESSED(A_BUTTON) || KEY_PRESSED(B_BUTTON)) { l->status = OBJ_ACTIVE; l->x = x; l->y = y; l->shot_ctr = (l->shot_ctr + 1) % LASER_CNTR_MOD; g_ufo.l_or_r = l->shot_ctr & 0x1; } } uint8_t laser_ufo_point(struct laser_t *l) { uint8_t idx; switch (l->shot_ctr) { case 0: case 1: case 6: case 11: idx = 0; break; case 3: case 12: idx = 2; break; case 7: idx = 3; break; default: idx = 1; break; } return idx; } uint8_t laser_update(struct laser_t *l) { // returns point if laser hits const uint8_t alien_points[5] = { 3, 2, 2, 1, 1 }; const uint8_t ufo_points[4] = { 5, 10, 15, 30 }; int8_t hit; uint8_t result = 0; switch (l->status) { case OBJ_READY: // laser shot in cannon_update() break; case OBJ_ACTIVE: laser_draw(l, BLACK); laser_move(l); hit = aliens_hit_test(&g_aliens, l->x, l->y); if (hit >= 0) { aliens_hit(&g_aliens, hit); result = alien_points[A_ROW(hit)]; l->status = OBJ_READY; } else if (ufo_hit_test(&g_ufo, l->x, l->y)) { uint8_t idx = laser_ufo_point(l); ufo_hit(&g_ufo, idx); result = ufo_points[idx]; l->status = OBJ_READY; } else if (laser_bunker_test(l)) { l->status = LASER_EXPLOSION; } else { for (uint8_t i = 0; i < BOMB_NUM; i++) { if ((bombs[i].status == OBJ_ACTIVE) && ((l->x == bombs[i].x) || (l->x == 1 + bombs[i].x)) && ((l->y == bombs[i].y) || (l->y == 1 + bombs[i].y))) l->status = LASER_EXPLOSION; } } if (l->status == OBJ_ACTIVE) laser_draw(l, WHITE); break; case LASER_EXPLOSION: laser_draw(l, BLACK); laser_draw_explosion(l, WHITE); l->status--; break; case OBJ_RECYCLE: laser_draw_explosion(l, BLACK); l->status = OBJ_READY; break; default: l->status--; } return result; } ///////////////////////////////////////////////////////// // Cannon ///////////////////////////////////////////////////////// #define CANNON_W 5 #define CANNON_H 3 #define CANNON_V 1 #define CANNON_C_OFS 2 #define CANNON_WAIT 0 #define CANNON_TOP 61 #define CANNON_EXPLOSION 127 const uint8_t cannon_img[CANNON_W] PROGMEM = { 0x06, 0x06, 0x07, 0x06, 0x06 }; const uint8_t cannon_hit_img[2][CANNON_W] PROGMEM = { { 0x01, 0x05, 0x06, 0x06, 0x05 }, { 0x04, 0x07, 0x04, 0x05, 0x02 } }; struct cannon_t { uint16_t x; uint8_t left; struct laser_t laser; uint8_t wait_ctr; int8_t status; } g_cannon; void cannon_init(struct cannon_t *c) { c->x = 32; c->wait_ctr = 0; laser_init(&c->laser); c->status = OBJ_ACTIVE; } void cannon_erase(struct cannon_t *c) { FILL_RECT(c->x, CANNON_TOP, CANNON_W, CANNON_H, BLACK); } void cannon_draw(struct cannon_t *c) { DRAW_BITMAP(c->x, CANNON_TOP, cannon_img, CANNON_W, CANNON_H, WHITE); } void cannon_move(struct cannon_t *c) { cannon_erase(c); if (KEY_PRESSED(RIGHT_BUTTON)) { c->x += CANNON_V; } if (KEY_PRESSED(LEFT_BUTTON)) { c->x -= CANNON_V; } c->x = constrain(c->x, SCRN_LEFT, SCRN_RIGHT - CANNON_W); cannon_draw(c); } void cannon_hit(struct cannon_t *c) { c->status = CANNON_EXPLOSION; switch (c->laser.status) { case OBJ_ACTIVE: laser_draw(&c->laser, BLACK); break; case OBJ_READY: break; default: laser_draw_explosion(&c->laser, BLACK); } c->laser.status = OBJ_RECYCLE; } boolean cannon_hit_test(struct cannon_t *c, uint16_t x, uint16_t y) { if ((y > CANNON_TOP) && (y < CANNON_TOP + CANNON_H) && (x >= c->x) && (x <= c->x + CANNON_W)) { return true; } else return false; } void cannon_update(struct cannon_t *c) { switch (c->status) { case OBJ_ACTIVE: if (c->wait_ctr++ > CANNON_WAIT) { c->wait_ctr = 0; cannon_move(c); laser_shoot(&c->laser, c->x + CANNON_C_OFS, CANNON_TOP - 1); } break; case OBJ_RECYCLE: laser_draw(&c->laser, BLACK); c->status = OBJ_READY; break; default: // CANNON_EXPLOSION cannon_erase(c); uint8_t *img = (uint8_t *)cannon_hit_img[(c->status >> 2) % 2]; DRAW_BITMAP(c->x, CANNON_TOP, img, CANNON_W, CANNON_H, WHITE); c->status--; break; } } void bomb_shot_b(struct bomb_t *b) { int8_t a_idx = search_alien(&g_aliens, g_cannon.x + 2); if (a_idx >= 0) bomb_shot_from(b, a_idx); } void bomb_update(struct bomb_t *b) { switch (b->status) { case OBJ_READY: bomb_shot(b); if (b->status == OBJ_ACTIVE) { bomb_draw(b, WHITE); } break; case OBJ_ACTIVE: bomb_move(b); if (cannon_hit_test(&g_cannon, b->x + 1, b->y)) { cannon_hit(&g_cannon); } break; case OBJ_RECYCLE: bomb_hitimg_draw(b, BLACK); b->status = OBJ_READY; b->wait_ctr = 0; break; case BOMB_EXPLOSION: bomb_hitimg_draw(b, WHITE); default: b->status--; } } ///////////////////////////////////////////////////////// // Game ///////////////////////////////////////////////////////// enum game_status_t { GameLost, GameOnGoing, GameRestart, GameOver, GameTitle }; struct game_t { int16_t score; int16_t high_score; uint8_t stage; uint8_t left; game_status_t status; }g_game; #define SC_X 109 // score display location #define SC_Y 20 #define HSC_Y 30 // high-score display location void print_score() { print_int(SC_X, SC_Y, g_game.score, 4); } void print_high_score() { print_int(SC_X, HSC_Y, g_game.high_score, 4); } void print_cannon_left(uint8_t n) { draw_digit(13, 20, n); } #define TITLE_LEFT 31 #define TITLE_TOP 28 #define TITLE_W 64 #define TITLE_H 8 void game_title_draw() { static const uint8_t title_img[TITLE_W] PROGMEM = { 0xf8, 0xfc, 0x24, 0x24, 0x3c, 0x18, 0, 0x3d, 0x3d, 0, 0, 0x18, 0x3c, 0x24, 0x24, 0x24, 0, 0x18, 0x3c, 0x24, 0x24, 0x3c, 0x18, 0, 0x04, 0x1c, 0x38, 0x20, 0x38, 0x1c, 0x04, 0x10, 0x38, 0x2a, 0x2a, 0x2e, 0x3c, 0x20, 0x18, 0x3c, 0x24, 0x24, 0x27, 0x3f, 0x20, 0, 0x1c, 0x3e, 0x2a, 0x2a, 0x2e, 0x0c, 0, 0x04, 0x3c, 0x3e, 0x02, 0x02, 0x24, 0x2e, 0x2a, 0x2a, 0x3a, 0x12 }; DRAW_BITMAP(TITLE_LEFT, TITLE_TOP, title_img, TITLE_W, TITLE_H, WHITE); } void game_title_alien_draw(int16_t y0, uint8_t c) { for (uint8_t i = 0; i < 8; i++) { int16_t x = TITLE_LEFT - 4 + ALN_W * i; int16_t y = y0 - 20 + ALN_H * i; switch (i / 3) { case 0: DRAW_BITMAP(x, y, aln3_img[y0 / 8 % 2], ALN_W, ALN_H, c); break; case 1: DRAW_BITMAP(x, y, aln2_img[y0 / 8 % 2], ALN_W, ALN_H, c); break; default: DRAW_BITMAP(x, y, aln1_img[y0 / 8 % 2], ALN_W, ALN_H, c); } } for (uint8_t i = 8; i < 15; i++) { int16_t x = TITLE_LEFT - 4 + ALN_W * i; int16_t y = y0 - 20 + ALN_H * (14 - i); switch ((14 - i) / 3) { case 0: DRAW_BITMAP(x, y, aln3_img[y0 / 8 % 2], ALN_W, ALN_H, c); break; case 1: DRAW_BITMAP(x, y, aln2_img[y0 / 8 % 2], ALN_W, ALN_H, c); break; default: DRAW_BITMAP(x, y, aln1_img[y0 / 8 % 2], ALN_W, ALN_H, c); } } int16_t x1 = UFO_W * 23 - y0; int16_t x2 = y0 - UFO_W * 6; DRAW_BITMAP(x1, TITLE_TOP, ufo_img, UFO_W, UFO_H, c); DRAW_BITMAP(x2, TITLE_TOP + UFO_H, ufo_img, UFO_W, UFO_H, c); } #define SND_LASER 0 #define SND_ALIEN 1 #define SND_UFOFLY 2 #define SND_UFOHIT 3 #define SND_CANNON 4 #define SND_1UP 5 #define SOUND_FX_NUM 6 int16_t snd1[5] = { // laser NOTE_B6, NOTE_C7, 0, NOTE_B6, -1 }; int16_t snd2[25] = { // alien explosion NOTE_G5, NOTE_FS5, NOTE_F5, NOTE_E5, 0, NOTE_A6, NOTE_GS6, NOTE_G6, NOTE_FS6, NOTE_F6, NOTE_E6, NOTE_DS6, NOTE_D6, NOTE_CS6, NOTE_C6, NOTE_B5, NOTE_AS5, NOTE_E6, NOTE_DS6, NOTE_D6, NOTE_CS6,-1 }; int16_t snd3[13] = { // ufo flying 120, 241, 570, 1020, 1470, 1800, 1920, 1800, 1470, 1020, 570, 241, -1 }; int16_t snd4[13] = { // ufo explosion 120, 180, 345, 570, 795, 960, 1020, 960, 795, 570, 345, 180, -1 }; int16_t snd5[3] = { // cannon explosion NOTE_B2, 0, -1 }; int16_t snd6[18] = { // cannon explosion 1000, 0, 1000, 0, 1000, 0, 1000, 0, 1000, 0, 1000, 0, 1000, 0, 1000, 0, 1000, -1 }; struct sound_fx_t snd_fx[SOUND_FX_NUM] = { { snd1, 20, 0, false, 0, 0, SoundReady }, // data, gate_time, clk, repeat, (internal vars) { snd2, 20, 0, false, 0, 0, SoundReady }, { snd3, 20, 0, true, 0, 0, SoundReady }, { snd4, 20, 0, true, 0, 0, SoundReady }, { snd5, 20, 0, true, 0, 0, SoundReady }, { snd6, 100, 6, false, 0, 0, SoundReady } }; int16_t bgm_s[5] = { NOTE_E3, NOTE_D3, NOTE_C3, NOTE_B2, -1 }; struct sound_fx_t bgm = { bgm_s, 70, 52, true, 0, false }; #define BGM_STEP_NUM 10 uint8_t bgm_speed[BGM_STEP_NUM] = { 52, 44, 36, 28, 23, 18, 13, 10, 7, 5 }; uint8_t bgm_alien_num[BGM_STEP_NUM] = { 50, 40, 30, 22, 16, 12, 8, 4, 2, 1 }; void game_sound_main() { switch (g_aliens.status) { case OBJ_ACTIVE: for (uint8_t i = 0; i < BGM_STEP_NUM; i++) if (g_aliens.alive == bgm_alien_num[i]) sound_set_tempo(&bgm, bgm_speed[i]); sound_start(&bgm); break; case ALN_EXPLOSION - 1: if (sound_ready(&snd_fx[SND_ALIEN])) sound_start(&snd_fx[SND_ALIEN]); break; default: sound_restart(&snd_fx[SND_ALIEN]); break; } switch (g_ufo.status) { case OBJ_ACTIVE: sound_start(&snd_fx[SND_UFOFLY]); break; case UFO_EXPLOSION - 1: sound_stop(&snd_fx[SND_UFOFLY]); sound_start(&snd_fx[SND_UFOHIT]); break; case OBJ_RECYCLE: sound_stop(&snd_fx[SND_UFOFLY]); sound_restart(&snd_fx[SND_UFOFLY]); sound_stop(&snd_fx[SND_UFOHIT]); sound_restart(&snd_fx[SND_UFOHIT]); break; default: break; } switch (g_cannon.status) { case CANNON_EXPLOSION - 1: sound_start(&snd_fx[SND_CANNON]); break; case OBJ_RECYCLE: sound_stop(&snd_fx[SND_CANNON]); sound_restart(&snd_fx[SND_CANNON]); break; default: break; } switch (g_cannon.laser.status) { case OBJ_ACTIVE: if (sound_ready(&snd_fx[SND_LASER])) sound_start(&snd_fx[SND_LASER]); break; case OBJ_RECYCLE: sound_stop(&snd_fx[SND_LASER]); break; case OBJ_READY: sound_restart(&snd_fx[SND_LASER]); break; default: break; } switch (g_game.status) { case GameOnGoing: // sound_play(&bgm); for (uint8_t i = 0; i < SOUND_FX_NUM; i++) sound_play(&snd_fx[i]); break; default: // sound_stop(&bgm); // sound_restart(&bgm); for (uint8_t i = 0; i < SOUND_FX_NUM; i++) { sound_stop(&snd_fx[i]); sound_restart(&snd_fx[i]); } } } void draw_game_field() { DRAW_V_LINE(SCRN_LEFT - 1, 0, 64, WHITE); DRAW_V_LINE(SCRN_RIGHT, 0, 64, WHITE); print_int(SC_X + 16, SC_Y, 0, 1); print_int(SC_X + 16, HSC_Y, 0, 1); print_high_score(); DRAW_BITMAP(4, 22, cannon_img, CANNON_W, CANNON_H, WHITE); print_cannon_left(0); } void game_initialize() { g_game.score = 0; g_game.high_score = 0; g_game.stage = 0; g_game.left = 3; } boolean game_new_game() { static boolean pressed_A = false; static boolean pressed_B = false; if (button_pressed(A_BUTTON, &pressed_A)) { SOUND_ON; return true; } else if (button_pressed(B_BUTTON, &pressed_B)) { SOUND_OFF; return true; } else return false; } void bomb_init_all() { bomb_init(&bombs[0]); bombs[1].draw_func = bomb_draw_a; bombs[0].draw_func = bomb_draw_a; bomb_init(&bombs[1]); bombs[1].draw_func = bomb_draw_b; bombs[1].shot_func = bomb_shot_b; bomb_init(&bombs[2]); bombs[2].draw_func = bomb_draw_c; bombs[2].shot_func = bomb_shot_c; } void game_restart() { FILL_RECT(SCRN_LEFT, 0, SCRN_RIGHT - SCRN_LEFT, SCRN_BOTTOM, BLACK); cannon_init(&g_cannon); aliens_init(&g_aliens, g_game.stage); ufo_init(&g_ufo); draw_bunkers(); bomb_init_all(); } #define SCORE_1UP 150 void game_main() { cannon_update(&g_cannon); if (g_cannon.status == OBJ_ACTIVE) { uint8_t sc = laser_update(&g_cannon.laser); if (sc > 0) { if ((g_game.score < SCORE_1UP) && (g_game.score + sc > SCORE_1UP)) { print_cannon_left(++g_game.left); sound_start(&snd_fx[SND_1UP]); } g_game.score += sc; print_score(); } for (uint8_t i = 0; i < BOMB_NUM; i++) bomb_update(&bombs[i]); ufo_update(&g_ufo); aliens_update(&g_aliens); } } void print_game_over() { FILL_RECT(33, 23, 60, 37, BLACK); G_TXT_CURSOR(37, 28); G_PRINT(F(""GAME OVER"")); } void setup() { arduboy.begin(); arduboy.clear(); arduboy.setFrameRate(SCRN_FPS); beep.begin(); g_game.status = GameTitle; } #define TITLE_TIME 200 void loop() { if (!(arduboy.nextFrame())) return; static int16_t passed_time = 0; switch (g_game.status) { case GameRestart: game_restart(); g_game.status = GameOnGoing; break; case GameOnGoing: game_main(); if (g_cannon.status == OBJ_READY) { g_game.status = GameLost; } if ((g_aliens.alive == 0) && g_aliens.status == OBJ_ACTIVE) { g_game.stage++; g_game.status = GameRestart; } if (g_aliens.touch_down) { print_game_over(); g_game.status = GameOver; } game_sound_main(); break; case GameLost: print_cannon_left(--g_game.left); cannon_erase(&g_cannon); cannon_init(&g_cannon); for (uint8_t i = 0; i < BOMB_NUM; i++) { bomb_draw(&bombs[i], BLACK); } bomb_init_all(); if (g_game.left > 0) g_game.status = GameOnGoing; else { print_game_over(); if (g_game.score > g_game.high_score) g_game.high_score = g_game.score; g_game.status = GameOver; } break; case GameOver: if (passed_time++ > TITLE_TIME) { passed_time = 0; g_game.status = GameTitle; } else if (game_new_game()) { // true if A or B button is pushed game_initialize(); print_cannon_left(g_game.left); print_score(); g_game.status = GameRestart; passed_time = 0; } break; case GameTitle: switch (passed_time) { case 1: case 20: case 40: FILL_RECT(0, 0, 128, 64, BLACK); break; case 10: case 30: case 50: game_title_draw(); break; case 600: passed_time = 0; break; default: if ((passed_time > 60) && (passed_time % 3 == 0)) { game_title_alien_draw(passed_time / 3 - 21, BLACK); game_title_alien_draw(passed_time / 3 - 20, WHITE); } break; } passed_time++; if (game_new_game()) { // true if A or B button is pushed FILL_RECT(0, 0, 128, 64, BLACK); draw_game_field(); game_initialize(); print_cannon_left(g_game.left); print_score(); g_game.status = GameRestart; passed_time = 0; } } arduboy.display(); } ",12160,False,2148.252301330915,median "pragma Style_Checks (Off); -- This spec has been automatically generated from STM32G474xx.svd pragma Restrictions (No_Elaboration_Code); with HAL; with System; package STM32_SVD.EXTI is pragma Preelaborate; --------------- -- Registers -- --------------- -- IMR1_IM array type IMR1_IM_Field_Array is array (0 .. 31) of Boolean with Component_Size => 1, Size => 32; -- Interrupt mask register type IMR1_Register (As_Array : Boolean := False) is record case As_Array is when False => -- IM as a value Val : HAL.UInt32; when True => -- IM as an array Arr : IMR1_IM_Field_Array; end case; end record with Unchecked_Union, Size => 32, Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for IMR1_Register use record Val at 0 range 0 .. 31; Arr at 0 range 0 .. 31; end record; -- EMR1_EM array type EMR1_EM_Field_Array is array (0 .. 31) of Boolean with Component_Size => 1, Size => 32; -- Event mask register type EMR1_Register (As_Array : Boolean := False) is record case As_Array is when False => -- EM as a value Val : HAL.UInt32; when True => -- EM as an array Arr : EMR1_EM_Field_Array; end case; end record with Unchecked_Union, Size => 32, Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for EMR1_Register use record Val at 0 range 0 .. 31; Arr at 0 range 0 .. 31; end record; -- RTSR1_RT array type RTSR1_RT_Field_Array is array (0 .. 17) of Boolean with Component_Size => 1, Size => 18; -- Type definition for RTSR1_RT type RTSR1_RT_Field (As_Array : Boolean := False) is record case As_Array is when False => -- RT as a value Val : HAL.UInt18; when True => -- RT as an array Arr : RTSR1_RT_Field_Array; end case; end record with Unchecked_Union, Size => 18; for RTSR1_RT_Field use record Val at 0 range 0 .. 17; Arr at 0 range 0 .. 17; end record; -- RTSR1_RT array type RTSR1_RT_Field_Array_1 is array (19 .. 22) of Boolean with Component_Size => 1, Size => 4; -- Type definition for RTSR1_RT type RTSR1_RT_Field_1 (As_Array : Boolean := False) is record case As_Array is when False => -- RT as a value Val : HAL.UInt4; when True => -- RT as an array Arr : RTSR1_RT_Field_Array_1; end case; end record with Unchecked_Union, Size => 4; for RTSR1_RT_Field_1 use record Val at 0 range 0 .. 3; Arr at 0 range 0 .. 3; end record; -- RTSR1_RT array type RTSR1_RT_Field_Array_2 is array (29 .. 31) of Boolean with Component_Size => 1, Size => 3; -- Type definition for RTSR1_RT type RTSR1_RT_Field_2 (As_Array : Boolean := False) is record case As_Array is when False => -- RT as a value Val : HAL.UInt3; when True => -- RT as an array Arr : RTSR1_RT_Field_Array_2; end case; end record with Unchecked_Union, Size => 3; for RTSR1_RT_Field_2 use record Val at 0 range 0 .. 2; Arr at 0 range 0 .. 2; end record; -- Rising Trigger selection register type RTSR1_Register is record -- Rising trigger event configuration of line 0 RT : RTSR1_RT_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_18_18 : HAL.Bit := 16#0#; -- Rising trigger event configuration of line 19 RT_1 : RTSR1_RT_Field_1 := (As_Array => False, Val => 16#0#); -- unspecified Reserved_23_28 : HAL.UInt6 := 16#0#; -- Rising trigger event configuration of line 29 RT_2 : RTSR1_RT_Field_2 := (As_Array => False, Val => 16#0#); end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for RTSR1_Register use record RT at 0 range 0 .. 17; Reserved_18_18 at 0 range 18 .. 18; RT_1 at 0 range 19 .. 22; Reserved_23_28 at 0 range 23 .. 28; RT_2 at 0 range 29 .. 31; end record; -- FTSR1_FT array type FTSR1_FT_Field_Array is array (0 .. 17) of Boolean with Component_Size => 1, Size => 18; -- Type definition for FTSR1_FT type FTSR1_FT_Field (As_Array : Boolean := False) is record case As_Array is when False => -- FT as a value Val : HAL.UInt18; when True => -- FT as an array Arr : FTSR1_FT_Field_Array; end case; end record with Unchecked_Union, Size => 18; for FTSR1_FT_Field use record Val at 0 range 0 .. 17; Arr at 0 range 0 .. 17; end record; -- FTSR1_FT array type FTSR1_FT_Field_Array_1 is array (19 .. 22) of Boolean with Component_Size => 1, Size => 4; -- Type definition for FTSR1_FT type FTSR1_FT_Field_1 (As_Array : Boolean := False) is record case As_Array is when False => -- FT as a value Val : HAL.UInt4; when True => -- FT as an array Arr : FTSR1_FT_Field_Array_1; end case; end record with Unchecked_Union, Size => 4; for FTSR1_FT_Field_1 use record Val at 0 range 0 .. 3; Arr at 0 range 0 .. 3; end record; -- FTSR1_FT array type FTSR1_FT_Field_Array_2 is array (29 .. 31) of Boolean with Component_Size => 1, Size => 3; -- Type definition for FTSR1_FT type FTSR1_FT_Field_2 (As_Array : Boolean := False) is record case As_Array is when False => -- FT as a value Val : HAL.UInt3; when True => -- FT as an array Arr : FTSR1_FT_Field_Array_2; end case; end record with Unchecked_Union, Size => 3; for FTSR1_FT_Field_2 use record Val at 0 range 0 .. 2; Arr at 0 range 0 .. 2; end record; -- Falling Trigger selection register type FTSR1_Register is record -- Falling trigger event configuration of line 0 FT : FTSR1_FT_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_18_18 : HAL.Bit := 16#0#; -- Falling trigger event configuration of line 19 FT_1 : FTSR1_FT_Field_1 := (As_Array => False, Val => 16#0#); -- unspecified Reserved_23_28 : HAL.UInt6 := 16#0#; -- Falling trigger event configuration of line 29 FT_2 : FTSR1_FT_Field_2 := (As_Array => False, Val => 16#0#); end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for FTSR1_Register use record FT at 0 range 0 .. 17; Reserved_18_18 at 0 range 18 .. 18; FT_1 at 0 range 19 .. 22; Reserved_23_28 at 0 range 23 .. 28; FT_2 at 0 range 29 .. 31; end record; -- SWIER1_SWI array type SWIER1_SWI_Field_Array is array (0 .. 17) of Boolean with Component_Size => 1, Size => 18; -- Type definition for SWIER1_SWI type SWIER1_SWI_Field (As_Array : Boolean := False) is record case As_Array is when False => -- SWI as a value Val : HAL.UInt18; when True => -- SWI as an array Arr : SWIER1_SWI_Field_Array; end case; end record with Unchecked_Union, Size => 18; for SWIER1_SWI_Field use record Val at 0 range 0 .. 17; Arr at 0 range 0 .. 17; end record; -- SWIER1_SWI array type SWIER1_SWI_Field_Array_1 is array (19 .. 22) of Boolean with Component_Size => 1, Size => 4; -- Type definition for SWIER1_SWI type SWIER1_SWI_Field_1 (As_Array : Boolean := False) is record case As_Array is when False => -- SWI as a value Val : HAL.UInt4; when True => -- SWI as an array Arr : SWIER1_SWI_Field_Array_1; end case; end record with Unchecked_Union, Size => 4; for SWIER1_SWI_Field_1 use record Val at 0 range 0 .. 3; Arr at 0 range 0 .. 3; end record; -- SWIER1_SWI array type SWIER1_SWI_Field_Array_2 is array (29 .. 31) of Boolean with Component_Size => 1, Size => 3; -- Type definition for SWIER1_SWI type SWIER1_SWI_Field_2 (As_Array : Boolean := False) is record case As_Array is when False => -- SWI as a value Val : HAL.UInt3; when True => -- SWI as an array Arr : SWIER1_SWI_Field_Array_2; end case; end record with Unchecked_Union, Size => 3; for SWIER1_SWI_Field_2 use record Val at 0 range 0 .. 2; Arr at 0 range 0 .. 2; end record; -- Software interrupt event register type SWIER1_Register is record -- Software Interrupt on line 0 SWI : SWIER1_SWI_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_18_18 : HAL.Bit := 16#0#; -- Software Interrupt on line 19 SWI_1 : SWIER1_SWI_Field_1 := (As_Array => False, Val => 16#0#); -- unspecified Reserved_23_28 : HAL.UInt6 := 16#0#; -- Software Interrupt on line 29 SWI_2 : SWIER1_SWI_Field_2 := (As_Array => False, Val => 16#0#); end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SWIER1_Register use record SWI at 0 range 0 .. 17; Reserved_18_18 at 0 range 18 .. 18; SWI_1 at 0 range 19 .. 22; Reserved_23_28 at 0 range 23 .. 28; SWI_2 at 0 range 29 .. 31; end record; -- PR1_PIF array type PR1_PIF_Field_Array is array (0 .. 17) of Boolean with Component_Size => 1, Size => 18; -- Type definition for PR1_PIF type PR1_PIF_Field (As_Array : Boolean := False) is record case As_Array is when False => -- PIF as a value Val : HAL.UInt18; when True => -- PIF as an array Arr : PR1_PIF_Field_Array; end case; end record with Unchecked_Union, Size => 18; for PR1_PIF_Field use record Val at 0 range 0 .. 17; Arr at 0 range 0 .. 17; end record; -- PR1_PIF array type PR1_PIF_Field_Array_1 is array (19 .. 22) of Boolean with Component_Size => 1, Size => 4; -- Type definition for PR1_PIF type PR1_PIF_Field_1 (As_Array : Boolean := False) is record case As_Array is when False => -- PIF as a value Val : HAL.UInt4; when True => -- PIF as an array Arr : PR1_PIF_Field_Array_1; end case; end record with Unchecked_Union, Size => 4; for PR1_PIF_Field_1 use record Val at 0 range 0 .. 3; Arr at 0 range 0 .. 3; end record; -- PR1_PIF array type PR1_PIF_Field_Array_2 is array (29 .. 31) of Boolean with Component_Size => 1, Size => 3; -- Type definition for PR1_PIF type PR1_PIF_Field_2 (As_Array : Boolean := False) is record case As_Array is when False => -- PIF as a value Val : HAL.UInt3; when True => -- PIF as an array Arr : PR1_PIF_Field_Array_2; end case; end record with Unchecked_Union, Size => 3; for PR1_PIF_Field_2 use record Val at 0 range 0 .. 2; Arr at 0 range 0 .. 2; end record; -- Pending register type PR1_Register is record -- Pending bit 0 PIF : PR1_PIF_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_18_18 : HAL.Bit := 16#0#; -- Pending bit 19 PIF_1 : PR1_PIF_Field_1 := (As_Array => False, Val => 16#0#); -- unspecified Reserved_23_28 : HAL.UInt6 := 16#0#; -- Pending bit 29 PIF_2 : PR1_PIF_Field_2 := (As_Array => False, Val => 16#0#); end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for PR1_Register use record PIF at 0 range 0 .. 17; Reserved_18_18 at 0 range 18 .. 18; PIF_1 at 0 range 19 .. 22; Reserved_23_28 at 0 range 23 .. 28; PIF_2 at 0 range 29 .. 31; end record; -- IMR2_IM array type IMR2_IM_Field_Array is array (32 .. 37) of Boolean with Component_Size => 1, Size => 6; -- Type definition for IMR2_IM type IMR2_IM_Field (As_Array : Boolean := False) is record case As_Array is when False => -- IM as a value Val : HAL.UInt6; when True => -- IM as an array Arr : IMR2_IM_Field_Array; end case; end record with Unchecked_Union, Size => 6; for IMR2_IM_Field use record Val at 0 range 0 .. 5; Arr at 0 range 0 .. 5; end record; -- IMR2_IM array type IMR2_IM_Field_Array_1 is array (40 .. 43) of Boolean with Component_Size => 1, Size => 4; -- Type definition for IMR2_IM type IMR2_IM_Field_1 (As_Array : Boolean := False) is record case As_Array is when False => -- IM as a value Val : HAL.UInt4; when True => -- IM as an array Arr : IMR2_IM_Field_Array_1; end case; end record with Unchecked_Union, Size => 4; for IMR2_IM_Field_1 use record Val at 0 range 0 .. 3; Arr at 0 range 0 .. 3; end record; -- Interrupt mask register type IMR2_Register is record -- Interrupt Mask on external/internal line 32 IM : IMR2_IM_Field := (As_Array => False, Val => 16#1#); -- unspecified Reserved_6_7 : HAL.UInt2 := 16#2#; -- Interrupt Mask on external/internal line 40 IM_1 : IMR2_IM_Field_1 := (As_Array => False, Val => 16#1#); -- unspecified Reserved_12_31 : HAL.UInt20 := 16#FFFFF#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for IMR2_Register use record IM at 0 range 0 .. 5; Reserved_6_7 at 0 range 6 .. 7; IM_1 at 0 range 8 .. 11; Reserved_12_31 at 0 range 12 .. 31; end record; -- EMR2_EM array type EMR2_EM_Field_Array is array (32 .. 37) of Boolean with Component_Size => 1, Size => 6; -- Type definition for EMR2_EM type EMR2_EM_Field (As_Array : Boolean := False) is record case As_Array is when False => -- EM as a value Val : HAL.UInt6; when True => -- EM as an array Arr : EMR2_EM_Field_Array; end case; end record with Unchecked_Union, Size => 6; for EMR2_EM_Field use record Val at 0 range 0 .. 5; Arr at 0 range 0 .. 5; end record; -- EMR2_EM array type EMR2_EM_Field_Array_1 is array (40 .. 43) of Boolean with Component_Size => 1, Size => 4; -- Type definition for EMR2_EM type EMR2_EM_Field_1 (As_Array : Boolean := False) is record case As_Array is when False => -- EM as a value Val : HAL.UInt4; when True => -- EM as an array Arr : EMR2_EM_Field_Array_1; end case; end record with Unchecked_Union, Size => 4; for EMR2_EM_Field_1 use record Val at 0 range 0 .. 3; Arr at 0 range 0 .. 3; end record; -- Event mask register type EMR2_Register is record -- Event mask on external/internal line 32 EM : EMR2_EM_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_6_7 : HAL.UInt2 := 16#0#; -- Event mask on external/internal line 40 EM_1 : EMR2_EM_Field_1 := (As_Array => False, Val => 16#0#); -- unspecified Reserved_12_31 : HAL.UInt20 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for EMR2_Register use record EM at 0 range 0 .. 5; Reserved_6_7 at 0 range 6 .. 7; EM_1 at 0 range 8 .. 11; Reserved_12_31 at 0 range 12 .. 31; end record; -- RTSR2_RT array type RTSR2_RT_Field_Array is array (32 .. 33) of Boolean with Component_Size => 1, Size => 2; -- Type definition for RTSR2_RT type RTSR2_RT_Field (As_Array : Boolean := False) is record case As_Array is when False => -- RT as a value Val : HAL.UInt2; when True => -- RT as an array Arr : RTSR2_RT_Field_Array; end case; end record with Unchecked_Union, Size => 2; for RTSR2_RT_Field use record Val at 0 range 0 .. 1; Arr at 0 range 0 .. 1; end record; -- RTSR2_RT array type RTSR2_RT_Field_Array_1 is array (40 .. 41) of Boolean with Component_Size => 1, Size => 2; -- Type definition for RTSR2_RT type RTSR2_RT_Field_1 (As_Array : Boolean := False) is record case As_Array is when False => -- RT as a value Val : HAL.UInt2; when True => -- RT as an array Arr : RTSR2_RT_Field_Array_1; end case; end record with Unchecked_Union, Size => 2; for RTSR2_RT_Field_1 use record Val at 0 range 0 .. 1; Arr at 0 range 0 .. 1; end record; -- Rising Trigger selection register type RTSR2_Register is record -- Rising trigger event configuration bit of line 32 RT : RTSR2_RT_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_2_7 : HAL.UInt6 := 16#0#; -- Rising trigger event configuration bit of line 40 RT_1 : RTSR2_RT_Field_1 := (As_Array => False, Val => 16#0#); -- unspecified Reserved_10_31 : HAL.UInt22 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for RTSR2_Register use record RT at 0 range 0 .. 1; Reserved_2_7 at 0 range 2 .. 7; RT_1 at 0 range 8 .. 9; Reserved_10_31 at 0 range 10 .. 31; end record; -- FTSR2_FT array type FTSR2_FT_Field_Array is array (32 .. 33) of Boolean with Component_Size => 1, Size => 2; -- Type definition for FTSR2_FT type FTSR2_FT_Field (As_Array : Boolean := False) is record case As_Array is when False => -- FT as a value Val : HAL.UInt2; when True => -- FT as an array Arr : FTSR2_FT_Field_Array; end case; end record with Unchecked_Union, Size => 2; for FTSR2_FT_Field use record Val at 0 range 0 .. 1; Arr at 0 range 0 .. 1; end record; -- FTSR2_FT array type FTSR2_FT_Field_Array_1 is array (40 .. 41) of Boolean with Component_Size => 1, Size => 2; -- Type definition for FTSR2_FT type FTSR2_FT_Field_1 (As_Array : Boolean := False) is record case As_Array is when False => -- FT as a value Val : HAL.UInt2; when True => -- FT as an array Arr : FTSR2_FT_Field_Array_1; end case; end record with Unchecked_Union, Size => 2; for FTSR2_FT_Field_1 use record Val at 0 range 0 .. 1; Arr at 0 range 0 .. 1; end record; -- Falling Trigger selection register type FTSR2_Register is record -- Falling trigger event configuration bit of line 32 FT : FTSR2_FT_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_2_7 : HAL.UInt6 := 16#0#; -- Falling trigger event configuration bit of line 40 FT_1 : FTSR2_FT_Field_1 := (As_Array => False, Val => 16#0#); -- unspecified Reserved_10_31 : HAL.UInt22 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for FTSR2_Register use record FT at 0 range 0 .. 1; Reserved_2_7 at 0 range 2 .. 7; FT_1 at 0 range 8 .. 9; Reserved_10_31 at 0 range 10 .. 31; end record; -- SWIER2_SWI array type SWIER2_SWI_Field_Array is array (32 .. 33) of Boolean with Component_Size => 1, Size => 2; -- Type definition for SWIER2_SWI type SWIER2_SWI_Field (As_Array : Boolean := False) is record case As_Array is when False => -- SWI as a value Val : HAL.UInt2; when True => -- SWI as an array Arr : SWIER2_SWI_Field_Array; end case; end record with Unchecked_Union, Size => 2; for SWIER2_SWI_Field use record Val at 0 range 0 .. 1; Arr at 0 range 0 .. 1; end record; -- SWIER2_SWI array type SWIER2_SWI_Field_Array_1 is array (40 .. 41) of Boolean with Component_Size => 1, Size => 2; -- Type definition for SWIER2_SWI type SWIER2_SWI_Field_1 (As_Array : Boolean := False) is record case As_Array is when False => -- SWI as a value Val : HAL.UInt2; when True => -- SWI as an array Arr : SWIER2_SWI_Field_Array_1; end case; end record with Unchecked_Union, Size => 2; for SWIER2_SWI_Field_1 use record Val at 0 range 0 .. 1; Arr at 0 range 0 .. 1; end record; -- Software interrupt event register type SWIER2_Register is record -- Software interrupt on line 32 SWI : SWIER2_SWI_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_2_7 : HAL.UInt6 := 16#0#; -- Software interrupt on line 40 SWI_1 : SWIER2_SWI_Field_1 := (As_Array => False, Val => 16#0#); -- unspecified Reserved_10_31 : HAL.UInt22 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for SWIER2_Register use record SWI at 0 range 0 .. 1; Reserved_2_7 at 0 range 2 .. 7; SWI_1 at 0 range 8 .. 9; Reserved_10_31 at 0 range 10 .. 31; end record; -- PR2_PIF array type PR2_PIF_Field_Array is array (32 .. 33) of Boolean with Component_Size => 1, Size => 2; -- Type definition for PR2_PIF type PR2_PIF_Field (As_Array : Boolean := False) is record case As_Array is when False => -- PIF as a value Val : HAL.UInt2; when True => -- PIF as an array Arr : PR2_PIF_Field_Array; end case; end record with Unchecked_Union, Size => 2; for PR2_PIF_Field use record Val at 0 range 0 .. 1; Arr at 0 range 0 .. 1; end record; -- PR2_PIF array type PR2_PIF_Field_Array_1 is array (40 .. 41) of Boolean with Component_Size => 1, Size => 2; -- Type definition for PR2_PIF type PR2_PIF_Field_1 (As_Array : Boolean := False) is record case As_Array is when False => -- PIF as a value Val : HAL.UInt2; when True => -- PIF as an array Arr : PR2_PIF_Field_Array_1; end case; end record with Unchecked_Union, Size => 2; for PR2_PIF_Field_1 use record Val at 0 range 0 .. 1; Arr at 0 range 0 .. 1; end record; -- Pending register type PR2_Register is record -- Pending interrupt flag on line 32 PIF : PR2_PIF_Field := (As_Array => False, Val => 16#0#); -- unspecified Reserved_2_7 : HAL.UInt6 := 16#0#; -- Pending interrupt flag on line 40 PIF_1 : PR2_PIF_Field_1 := (As_Array => False, Val => 16#0#); -- unspecified Reserved_10_31 : HAL.UInt22 := 16#0#; end record with Volatile_Full_Access, Object_Size => 32, Bit_Order => System.Low_Order_First; for PR2_Register use record PIF at 0 range 0 .. 1; Reserved_2_7 at 0 range 2 .. 7; PIF_1 at 0 range 8 .. 9; Reserved_10_31 at 0 range 10 .. 31; end record; ----------------- -- Peripherals -- ----------------- -- External interrupt/event controller type EXTI_Peripheral is record -- Interrupt mask register IMR1 : aliased IMR1_Register; -- Event mask register EMR1 : aliased EMR1_Register; -- Rising Trigger selection register RTSR1 : aliased RTSR1_Register; -- Falling Trigger selection register FTSR1 : aliased FTSR1_Register; -- Software interrupt event register SWIER1 : aliased SWIER1_Register; -- Pending register PR1 : aliased PR1_Register; -- Interrupt mask register IMR2 : aliased IMR2_Register; -- Event mask register EMR2 : aliased EMR2_Register; -- Rising Trigger selection register RTSR2 : aliased RTSR2_Register; -- Falling Trigger selection register FTSR2 : aliased FTSR2_Register; -- Software interrupt event register SWIER2 : aliased SWIER2_Register; -- Pending register PR2 : aliased PR2_Register; end record with Volatile; for EXTI_Peripheral use record IMR1 at 16#0# range 0 .. 31; EMR1 at 16#4# range 0 .. 31; RTSR1 at 16#8# range 0 .. 31; FTSR1 at 16#C# range 0 .. 31; SWIER1 at 16#10# range 0 .. 31; PR1 at 16#14# range 0 .. 31; IMR2 at 16#20# range 0 .. 31; EMR2 at 16#24# range 0 .. 31; RTSR2 at 16#28# range 0 .. 31; FTSR2 at 16#2C# range 0 .. 31; SWIER2 at 16#30# range 0 .. 31; PR2 at 16#34# range 0 .. 31; end record; -- External interrupt/event controller EXTI_Periph : aliased EXTI_Peripheral with Import, Address => EXTI_Base; end STM32_SVD.EXTI; ",8377,True,2654.6117552321625,median "/* Terminal.ino Demo for U8log Universal 8bit Graphics Library (https://github.com/olikraus/u8g2/) Copyright (c) 2016, olikraus@gmail.com All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #ifdef U8X8_HAVE_HW_SPI #include #endif // Please UNCOMMENT one of the contructor lines below // U8x8 Contructor List // The complete list is available here: https://github.com/olikraus/u8g2/wiki/u8x8setupcpp // Please update the pin numbers according to your setup. Use U8X8_PIN_NONE if the reset pin is not connected //U8X8_NULL u8x8; // null device, a 8x8 pixel display which does nothing //U8X8_SSD1306_128X64_NONAME_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1306_128X64_NONAME_4W_HW_SPI u8x8(/* cs=*/ 6, /* dc=*/ 4, /* reset=*/ 12); // Arduboy (DevKit) //U8X8_SSD1306_128X64_NONAME_4W_HW_SPI u8x8(/* cs=*/ 12, /* dc=*/ 4, /* reset=*/ 6); // Arduboy 10 (Production, Kickstarter Edition) //U8X8_SSD1306_128X64_NONAME_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1306_128X64_NONAME_3W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* reset=*/ 8); //U8X8_SSD1306_128X64_NONAME_3W_HW_SPI u8x8(/* cs=*/ 10, /* reset=*/ 8); //U8X8_SSD1306_128X64_NONAME_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_SSD1306_128X64_ALT0_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); // same as the NONAME variant, but may solve the ""every 2nd line skipped"" problem //U8X8_SSD1306_128X64_NONAME_SW_I2C u8x8(/* clock=*/ 2, /* data=*/ 0, /* reset=*/ U8X8_PIN_NONE); // Digispark ATTiny85 //U8X8_SSD1306_128X64_NONAME_SW_I2C u8x8(/* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // OLEDs without Reset of the Display //U8X8_SSD1306_128X64_VCOMH0_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but maximizes setContrast() range //U8X8_SSD1306_128X64_ALT0_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but may solve the ""every 2nd line skipped"" problem //U8X8_SH1106_128X64_NONAME_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SH1106_128X64_NONAME_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_SH1106_128X64_VCOMH0_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but maximizes setContrast() range //U8X8_SH1106_128X64_WINSTAR_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but uses updated SH1106 init sequence //U8X8_SH1106_128X32_VISIONOX_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_SH1106_128X32_VISIONOX_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SH1106_72X40_WISE_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SH1107_64X128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SH1107_128X128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SH1107_128X128_HW_I2C u8x8(/* reset=*/ 8); //U8X8_SH1107_PIMORONI_128X128_HW_I2C u8x8(/* reset=*/ 8); //U8X8_SH1107_SEEED_128X128_SW_I2C u8x8(/* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); //U8X8_SH1107_SEEED_128X128_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_SH1107_SEEED_96X96_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SH1108_160X160_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1306_128X32_UNIVISION_SW_I2C u8x8(/* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // Adafruit Feather ESP8266/32u4 Boards + FeatherWing OLED //U8X8_SSD1306_128X32_UNIVISION_SW_I2C u8x8(/* clock=*/ 21, /* data=*/ 20, /* reset=*/ U8X8_PIN_NONE); // Adafruit Feather M0 Basic Proto + FeatherWing OLED //U8X8_SSD1306_128X32_UNIVISION_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); // Adafruit ESP8266/32u4/ARM Boards + FeatherWing OLED //U8X8_SSD1306_128X32_UNIVISION_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE, /* clock=*/ SCL, /* data=*/ SDA); // pin remapping with ESP8266 HW I2C //U8X8_SSD1306_128X32_WINSTAR_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE, /* clock=*/ SCL, /* data=*/ SDA); // pin remapping with ESP8266 HW I2C //U8X8_SSD1306_64X48_ER_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); // EastRising 0.66"" OLED breakout board, Uno: A4=SDA, A5=SCL, 5V powered //U8X8_SSD1306_48X64_WINSTAR_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_SSD1306_64X32_NONAME_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_SSD1306_64X32_1F_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_SSD1306_96X16_ER_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); // EastRising 0.69"" //U8X8_SSD1306_72X40_ER_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); // EastRising 0.42"" //U8X8_SSD1306_128X64_NONAME_6800 u8x8(13, 11, 2, 3, 4, 5, 6, A4, /*enable=*/ 7, /*cs=*/ 10, /*dc=*/ 9, /*reset=*/ 8); //U8X8_SSD1306_128X64_NONAME_8080 u8x8(13, 11, 2, 3, 4, 5, 6, A4, /*enable=*/ 7, /*cs=*/ 10, /*dc=*/ 9, /*reset=*/ 8); //U8X8_SSD1309_128X64_NONAME0_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1309_128X64_NONAME0_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1309_128X64_NONAME2_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1309_128X64_NONAME2_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1316_128X32_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1316_128X32_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1317_96X96_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // not tested, not confirmed //U8X8_SSD1317_96X96_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // not tested, not confirmed //U8X8_SSD1318_128X96_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1318_128X96_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1320_160X132_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1320_160X132_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1322_NHD_256X64_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1322_NHD_256X64_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1322_NHD_128X64_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1322_NHD_128X64_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1325_NHD_128X64_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1325_NHD_128X64_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD0323_OS128064_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD0323_OS128064_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1326_ER_256X32_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // experimental driver for ER-OLED018-1 //U8X8_SSD1327_SEEED_96X96_SW_I2C u8x8(/* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // Seeedstudio Grove OLED 96x96 //U8X8_SSD1327_SEEED_96X96_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); // Seeedstudio Grove OLED 96x96 //U8X8_SSD1327_EA_W128128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1327_EA_W128128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1327_MIDAS_128X128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1327_MIDAS_128X128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1327_WS_128X128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1327_WS_128X128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1327_VISIONOX_128X96_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1327_VISIONOX_128X96_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1329_128X96_NONAME_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1329_128X96_NONAME_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1329_96X96_NONAME_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1329_96X96_NONAME_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1329_96X96_NONAME_4W_HW_SPI u8x8(/* cs=*/ A4, /* dc=*/ A2, /* reset=*/ U8X8_PIN_NONE); // Adafruit Feather 32u4 Basic Proto //U8X8_SSD1305_128X32_NONAME_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1305_128X32_NONAME_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1305_128X32_ADAFRUIT_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1305_128X32_ADAFRUIT_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1305_128X64_ADAFRUIT_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1305_128X64_ADAFRUIT_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1305_128X64_RAYSTAR_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1305_128X64_RAYSTAR_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_KS0108_128X64 u8x8(8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*dc=*/ 17, /*cs0=*/ 14, /*cs1=*/ 15, /*cs2=*/ U8X8_PIN_NONE, /* reset=*/ U8X8_PIN_NONE); // Set R/W to low! //U8X8_KS0108_ERM19264 u8x8(8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*dc=*/ 17, /*cs0=*/ 14, /*cs1=*/ 15, /*cs2=*/ 16, /* reset=*/ U8X8_PIN_NONE); // Set R/W to low! //U8X8_HD44102_100X64 u8x8(4, 5, 6, 7, 8, 9, 10, 11, /*enable=*/ 2, /*dc=*/ 3, /*cs0=*/ A0, /*cs1=*/ A1, /*cs2=*/ A2, /* reset=*/ U8X8_PIN_NONE); // Set R/W to low! //U8X8_T7932_150X32 u8x8(4, 5, 6, 7, 8, 9, 10, 11, /*enable=*/ 2, /*dc=*/ 3, /*cs0=*/ A0, /*cs1=*/ A1, /*cs2=*/ A2, /* reset=*/ U8X8_PIN_NONE); // Set R/W to low! //U8X8_UC1701_EA_DOGS102_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1701_EA_DOGS102_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_PCD8544_84X48_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Nokia 5110 Display //U8X8_PCD8544_84X48_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Nokia 5110 Display //U8X8_PCF8812_96X65_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Could be also PCF8814 //U8X8_PCF8812_96X65_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Could be also PCF8814 //U8X8_HX1230_96X68_3W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* reset=*/ 8); //U8X8_HX1230_96X68_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7528_ERC16064_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7528_ERC16064_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_EA_DOGM128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_EA_DOGM128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_64128N_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_64128N_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_EA_DOGM132_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); // DOGM132 Shield //U8X8_ST7565_EA_DOGM132_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); // DOGM132 Shield //U8X8_ST7565_ZOLEN_128X64_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_ZOLEN_128X64_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_LM6059_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Adafruit ST7565 GLCD //U8X8_ST7565_LM6059_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Adafruit ST7565 GLCD //U8X8_ST7565_KS0713_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // KS0713 controller //U8X8_ST7565_KS0713_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // KS0713 controller //U8X8_ST7565_LX12864_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_LX12864_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_ERC12864_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_ERC12864_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_ERC12864_ALT_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // contrast improved version for ERC12864 //U8X8_ST7565_ERC12864_ALT_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // contrast improved version for ERC12864 //U8X8_ST7565_NHD_C12832_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_NHD_C12832_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_NHD_C12864_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_NHD_C12864_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_JLX12864_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_JLX12864_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_PI_132X64_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); // Pax Instruments Shield, LCD_BL=6 //U8X8_ST7567_PI_132X64_4W_HW_SPI u8x8(/* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); // Pax Instruments Shield, LCD_BL=6 //U8X8_ST7567_JLX12864_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_JLX12864_4W_HW_SPI u8x8(/* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_OS12864_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_OS12864_4W_HW_SPI u8x8(/* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_ENH_DG128064_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_ENH_DG128064_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_ENH_DG128064I_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_ENH_DG128064I_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_64X32_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_ST7567_HEM6432_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_ST7571_128X128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7571_128X128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX172104_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX172104_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX19296_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX19296_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256128_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_WO256X128_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_WO256X128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256160_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256160_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256160M_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256160M_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256160_ALT_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256160_ALT_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX240160_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX240160_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX25664_2ND_HW_I2C u8x8(/* reset=*/ 8); // Due, 2nd I2C //U8X8_ST75320_JLX320240_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75320_JLX320240_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_NT7534_TG12864R_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_NT7534_TG12864R_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7588_JLX12864_SW_I2C u8x8(/* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ 5); //U8X8_ST7588_JLX12864_HW_I2C u8x8(/* reset=*/ 5); //U8X8_IST3020_ERC19264_6800 u8x8(44, 43, 42, 41, 40, 39, 38, 37, /*enable=*/ 28, /*cs=*/ 32, /*dc=*/ 30, /*reset=*/ 31); // Connect WR pin with GND //U8X8_IST3020_ERC19264_8080 u8x8(44, 43, 42, 41, 40, 39, 38, 37, /*enable=*/ 29, /*cs=*/ 32, /*dc=*/ 30, /*reset=*/ 31); // Connect RD pin with 3.3V //U8X8_IST3020_ERC19264_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_IST7920_128X128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Round display //U8X8_IST7920_128X128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Round display //U8X8_UC1601_128X32_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1601_128X32_3W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* reset=*/ 8); //U8X8_UC1601_128X64_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1604_JLX19264_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1604_JLX19264_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1608_ERC24064_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Due, SW SPI, ERC24064-1 Test Board //U8X8_UC1608_DEM240064_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Due, SW SPI, ERC24064-1 Test Board //U8X8_UC1608_ERC240120_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1608_240X128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1610_EA_DOGXL160_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8X8_UC1610_EA_DOGXL160_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8X8_UC1611_EA_DOGM240_2ND_HW_I2C u8x8(/* reset=*/ 8); // Due, 2nd I2C, DOGM240 Test Board //U8X8_UC1611_EA_DOGM240_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // SW SPI, Due DOGXL240 Test Board //U8X8_UC1611_EA_DOGXL240_2ND_HW_I2C u8x8(/* reset=*/ 8); // Due, 2nd I2C, DOGXL240 Test Board //U8X8_UC1611_EA_DOGXL240_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // SW SPI, Due DOGXL240 Test Board //U8X8_UC1611_IDS4073_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1611_IDS4073_4W_HW_SPI u8x8( /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1611_EW50850_8080 u8x8(8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 3, /*dc=*/ 16, /*reset=*/ 17); // 240x160, Connect RD/WR1 pin with 3.3V, CS is aktive high //U8X8_UC1611_CG160160_8080 u8x8(8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 3, /*dc=*/ 16, /*reset=*/ 17); // Connect WR1 and CD1 pin with 3.3V, connect CS0 with cs, WR0 with enable, CD with dc //U8X8_UC1617_JLX128128_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1617_JLX128128_4W_HW_SPI u8x8( /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1638_192X96_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1638_192X96_4W_HW_SPI u8x8( /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1638_192X96_SW_I2C u8x8(/* clock=*/ 13, /* data=*/ 11, /* reset=*/ 8); // u8g2 test board: I2C clock/data is same as SPI, I2C default address is 0x78 //U8X8_SSD1606_172X72_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // eInk/ePaper Display //U8X8_SSD1607_200X200_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // eInk/ePaper Display, original LUT from embedded artists //U8X8_SSD1607_GS_200X200_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Good Display //U8X8_SSD1607_WS_200X200_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Waveshare //U8X8_IL3820_296X128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // eInk/ePaper Display, original LUT //U8X8_IL3820_V2_296X128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // eInk/ePaper Display, optimized (lesser screen flicker) //U8X8_ST7511_AVD_320X240_8080 u8x8(13, 11, 2, 3, 4, 5, 6, A4, /*enable/WR=*/ 7, /*cs=*/ 10, /*dc=*/ 9, /*reset=*/ 8); // Connect RD pin with 3.3V/5V //U8X8_S1D15721_240X64_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_S1D15721_240X64_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // End of constructor list // setup the terminal (U8X8LOG) and connect to u8g2 for automatic refresh of the display // The size (width * height) depends on the display #define U8LOG_WIDTH 16 #define U8LOG_HEIGHT 8 uint8_t u8log_buffer[U8LOG_WIDTH*U8LOG_HEIGHT]; U8X8LOG u8x8log; void setup(void) { /* U8g2 Project: SSD1306 Test Board */ //pinMode(10, OUTPUT); //pinMode(9, OUTPUT); //digitalWrite(10, 0); //digitalWrite(9, 0); /* U8g2 Project: KS0108 Test Board */ //pinMode(16, OUTPUT); //digitalWrite(16, 0); u8x8.begin(); u8x8.setFont(u8x8_font_chroma48medium8_r); u8x8log.begin(u8x8, U8LOG_WIDTH, U8LOG_HEIGHT, u8log_buffer); u8x8log.setRedrawMode(1); // 0: Update screen with newline, 1: Update screen for every char } unsigned long t = 0; // print the output of millis() to the terminal every second void loop(void) { if ( t < millis() ) { t = millis() + 15000; // every 15 seconds u8x8log.print(""\\f""); // \\f = form feed: clear the screen } u8x8log.print(""millis=""); u8x8log.print(millis()); u8x8log.print(""\\n""); delay(500); } ",12371,True,3662.271824736705,median "// Project name: hjhome // Copyright (C) 2016 hjltu@ya.ru // https://launchpad.net/hjhome // hjhome is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // hjhome is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // You should have received a copy of the GNU General Public License // along with this program. If not, see . // FOR NodeMCU V3 & Wemos D1 mini // // nodemcu v3 ver0.1 speed 115200 // change log // 22-aug-16 start // 17-mar-18 disable AP mode, add: memory // 25-mar-18 add: long press, somfy // 19-apr-18 add anti freezing function // 12-may-18 add client name edit // 13-may-18 add counters // 24-may-18 add buttons // 28-may-18 change reconnect // 01-jun-18 add gap // 04-jul-18 add last will // 08-jul-18 add default network settings // 16-sep-18 fix mqtt server // 18-sep-18 fix dimm delay // 20-sep-18 add reset timer to 20 sec // 15-oct-18 add shutters // 08-nov-18 dimm flash (lenovo x130, arduino 1.8.5) // 22-jan-19 add revers, change shutters: divider by seconds // 23-jan-19 fix shutters one second step // D0 GPIO16 // D1 GPIO5 // D2 GPIO4 output not work // D3 GPIO0 input not boot if push in gnd // D4 GPIO2 output not work, input not boot if push in gnd // D5 GPIO14 output not work // D6 GPIO12 // D7 GPIO13 // D8 GPIO15 rele no boot // VU 5volt // EEPROM Map: // 0-19 int I/O states // 50-53 mqtt server ip // 60-79 long counters // 80-99 String name // 100-119 int opt state // 200-219 net_ssid // 220-239 net_pass #include //#include //#include #include #include #include #include #include char *vers = ""22-jan-19""; // <- edit this //const char *ssid = ""ssid""; // <- edit this //const char *pass = ""pass""; // <- edit this // default settings ap // const char *ap_ssid = ""hjhome""; // const char *ap_pass = ""pass1234""; // default settings String str_ssid = ""hjhome""; String str_pass = ""pass1234""; // default server WiFiClient wclient; IPAddress mqtt_server(192,168,0,10); // <- edit this //PubSubClient mclient(wclient, mqtt_server); PubSubClient mclient(wclient); WiFiServer web_server(80); //oneWire pin OneWire oneWire(5); DallasTemperature sensors(&oneWire); //DHT pin DHT dht(4, DHT22, 15); // default client name String my_base64=""0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_-""; // default name String str_name=""wemos""; const int BUFSIZE = 20; //char buf[BUFSIZE]; String str_topic; String str_payload; bool bt[18],rele[18],net_default,http,term,count; bool state,period,blinds,shutters,buttons,sensor; bool revers; byte ac_pwm[18],pwm[18],gap,my_mqtt[4]; byte somfy,ac_somfy,shut,ac_shut; //sec int temp,hum,tmp,sn,an,bcount[18],pin; unsigned long lcount[18],rcount[18]; unsigned long stop_count,scount,shcount; unsigned long value[4]; void setup() { // ESP.wdtDisable(); // WiFi.mode(WIFI_STA); WiFi.softAPdisconnect(true); Serial.begin(115200); Serial.println(""""); Serial.println(""setup...""); delay(10); EEPROM.begin(256); my_eeprom_states(); my_pin_mode(); Serial.println(F(""Pin mode OK"")); IPAddress mqtt_server2(EEPROM.read(50),EEPROM.read(51),EEPROM.read(52),EEPROM.read(53)); if(net_default==false) { str_name = my_str_read(str_name,80); delay(10); str_ssid = my_str_read(str_ssid,200); delay(10); str_pass = my_str_read(""ERR: pass"",220); mclient.set_server(mqtt_server2); my_mqtt[0]=mqtt_server2[0]; my_mqtt[1]=mqtt_server2[1]; my_mqtt[2]=mqtt_server2[2]; my_mqtt[3]=mqtt_server2[3]; } if(net_default==true) { mclient.set_server(mqtt_server); } // if(net_default==true) // { // WiFi.config(ip, gateway, subnet); // //WiFi.softAPConfig(ip, gateway, subnet); // //WiFi.softAP(ssid, pass); // } Serial.print(""name = ""); Serial.println(str_name); Serial.print(""ssid = ""); Serial.println(str_ssid); Serial.print(""pass = ""); Serial.println(str_pass); if(net_default==true) { Serial.print(""mqtt = ""); Serial.println(mqtt_server); } if(net_default==false) { Serial.print(""mqtt = ""); Serial.println(mqtt_server2); } Serial.print(""state: ""); Serial.println(state); Serial.print(""period: ""); Serial.println(period); Serial.print(""http: ""); Serial.println(http); Serial.print(""blinds: ""); Serial.println(blinds); Serial.print(""shutters: ""); Serial.println(shutters); Serial.print(""revers: ""); Serial.println(revers); Serial.print(""term: ""); Serial.println(term); Serial.print(""count: ""); Serial.println(count); Serial.print(""buttons: ""); Serial.println(buttons); Serial.print(""gap: ""); Serial.println(gap); Serial.print(""sensor: ""); Serial.println(sensor); Serial.print(""default: ""); Serial.println(net_default); sensors.begin(); // ds18b20 dht.begin(); // DHT22 delay(10); // network my_connect(); delay(10); web_server.begin(); Serial.println(F(""Web Server started"")); Serial.println(""start""); // ESP.wdtEnable(WDTO_4S); // ESP.wdtEnable(2000); } void my_eeprom_states() { state=EEPROM.read(100); period=EEPROM.read(101); http=EEPROM.read(102); blinds=EEPROM.read(103); term=EEPROM.read(104); count=EEPROM.read(105); buttons=EEPROM.read(106); gap=EEPROM.read(107); sensor=EEPROM.read(108); net_default=EEPROM.read(109); shutters=EEPROM.read(110); revers=EEPROM.read(111); } void my_pin_mode() { // i/o pinMode(0,INPUT_PULLUP); // D3 bt flash pinMode(2,INPUT_PULLUP); // D4 bt //pinMode(4); // D2 tmp,hum DHT //pinMode(5); // D1 temp ds18b20 if(buttons==0) { pinMode(12,OUTPUT); // D6 pwm, somfy pinMode(13,OUTPUT); // D7 pwm, somfy if(blinds==0) analogWriteRange(255); } if(buttons==1 && blinds==0) { pinMode(12,INPUT_PULLUP); // D6 bt flash pinMode(13,INPUT_PULLUP); // D7 bt flash } pinMode(14,OUTPUT); // D5 rele pinMode(16,OUTPUT); // D0 rele //pinMode(A0,INPUT); // A0 sn 0-5v //pinMode(A0); // A0(17) an 0-1023 // counters int mem=60; for(int i=0; i<=3; i++) { value[i]=my_long_read(mem); mem+=5; } if(state==0) { if(buttons==0 && blinds==0) { ac_pwm[12]=pwm[12]=255; analogWrite(12,ac_pwm[12]); ac_pwm[13]=pwm[13]=255; analogWrite(13,ac_pwm[13]); } if(term==0 && shutters==0) { rele[14]=true; digitalWrite(14,HIGH); rele[16]=true; digitalWrite(16,HIGH); } } if(state==1) { if(buttons==0 && blinds==0) { ac_pwm[12]=pwm[12]=EEPROM.read(12); analogWrite(12,ac_pwm[12]); ac_pwm[13]=pwm[13]=EEPROM.read(13); analogWrite(13,ac_pwm[13]); } if(term==0 && shutters==0) { rele[14]=EEPROM.read(14); my_rele(14); rele[16]=EEPROM.read(16); my_rele(16); } } if(blinds==1 && buttons==0) { digitalWrite(12,HIGH); digitalWrite(13,HIGH); somfy=EEPROM.read(11); ac_somfy=somfy; } if(shutters==1 && term==0) { rele[14]=LOW; my_rele(14); rele[16]=LOW; my_rele(16); shut=EEPROM.read(15); ac_shut=shut; } } void loop() { if(count==1) { if(!mclient.connected()) if(millis()%299000==0) my_connect(); if(mclient.connected()) mclient.loop(); } if(count==0) { if(!mclient.connected()) if(millis()%99000==0) my_connect(); if(mclient.connected()) mclient.loop(); } if(http==1) my_web(); my_button(0); my_button(2); if(sensor==0) if(millis()%7==0) my_button(17); if(buttons==1 && blinds==0) { my_button(12); my_button(13); } if(period==1) { if(millis()%(6600*(gap+1))==0) my_dht(); if(millis()%(7700*(gap+1))==0) my_temp(); } if(sensor==1) if(millis()%(1700*(gap+1))==0) my_analog(); if(blinds==0 && buttons==0) if(millis()%9==0) my_pwm(); if(blinds==1 && buttons==0) my_somfy(); if(term==0 && shutters==1) my_shutters(); if(term==1 && shutters==0) if(millis()%80000==0) my_term(); if(millis()%90000==0) my_memory(); my_rele(14); my_rele(16); my_reset(); delay(0); // ESP.wdtFeed(); } void my_connect() { if (WiFi.status() != WL_CONNECTED) { Serial.println(F(""Wifi connecting... "")); int ssid_len=str_ssid.length()+1; char ssid[ssid_len]; str_ssid.toCharArray(ssid,ssid_len); int pass_len=str_pass.length()+1; char pass[pass_len]; str_pass.toCharArray(pass,pass_len); WiFi.begin(ssid, pass); // Serial.println(str_to_char(str_ssid)); // Serial.println(str_to_char(str_pass)); // WiFi.begin(str_to_char(str_ssid), str_to_char(str_pass)); for(int i=0;i<=10;i++) { if(WiFi.status() != WL_CONNECTED) delay(500); if(WiFi.status() == WL_CONNECTED) { Serial.print(""My IP: ""); Serial.println(WiFi.localIP()); break; } } // if(WiFi.waitForConnectResult() != WL_CONNECTED) // { // Serial.println(F(""WiFi NOT connected"")); // return; // } } if(WiFi.status() == WL_CONNECTED) { if(!mclient.connected()) { Serial.println(F(""Connecting to MQTT server..."")); str_topic = String(""/"" + str_name + ""/out/start""); if(mclient.connect(str_name,str_topic,1,0,""disconnect"")) { Serial.println(F(""Connected to MQTT server"")); mclient.set_callback(callback); mclient.subscribe(""/"" + str_name + ""/#""); Serial.println(""Subscribe to : /"" + str_name + ""/#""); str_topic = String(""/"" + str_name + ""/out/start""); str_payload = ""start""; my_print(); } else { Serial.println(F(""Could not connect to MQTT server"")); } } if(mclient.connected()) mclient.loop(); } } void my_web() { WiFiClient client = web_server.available(); if(!client) return; Serial.println(F(""new http client"")); // while(!client.available()) // delay(1); String req = client.readStringUntil('\\n'); //r // Serial.println(req); client.flush(); // Serial.println(req.length()); if(req.length()<100) { client.println(F(""HTTP/1.1 200 OK\\r\\nContent-Type: text/html\\r\\n\\r\\n"")); client.println(F("""")); client.print(str_name); client.println(F("""")); client.println(F("""")); client.println(F(""

ESP8266 MQTT client "")); client.println(F("""")); client.println(F(""

"")); client.println(F("""")); client.println(F(""
Name:"")); client.print(str_name); client.println(F(""
IP address:"")); client.print(WiFi.localIP()); client.println(F(""
MAC address:"")); client.print(WiFi.macAddress()); client.println(F(""
MQTT Server:"")); client.print(String(mqtt_server[0],DEC)+"".""+String(mqtt_server[1],DEC)+"".""); client.print(String(mqtt_server[2],DEC)+"".""+String(mqtt_server[3],DEC)); client.println(F(""

"")); client.print(F(""
Commands: (/"")); client.print(str_name); client.println(F(""/out/start)
"")); client.println(F(""start, disconnect"")); client.print(F(""
Commands: (/"")); client.print(str_name); client.println(F(""/in/command)
"")); client.println(F(""echo, test, ip, mac, srv, info, reset, memory, state,"")); client.println(F(""
name, ssid, pass, ,mqtt, period, http, blinds, shutters,revers"")); client.println(F(""
buttons,term, count, value0,1,2,3, gap, sensor, default"")); client.println(F(""
Commands descriptions:"")); client.println(F(""name - new name, ssid - new ssid, pass - new pass, mqtt - IP for server"")); client.println(F(""
state - actual out14,out16,pwm12,pwm13 when power on"")); client.println(F(""
http - web server"")); client.println(F(""
blinds - set out12, out13 for blinds(somfy)"")); client.println(F(""
buttons - set out12, out13 for buttons"")); client.println(F(""
shutters - set out14, out16 for shutters"")); client.println(F(""
revers - reversed output for out14, out16"")); client.println(F(""
term - anti freezing function for temp4<10℃ and rele14"")); client.println(F(""
term - anti overheating function for temp4>35℃ and rele16"")); client.println(F(""
count - counter for in0, in2"")); client.println(F(""
value0,1,2,3 - unsigned long 2147483647 max"")); client.println(F(""
gap - interval 6(2)sec-30(7)min for sensors temp,hum,(an)"")); client.println(F(""
period - send temp5,temp4,hum4, stat periodicaly"")); client.println(F(""
sensor - send an0(A0) stat periodicaly"")); client.println(F(""
* press bt0 and bt2 for 20 sec to reset(default)"")); client.println(F(""
default - for default network settings"")); client.println(F(""
default settings: name=wemos, ssid=hjhome"")); client.println(F(""
default settings: pass=pass1234, mqtt=192.168.0.10"")); client.println(F(""
"")); // client.print(F(""
topic: "")); client.print(str_topic); client.print(F(""
payload: "")); client.println(str_payload); delay(0); client.println(F(""
"")); client.print(F("""")); for(int i=0; i<=16; i++) { if(i==0 || i==1) pin=3; if(i==2 || i==3) pin=4; if(i==4) pin=2; if(i==5) pin=1; if(i==12) pin=6; if(i==13) pin=7; if(i==14) pin=5; if(i==16) pin=0; if(i==0 || i==2) { client.print(F("""")); } if(i>=0 && i<=3) { client.print(F("""")); } if(i==4) { client.print(F("""")); } if(i==5) { client.print(F("""")); } if(i==11) { client.print(F("""")); } if(i==12 || i==13) { client.print(F("""")); client.print(F("""")); } if(i==15) { client.print(F("""")); } if(i==14 || i==16) { client.print(F("""")); } } delay(0); client.print(F(""
PinI/OTopicPayloadStatus
gpio"")); client.print(i); client.print(F("", D"")); client.print(pin); client.print(F(""Button/"")); client.print(str_name); client.print(F(""/in/bt"")); client.print(i); client.print(F(""0,1,2"")); client.print(bt[i]); client.println(F(""
gpio"")); if(i<2) client.print(""0""); else client.print(""2""); client.print(F("", D"")); client.print(pin); client.print(F(""Counter/"")); client.print(str_name); client.print(F(""/in/value"")); client.print(i); client.print(F(""0-(2^32-1)"")); client.print(value[i]); client.println(F(""
gpio"")); client.print(i); client.print(F("", D"")); client.print(pin); client.print(F(""DHT/"")); client.print(str_name); client.print(F(""/in/temp"")); client.print(i); client.print(F("",hum"")); client.print(i); client.print(F(""℃,%"")); client.print(tmp); client.print(F(""℃, "")); client.print(hum); client.println(F(""%
gpio"")); client.print(i); client.print(F("", D"")); client.print(pin); client.print(F(""DS18B20/"")); client.print(str_name); client.print(F(""/in/temp"")); client.print(i); client.print(F(""℃"")); client.print(temp); client.println(F(""℃
gpio(12,13), D6,D7"")); client.print(F(""Somfy/"")); client.print(str_name); client.print(F(""/out/somfy"")); client.print(i); client.print(F(""0-255"")); client.print(somfy); client.println(F(""
gpio"")); client.print(i); client.print(F("", D"")); client.print(pin); client.print(F(""Pwm/"")); client.print(str_name); client.print(F(""/out/pwm"")); client.print(i); client.print(F(""0-255"")); client.print(pwm[i]); client.println(F(""
gpio"")); client.print(i); client.print(F("", D"")); client.print(pin); client.print(F(""Button/"")); client.print(str_name); client.print(F(""/in/bt"")); client.print(i); client.print(F(""0,1,2"")); client.print(bt[i]); client.println(F(""
gpio(14,16), D5,D0"")); client.print(F(""Shutters/"")); client.print(str_name); client.print(F(""/out/shut"")); client.print(i); client.print(F(""0-255"")); client.print(shut); client.println(F(""
gpio"")); client.print(i); client.print(F("", D"")); client.print(pin); client.print(F(""Rele/"")); client.print(str_name); client.print(F(""/out/rele"")); client.print(i); client.print(F(""0,1"")); client.print(rele[i]); client.println(F(""
A0Sensor/"")); client.print(str_name); client.print(F(""/in/an01-1024"")); client.print(an); client.print(F(""
A0Button/"")); client.print(str_name); client.print(F(""/in/bt170,1,2"")); client.print(bt[17]); client.println(F(""
EEPROMstate/"")); client.print(str_name); client.print(F(""/in/state0,1"")); client.print(state); client.println(F(""
EEPROMperiod/"")); client.print(str_name); client.print(F(""/in/period0,1"")); client.print(period); client.println(F(""
EEPROMhttp/"")); client.print(str_name); client.print(F(""/in/http0,1"")); client.print(http); client.println(F(""
EEPROMblinds/"")); client.print(str_name); client.print(F(""/in/blinds0,1"")); client.print(blinds); client.println(F(""
EEPROMshutters/"")); client.print(str_name); client.print(F(""/in/shutters0,1"")); client.print(shutters); client.println(F(""
EEPROMrevers/"")); client.print(str_name); client.print(F(""/in/revers0,1"")); client.print(revers); client.println(F(""
EEPROMbuttons/"")); client.print(str_name); client.print(F(""/in/buttons0,1"")); client.print(buttons); client.println(F(""
EEPROMterm/"")); client.print(str_name); client.print(F(""/in/term0,1"")); client.print(term); client.println(F(""
EEPROMcount/"")); client.print(str_name); client.print(F(""/in/count0,1"")); client.print(count); client.println(F(""
EEPROMgap/"")); client.print(str_name); client.print(F(""/in/gap0-255"")); client.print(gap); client.println(F(""
EEPROMsensor/"")); client.print(str_name); client.print(F(""/in/sensor0,1"")); client.print(sensor); client.println(F(""
EEPROMdefault/"")); client.print(str_name); client.print(F(""/in/default0,1"")); client.print(net_default); client.println(F(""

"")); client.print(F(""
"")); client.println(F(""hjmqtt 22-aug-16 -> "")); client.print(vers); client.println(F(""
"")); req=""""; client.flush(); Serial.println(F(""http end"")); } //client.flush(); } void my_print() { if(str_topic.length()>0 && str_payload.length()>0) if(str_topic.length()<100 && str_payload.length()<300) if(mclient.connected()) mclient.publish(str_topic,str_payload); Serial.print(F(""topic: "")); Serial.print(str_topic); Serial.print(F("" payload: "")); Serial.println(str_payload); delay(0); } void callback(const MQTT::Publish& pub) { String inc_topic = pub.topic(); String inc_payload = pub.payload_string(); if(inc_topic.indexOf(""/in"")>0) { Serial.print(F(""incoming topic: "")); Serial.print(inc_topic); Serial.print(F("" payload: "")); Serial.println(inc_payload); if(inc_topic.indexOf(""/echo"")>0) { str_topic = String(""/"" + str_name + ""/out/echo""); str_payload = inc_payload; my_print(); } if(inc_topic.indexOf(""/ip"")>0) { str_topic = String(""/"" + str_name + ""/out/ip""); str_payload = WiFi.localIP().toString(); my_print(); } if(inc_topic.indexOf(""/mac"")>0) { str_topic = String(""/"" + str_name + ""/out/mac""); str_payload = WiFi.macAddress(); my_print(); } if(inc_topic.indexOf(""/srv"")>0) { str_topic = String(""/"" + str_name + ""/out/srv""); if(net_default==true) str_payload = mqtt_server.toString(); if(net_default==false) str_payload = String(my_mqtt[0],DEC)+ "".""+String(my_mqtt[1],DEC)+ "".""+String(my_mqtt[2],DEC)+ "".""+String(my_mqtt[3],DEC); my_print(); } if(inc_topic.indexOf(""in/info"")>0) { str_topic = String(""/"" + str_name + ""/out/info""); str_payload = ""author:hjltu@ya.ru,license:GPLv3,project:hjhome,version:""+String(vers); my_print(); } if(inc_topic.indexOf(""/reset"")>0) { str_topic = String(""/"" + str_name + ""/out/reset""); str_payload = ""manual reset""; my_print(); ESP.restart(); } if(inc_topic.indexOf(""/memory"")>0) { str_topic = String(""/"" + str_name + ""/out/memory""); str_payload = String(ESP.getFreeHeap()); my_print(); } if(inc_topic.indexOf(""/name"")>0) { if(inc_payload.length()>0 && inc_payload.length()<20) { my_str_write(inc_payload,80); } str_topic = String(""/"" + str_name + ""/out/name""); str_payload = my_str_read(""ERR: name"",80); my_print(); //mclient.disconnect(); } if(inc_topic.indexOf(""/ssid"")>0) { if(inc_payload.length()>0 && inc_payload.length()<20) { my_str_write(inc_payload,200); } str_topic = String(""/"" + str_name + ""/out/ssid""); str_payload = my_str_read(""ERR: ssid"",200); my_print(); } if(inc_topic.indexOf(""/pass"")>0) { if(inc_payload.length()>0 && inc_payload.length()<20) { my_str_write(inc_payload,220); } str_topic = String(""/"" + str_name + ""/out/pass""); str_payload = my_str_read(""ERR: pass"",220); my_print(); } if(inc_topic.indexOf(""/default"")>0) { if(inc_payload==""1"" || inc_payload==""0"") { net_default=inc_payload.toInt(); ee_wr(109,net_default); } str_topic = String(""/"" + str_name + ""/out/default""); str_payload = ""default=""+String(net_default)+""\\n""+ ""current: name=""+str_name+"" ssid=""+str_ssid+"" pass=""+str_pass; if(net_default==true) { str_payload+="" mqtt="" + mqtt_server.toString() + ""\\n""; } if(net_default==false) str_payload+="" mqtt=""+String(my_mqtt[0],DEC) + ""."" + String(my_mqtt[1],DEC) + ""."" + String(my_mqtt[2],DEC) + ""."" + String(my_mqtt[3],DEC) + ""\\n""; str_payload+=""in memory: name="" + my_str_read(str_name,80) + "" ssid="" + my_str_read(str_ssid,200) + "" pass="" + my_str_read(str_pass,220) + "" mqtt="" + String(EEPROM.read(50))+ "".""+String(EEPROM.read(51))+ "".""+String(EEPROM.read(52))+ "".""+String(EEPROM.read(53)) + ""\\n""; str_payload+=""default: name=wemos, ssid=hjhome, pass=pass1234, mqtt=192.168.0.10""; my_print(); } if(inc_topic.indexOf(""/mqtt"")>0) { //byte ip[4]; int index=0,last_i=0; for(int i=0; i<=inc_payload.length() && index<=3; i++) { //Serial.println(String(i)); if(inc_payload.substring(i,i+1)==""."" || i==inc_payload.length()) { //ip[index]=inc_payload.substring(last_i,i).toInt(); ee_wr(50+index,inc_payload.substring(last_i,i).toInt()); //Serial.println(String(ip[index])); index++; last_i=i+1; } } str_topic = String(""/"" + str_name + ""/out/mqtt""); //str_payload = String(ip[0])+"".""+String(ip[1])+"".""+String(ip[2])+"".""+String(ip[3]); str_payload = String(EEPROM.read(50))+"".""+String(EEPROM.read(51))+"".""+String(EEPROM.read(52))+"".""+String(EEPROM.read(53)); my_print(); } if(inc_topic.indexOf(""/state"")>0) { if(inc_payload==""1"" || inc_payload==""0"") { state=inc_payload.toInt(); ee_wr(100,state); } str_topic = String(""/"" + str_name + ""/out/state""); str_payload = String(state); my_print(); } if(inc_topic.indexOf(""/period"")>0) { if(inc_payload==""1"" || inc_payload==""0"") { period=inc_payload.toInt(); ee_wr(101,period); } str_topic = String(""/"" + str_name + ""/out/period""); str_payload = String(period); my_print(); } if(inc_topic.indexOf(""/http"")>0) { if(inc_payload==""1"" || inc_payload==""0"") { http=inc_payload.toInt(); ee_wr(102,http); } str_topic = String(""/"" + str_name + ""/out/http""); str_payload = String(http); my_print(); } if(inc_topic.indexOf(""/blinds"")>0) { if((inc_payload==""1"" || inc_payload==""0"")) { ee_wr(103,inc_payload.toInt()); ee_wr(106,0); //buttons } str_topic = String(""/"" + str_name + ""/out/blinds""); str_payload = String(EEPROM.read(103)); my_print(); } if(inc_topic.indexOf(""/shutters"")>0) { if((inc_payload==""1"" || inc_payload==""0"")) { ee_wr(110,inc_payload.toInt()); ee_wr(104,0); //term } str_topic = String(""/"" + str_name + ""/out/shutters""); str_payload = String(EEPROM.read(110)); my_print(); } if(inc_topic.indexOf(""/revers"")>0) { if((inc_payload==""1"" || inc_payload==""0"")) { ee_wr(111,inc_payload.toInt()); } str_topic = String(""/"" + str_name + ""/out/revers""); str_payload = String(EEPROM.read(111)); my_print(); } if(inc_topic.indexOf(""/buttons"")>0) { if((inc_payload==""1"" || inc_payload==""0"")) { ee_wr(106,inc_payload.toInt()); ee_wr(103,0); // blinds } str_topic = String(""/"" + str_name + ""/out/buttons""); str_payload = String(EEPROM.read(106)); my_print(); } if(inc_topic.indexOf(""/term"")>0) { if(inc_payload==""1"" || inc_payload==""0"") { ee_wr(104,inc_payload.toInt()); ee_wr(110,0); // shutters } str_topic = String(""/"" + str_name + ""/out/term""); str_payload = String(EEPROM.read(104)); my_print(); } if(inc_topic.indexOf(""/count"")>0) { if(inc_payload==""1"" || inc_payload==""0"") { count=inc_payload.toInt(); ee_wr(105,count); } str_topic = String(""/"" + str_name + ""/out/count""); str_payload = String(count); my_print(); } if(inc_topic.indexOf(""/gap"")>0) { if(inc_payload.toInt() >= 0 && inc_payload.toInt() <= 255) { gap=inc_payload.toInt(); ee_wr(107,gap); } str_topic = String(""/"" + str_name + ""/out/gap""); str_payload = String(gap); my_print(); } if(inc_topic.indexOf(""/sensor"")>0) { if((inc_payload==""1"" || inc_payload==""0"")) { sensor=inc_payload.toInt(); ee_wr(108,sensor); } str_topic = String(""/"" + str_name + ""/out/sensor""); str_payload = String(sensor); my_print(); } for(int i=0; i<=17; i++) { if(inc_topic.indexOf(""/value"" + String(i))>0 && (i>=0 && i<=3)) { value[i]=inc_payload.toInt(); int mem=60; if(i==1) mem=65; if(i==2) mem=70; if(i==3) mem=75; my_long_write(mem,value[i]); str_topic = String(""/"" + str_name + ""/out/value"" + i); str_payload = String(value[i]); my_print(); } if(inc_topic.indexOf(""/test"")>0) { if(i==11) { str_topic = String(""/"" + str_name + ""/out/somfy"" + i); str_payload = String(somfy); my_print(); } if((i==12 || i==13)) { str_payload = String(pwm[i]); str_topic = String(""/"" + str_name + ""/out/pwm"" + i); my_print(); } if(i==15) { str_topic = String(""/"" + str_name + ""/out/shut"" + i); str_payload = String(shut); my_print(); } if(i==14 || i==16) { str_topic = String(""/"" + str_name + ""/out/rele"" + i); str_payload = String(rele[i]); my_print(); } } if(inc_topic.indexOf(""/somfy"" + String(i))>0 && i==11) { somfy=inc_payload.toInt(); ee_wr(i,somfy); str_topic = String(""/"" + str_name + ""/out/somfy"" + i); str_payload = String(somfy); my_print(); } if(inc_topic.indexOf(""/shut"" + String(i))>0 && i==15) { shut=inc_payload.toInt(); ee_wr(i,shut); str_topic = String(""/"" + str_name + ""/out/shut"" + i); str_payload = String(shut); my_print(); } if(inc_topic.indexOf(""/pwm"" + String(i))>0 && (i==12 || i==13)) { pwm[i]=inc_payload.toInt(); ee_wr(i,pwm[i]); str_topic = String(""/"" + str_name + ""/out/pwm"" + i); str_payload = String(pwm[i]); my_print(); } if(inc_topic.indexOf(""/rele"" + String(i))>0 && (i==14 || i==16)) { if(term==0 && shutters==0) { if(inc_payload==""0"" || inc_payload==""false"" || inc_payload==""OFF"") rele[i]=false; if(inc_payload==""1"" || inc_payload==""true"" || inc_payload==""ON"") rele[i]=true; ee_wr(i,rele[i]); } str_topic = String(""/"" + str_name + ""/out/rele"" + i); str_payload = String(rele[i]); my_print(); } } } } void my_rele(int i) { if(revers == LOW) if(digitalRead(i) != rele[i]) digitalWrite(i,rele[i]); if(revers == HIGH) if(digitalRead(i) == rele[i]) digitalWrite(i, !rele[i]); } void my_button(int i) { if(i<17) { bool bt_stat; bt_stat=digitalRead(i); if(bt_stat==LOW && bcount[i]<15) bcount[i]++; if(bt_stat==HIGH && bcount[i]>0) bcount[i]--; } if(i==17) { int an_stat; an_stat=analogRead(A0); if(an_stat<10 && bcount[i]<333) bcount[i]++; if(an_stat>666 && bcount[i]>0) bcount[i]--; delayMicroseconds(300); } if(bcount[i]>10 && bt[i]==false) { bt[i]=true; lcount[i]=millis(); } if(bcount[i]==0 && bt[i]==true) { bt[i]=false; rcount[i]=0; if(lcount[i]==0) { str_topic = String(""/"" + str_name + ""/out/bt"" + i); str_payload = ""0""; my_print(); } if(lcount[i]>0 && lcount[i]>millis()-500) { lcount[i]=0; str_topic = String(""/"" + str_name + ""/out/bt"" + i); str_payload = ""1""; my_print(); if(count==1 && (i==0 || i==2)) { value[i]++; int mem=60; if(i==2) mem=70; my_long_write(mem,value[i]); str_topic = String(""/"" + str_name + ""/out/value"" + i); str_payload = value[i]; my_print(); } } } if(lcount[i]>0 && lcount[i]-100) { str_topic = String(""/"" + str_name + ""/out/temp5""); str_payload = String(temp); my_print(); } } void my_dht() { hum=dht.readHumidity(); tmp=dht.readTemperature(); if(tmp<100 && tmp>-100) { str_topic = String(""/"" + str_name + ""/out/temp4""); str_payload = String(tmp); my_print(); } if(hum<100 && hum>=0) { str_topic = String(""/"" + str_name + ""/out/hum4""); str_payload = String(hum); my_print(); } } void my_analog() { an=0; for(int j=0; j<10;j++) { an+=analogRead(A0); delay(1); } an=an/10; str_topic = String(""/"" + str_name + ""/out/an0""); str_payload = String(an); my_print(); } void my_pwm() { for(int i=12; i<14; i++) { if(ac_pwm[i] != pwm[i]) { if(ac_pwm[i]>pwm[i]) ac_pwm[i]--; if(ac_pwm[i]shut && rele[16]==1) { rele[16]=0; shcount=millis()-500; return; } if(ac_shutshut && rele[16]==0) { rele[14]=1; ac_shut--; } if(ac_shut0) { if(stop_countsomfy && rele[12]==0) somfy_close(); if(ac_somfysomfy) ac_somfy--; if(ac_somfy0) buf[i]=ch; } Serial.print(""buf read=""); Serial.println(String(buf)); if(String(buf).length()>0) return(String(buf)); else return(name); } void my_str_write(String name, int shift) { char buf[BUFSIZE]; name.toCharArray(buf,BUFSIZE); Serial.print(""buf write=""); Serial.println(String(buf)); for(int i=0; i<=BUFSIZE; i++) { if(my_base64.indexOf(String(buf[i]))>0) { Serial.println(String(buf[i])); EEPROM.write(i+shift,buf[i]); } else //EEPROM.write(i+shift,0x08); EEPROM.write(i+shift,buf[i]); } EEPROM.commit(); } void my_long_write(int address, long value) { //Decomposition from a long to 4 bytes by using bitshift. //One = Most significant -> Four = Least significant byte byte four = (value & 0xFF); byte three = ((value >> 8) & 0xFF); byte two = ((value >> 16) & 0xFF); byte one = ((value >> 24) & 0xFF); //Write the 4 bytes into the eeprom memory. EEPROM.write(address, four); EEPROM.write(address + 1, three); EEPROM.write(address + 2, two); EEPROM.write(address + 3, one); EEPROM.commit(); delay(10); } long my_long_read(long address) { //Read the 4 bytes from the eeprom memory. long four = EEPROM.read(address); long three = EEPROM.read(address + 1); long two = EEPROM.read(address + 2); long one = EEPROM.read(address + 3); //Return the recomposed long by using bitshift. return ((four << 0) & 0xFF) + ((three << 8) & 0xFFFF) + ((two << 16) & 0xFFFFFF) + ((one << 24) & 0xFFFFFFFF); } char *str_to_char(String string) { int str_len=string.length()+1; //Serial.println(String(str_len)); char char_array[str_len]; string.toCharArray(char_array,str_len); //Serial.println(char_array); return(char_array); } void my_memory() { if(ESP.getFreeHeap()<9999) { str_topic = String(""/"" + str_name + ""/out/reset""); str_payload = String(""Error! free memory = "" + ESP.getFreeHeap()); my_print(); ESP.reset(); } } void my_term() { // cool int i=14; if(temp<10) { rele[i]=1; ee_wr(i,rele[i]); } if(temp>10) { rele[i]=0; ee_wr(i,rele[i]); } str_topic = String(""/"" + str_name + ""/out/rele"" + i); str_payload = String(rele[i]); my_print(); // heat i=16; if(temp>35) { rele[i]=true; ee_wr(i,rele[i]); } if(temp<35) { rele[i]=false; ee_wr(i,rele[i]); } str_topic = String(""/"" + str_name + ""/out/rele"" + i); str_payload = String(rele[i]); my_print(); } void my_reset() { if(rcount[0]>0 && rcount[0]0 && rcount[2]19999 && bt[0]==true && bt[2]==true) { rcount[0]=0; rcount[2]=0; net_default=true; ee_wr(109,net_default); str_topic = String(""/"" + str_name + ""/out/reset""); str_payload = ""default=""; str_payload += String(net_default); str_payload += ""\\nname=wemos, ssid=hjhome, pass=pass1234, mqtt=192.168.0.10""; my_print(); ESP.restart(); } } ",12187,False,2269.5574469734697,median "/* XBM.ino This will display a XBM image (generated by GIMP). The .xbm file was pasted directly into the .ino file and moved to flash (PROGMEM) area. Universal 8bit Graphics Library (https://github.com/olikraus/u8g2/) Copyright (c) 2016, olikraus@gmail.com All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #ifdef U8X8_HAVE_HW_SPI #include #endif #ifdef U8X8_HAVE_HW_I2C #include #endif /* U8glib Example Overview: Frame Buffer Examples: clearBuffer/sendBuffer. Fast, but may not work with all Arduino boards because of RAM consumption Page Buffer Examples: firstPage/nextPage. Less RAM usage, should work with all Arduino boards. U8x8 Text Only Example: No RAM usage, direct communication with display controller. No graphics, 8x8 Text only. This is a page buffer example. */ // Please UNCOMMENT one of the contructor lines below // U8g2 Contructor List (Picture Loop Page Buffer) // The complete list is available here: https://github.com/olikraus/u8g2/wiki/u8g2setupcpp // Please update the pin numbers according to your setup. Use U8X8_PIN_NONE if the reset pin is not connected //U8G2_SSD1306_128X64_NONAME_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1306_128X64_NONAME_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 12, /* dc=*/ 4, /* reset=*/ 6); // Arduboy (Production, Kickstarter Edition) //U8G2_SSD1306_128X64_NONAME_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1306_128X64_NONAME_1_3W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* reset=*/ 8); //U8G2_SSD1306_128X64_NONAME_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); //U8G2_SSD1306_128X64_NONAME_1_SW_I2C u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* reset=*/ 8); //U8G2_SSD1306_128X64_NONAME_1_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // All Boards without Reset of the Display //U8G2_SSD1306_128X64_NONAME_1_6800 u8g2(U8G2_R0, 13, 11, 2, 3, 4, 5, 6, A4, /*enable=*/ 7, /*cs=*/ 10, /*dc=*/ 9, /*reset=*/ 8); //U8G2_SSD1306_128X64_NONAME_1_8080 u8g2(U8G2_R0, 13, 11, 2, 3, 4, 5, 6, A4, /*enable=*/ 7, /*cs=*/ 10, /*dc=*/ 9, /*reset=*/ 8); //U8G2_SSD1306_128X64_VCOMH0_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but maximizes setContrast() range //U8G2_SH1106_128X64_NONAME_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SH1106_128X64_NONAME_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); //U8G2_SH1106_128X64_VCOMH0_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but maximizes setContrast() range //U8G2_SSD1306_128X32_UNIVISION_1_SW_I2C u8g2(U8G2_R0, /* clock=*/ 21, /* data=*/ 20, /* reset=*/ U8X8_PIN_NONE); // Adafruit Feather M0 Basic Proto + FeatherWing OLED //U8G2_SSD1306_128X32_UNIVISION_1_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // Adafruit Feather ESP8266/32u4 Boards + FeatherWing OLED //U8G2_SSD1306_128X32_UNIVISION_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); // Adafruit ESP8266/32u4/ARM Boards + FeatherWing OLED //U8G2_SSD1306_128X32_UNIVISION_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE, /* clock=*/ SCL, /* data=*/ SDA); // pin remapping with ESP8266 HW I2C //U8G2_SSD1306_64X48_ER_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); // EastRising 0.66"" OLED breakout board, Uno: A4=SDA, A5=SCL, 5V powered //U8G2_SSD1306_64X32_NONAME_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); //U8G2_SSD1306_64X32_1F_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); //U8G2_SSD1306_96X16_ER_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); // EastRising 0.69"" OLED //U8G2_SSD1322_NHD_256X64_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8G2_16BIT in u8g2.h //U8G2_SSD1322_NHD_256X64_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8G2_16BIT in u8g2.h //U8G2_SSD1325_NHD_128X64_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1325_NHD_128X64_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1327_SEEED_96X96_1_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // Seeedstudio Grove OLED 96x96 //U8G2_SSD1327_SEEED_96X96_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); // Seeedstudio Grove OLED 96x96 //U8G2_SSD1329_128X96_NONAME_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1329_128X96_NONAME_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1305_128X32_NONAME_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1305_128X32_NONAME_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1309_128X64_NONAME0_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1309_128X64_NONAME0_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1309_128X64_NONAME2_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1309_128X64_NONAME2_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_LD7032_60X32_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 11, /* data=*/ 12, /* cs=*/ 9, /* dc=*/ 10, /* reset=*/ 8); // SW SPI Nano Board //U8G2_LD7032_60X32_1_4W_SW_I2C u8g2(U8G2_R0, /* clock=*/ 11, /* data=*/ 12, /* reset=*/ U8X8_PIN_NONE); // NOT TESTED! //U8G2_UC1701_EA_DOGS102_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_UC1701_EA_DOGS102_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_PCD8544_84X48_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Nokia 5110 Display //U8G2_PCD8544_84X48_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Nokia 5110 Display //U8G2_PCF8812_96X65_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Could be also PCF8814 //U8G2_PCF8812_96X65_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Could be also PCF8814 //U8G2_KS0108_128X64_1 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*dc=*/ 17, /*cs0=*/ 14, /*cs1=*/ 15, /*cs2=*/ U8X8_PIN_NONE, /* reset=*/ U8X8_PIN_NONE); // Set R/W to low! //U8G2_KS0108_ERM19264_1 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*dc=*/ 17, /*cs0=*/ 14, /*cs1=*/ 15, /*cs2=*/ 16, /* reset=*/ U8X8_PIN_NONE); // Set R/W to low! //U8G2_ST7920_192X32_1_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ U8X8_PIN_NONE, /*dc=*/ 17, /*reset=*/ U8X8_PIN_NONE); //U8G2_ST7920_192X32_1_SW_SPI u8g2(U8G2_R0, /* clock=*/ 18 /* A4 */ , /* data=*/ 16 /* A2 */, /* CS=*/ 17 /* A3 */, /* reset=*/ U8X8_PIN_NONE); //U8G2_ST7920_128X64_1_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18 /* A4 */, /*cs=*/ U8X8_PIN_NONE, /*dc/rs=*/ 17 /* A3 */, /*reset=*/ 15 /* A1 */); // Remember to set R/W to 0 //U8G2_ST7920_128X64_1_SW_SPI u8g2(U8G2_R0, /* clock=*/ 18 /* A4 */ , /* data=*/ 16 /* A2 */, /* CS=*/ 17 /* A3 */, /* reset=*/ U8X8_PIN_NONE); //U8G2_ST7920_128X64_1_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* CS=*/ 10, /* reset=*/ 8); //U8G2_ST7920_128X64_1_HW_SPI u8g2(U8G2_R0, /* CS=*/ 10, /* reset=*/ 8); //U8G2_ST7565_EA_DOGM128_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_EA_DOGM128_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_64128N_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_64128N_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_EA_DOGM132_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); // DOGM132 Shield //U8G2_ST7565_EA_DOGM132_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); // DOGM132 Shield //U8G2_ST7565_ZOLEN_128X64_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_ZOLEN_128X64_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_LM6059_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Adafruit ST7565 GLCD //U8G2_ST7565_LM6059_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Adafruit ST7565 GLCD //U8G2_ST7565_ERC12864_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_ERC12864_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_NHD_C12832_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_NHD_C12832_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_NHD_C12864_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_NHD_C12864_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7567_PI_132X64_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); // Pax Instruments Shield, LCD_BL=6 //U8G2_ST7567_PI_132X64_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); // Pax Instruments Shield, LCD_BL=6 //U8G2_ST7567_JLX12864_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7567_JLX12864_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); //U8G2_NT7534_TG12864R_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_NT7534_TG12864R_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7588_JLX12864_1_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ 5); //U8G2_ST7588_JLX12864_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ 5); //U8G2_IST3020_ERC19264_1_6800 u8g2(U8G2_R0, 44, 43, 42, 41, 40, 39, 38, 37, /*enable=*/ 28, /*cs=*/ 32, /*dc=*/ 30, /*reset=*/ 31); // Connect WR pin with GND //U8G2_IST3020_ERC19264_1_8080 u8g2(U8G2_R0, 44, 43, 42, 41, 40, 39, 38, 37, /*enable=*/ 29, /*cs=*/ 32, /*dc=*/ 30, /*reset=*/ 31); // Connect RD pin with 3.3V //U8G2_IST3020_ERC19264_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_LC7981_160X80_1_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RW with GND //U8G2_LC7981_160X160_1_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RW with GND //U8G2_LC7981_240X128_1_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RW with GND //U8G2_SED1520_122X32_1 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*dc=*/ A0, /*e1=*/ A3, /*e2=*/ A2, /* reset=*/ A4); // Set R/W to low! //U8G2_T6963_240X128_1_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RD with +5V, FS0 and FS1 with GND //U8G2_T6963_256X64_1_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RD with +5V, FS0 and FS1 with GND //U8G2_SED1330_240X128_1_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect /RD = E with +5V, enable is /WR = RW, FG with GND, 14=Uno Pin A0 //U8G2_SED1330_240X128_1_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // A0 is dc pin, /WR = RW = GND, enable is /RD = E //U8G2_RA8835_NHD_240X128_1_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect /RD = E with +5V, enable is /WR = RW, FG with GND, 14=Uno Pin A0 //U8G2_RA8835_NHD_240X128_1_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // A0 is dc pin, /WR = RW = GND, enable is /RD = E //U8G2_UC1604_JLX19264_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_UC1604_JLX19264_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_UC1608_ERC24064_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // SW SPI, Due ERC24064-1 Test Setup //U8G2_UC1608_ERC240120_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_UC1608_240X128_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // SW SPI, Due ERC24064-1 Test Setup //U8G2_UC1610_EA_DOGXL160_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8G2_UC1610_EA_DOGXL160_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8G2_UC1611_EA_DOGM240_1_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGM240 Test Board //U8G2_UC1611_EA_DOGM240_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // SW SPI, Due DOGXL240 Test Board //U8G2_UC1611_EA_DOGXL240_1_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGXL240 Test Board //U8G2_UC1611_EA_DOGXL240_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // SW SPI, Due DOGXL240 Test Board //U8G2_UC1611_EW50850_1_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 3, /*dc=*/ 16, /*reset=*/ 16); // 240x160, Connect RD/WR1 pin with 3.3V, CS is aktive high //U8G2_SSD1606_172X72_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // eInk/ePaper Display //U8G2_SSD1607_200X200_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // eInk/ePaper Display, original LUT from embedded artists //U8G2_IL3820_296X128_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // WaveShare 2.9 inch eInk/ePaper Display, enable 16 bit mode for this display! //U8G2_IL3820_V2_296X128_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // ePaper Display, lesser flickering and faster speed, enable 16 bit mode for this display! // End of constructor list // XBM file start, paste the content of the XBM file directly into the .ino file // variable name changed from // static unsigned char u8g2_logo_97x51_bits[] // to // static const unsigned char u8g2_logo_97x51_bits[] U8X8_PROGMEM #define u8g2_logo_97x51_width 97 #define u8g2_logo_97x51_height 51 static const unsigned char u8g2_logo_97x51_bits[] U8X8_PROGMEM = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x3c, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x03, 0x00, 0x00, 0x3c, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0x03, 0x00, 0x00, 0x3c, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xcf, 0x07, 0x00, 0x00, 0x3c, 0x80, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x83, 0x07, 0x00, 0x00, 0x3c, 0x80, 0x07, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x07, 0x00, 0x00, 0x3c, 0x80, 0x07, 0xfc, 0x03, 0x1c, 0x00, 0x3e, 0x1c, 0xc0, 0x03, 0x00, 0x00, 0x3c, 0x80, 0x07, 0xff, 0x07, 0x7f, 0x80, 0xff, 0x3f, 0xe0, 0x01, 0x00, 0x00, 0x3c, 0x80, 0x07, 0xff, 0x8f, 0xff, 0xc1, 0xff, 0x3f, 0xf0, 0x00, 0x00, 0x00, 0x3c, 0x80, 0x87, 0xff, 0xdf, 0xff, 0xc1, 0xc3, 0x07, 0x7c, 0x00, 0x00, 0x00, 0x3c, 0x80, 0x87, 0x0f, 0xfe, 0xff, 0xe3, 0x81, 0x03, 0x1e, 0x00, 0x00, 0x00, 0x3c, 0x80, 0xc7, 0x07, 0xfc, 0xe3, 0xe3, 0x81, 0x07, 0x0f, 0x00, 0x00, 0x00, 0x3c, 0x80, 0xc7, 0x07, 0xf8, 0xc1, 0xe7, 0x81, 0x87, 0xff, 0x07, 0x00, 0x00, 0x3c, 0x80, 0xc7, 0x03, 0xf0, 0x80, 0xe7, 0xc3, 0x87, 0xff, 0x07, 0x00, 0x00, 0x3c, 0x80, 0xc7, 0x03, 0x70, 0x80, 0xc7, 0xe7, 0x83, 0xff, 0x07, 0x00, 0x00, 0x3c, 0x80, 0xc7, 0x03, 0x78, 0x80, 0xc7, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x80, 0xc7, 0x03, 0xf8, 0xc0, 0x87, 0xff, 0x01, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x80, 0xc7, 0x07, 0xfc, 0xc1, 0xc7, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0xc0, 0x87, 0x0f, 0xfe, 0xff, 0xe3, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0xc0, 0x83, 0xff, 0xdf, 0xff, 0xe3, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xf1, 0x03, 0xff, 0x8f, 0xff, 0xe1, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xff, 0x01, 0xfe, 0x0f, 0xff, 0xc0, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0x00, 0xfc, 0x03, 0x7c, 0xc0, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x00, 0xf8, 0x01, 0x00, 0xe0, 0x01, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x1e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0xf0, 0xc7, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xe0, 0xff, 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0xc0, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0xfc, 0xff, 0xff, 0xff, 0xff, 0xff, 0x01, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0xff, 0xff, 0xff, 0xff, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x40, 0x24, 0x20, 0x00, 0x00, 0x08, 0x46, 0x02, 0x00, 0x80, 0xc0, 0x40, 0x00, 0x0c, 0x6e, 0x6a, 0xc0, 0xa4, 0x48, 0x04, 0xaa, 0xac, 0x8c, 0xaa, 0xac, 0x00, 0x6a, 0xa4, 0xaa, 0x20, 0xea, 0xa4, 0x64, 0x66, 0xaa, 0x46, 0x4a, 0x8a, 0x00, 0x4c, 0xa4, 0xaa, 0x20, 0xaa, 0xa2, 0x44, 0x2a, 0xaa, 0x28, 0xaa, 0x4c, 0x00, 0xe8, 0xa8, 0x6c, 0xc4, 0xa4, 0x42, 0xee, 0x2a, 0xcc, 0x26, 0x6c, 0xe8, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; void setup(void) { /* U8g2 Project: SSD1306 Test Board */ //pinMode(10, OUTPUT); //pinMode(9, OUTPUT); //digitalWrite(10, 0); //digitalWrite(9, 0); /* U8g2 Project: T6963 Test Board */ //pinMode(18, OUTPUT); //digitalWrite(18, 1); u8g2.begin(); } void loop(void) { u8g2.firstPage(); do { u8g2.setFont(u8g2_font_ncenB14_tr); u8g2.drawXBMP(0,0, u8g2_logo_97x51_width, u8g2_logo_97x51_height, u8g2_logo_97x51_bits); } while ( u8g2.nextPage() ); //delay(1000); } ",12528,True,2846.448919663266,median "/**************************************************************************************************************************** ConfigOnSwitch.ino For ESP8266 / ESP32 boards ESP_WiFiManager is a library for the ESP8266/ESP32 platform (https://github.com/esp8266/Arduino) to enable easy configuration and reconfiguration of WiFi credentials using a Captive Portal. Inspired by: http://www.esp8266.com/viewtopic.php?f=29&t=2520 https://github.com/chriscook8/esp-arduino-apboot https://github.com/esp8266/Arduino/blob/master/libraries/DNSServer/examples/CaptivePortalAdvanced/ Modified from Tzapu https://github.com/tzapu/WiFiManager and from Ken Taylor https://github.com/kentaylor Built by Khoi Hoang https://github.com/khoih-prog/ESP_WiFiManager Licensed under MIT license *****************************************************************************************************************************/ /**************************************************************************************************************************** This example will open a configuration portal when no WiFi configuration has been previously entered or when a button is pushed. It is the easiest scenario for configuration but requires a pin and a button on the ESP8266 device. The Flash button is convenient for this on NodeMCU devices. Also in this example a password is required to connect to the configuration portal network. This is inconvenient but means that only those who know the password or those already connected to the target WiFi network can access the configuration portal and the WiFi network credentials will be sent from the browser over an encrypted connection and can not be read by observers. *****************************************************************************************************************************/ #if !( defined(ESP8266) || defined(ESP32) ) #error This code is intended to run only on the ESP8266 and ESP32 boards ! Please check your Tools->Board setting. #endif #define ESP_WIFIMANAGER_VERSION_MIN_TARGET ""ESP_WiFiManager v1.10.2"" #define ESP_WIFIMANAGER_VERSION_MIN 1010002 // Use from 0 to 4. Higher number, more debugging messages and memory usage. #define _WIFIMGR_LOGLEVEL_ 3 //For ESP32, To use ESP32 Dev Module, QIO, Flash 4MB/80MHz, Upload 921600 //Ported to ESP32 #ifdef ESP32 #include #include #include // From v1.1.0 #include WiFiMulti wifiMulti; // LittleFS has higher priority than SPIFFS #if ( defined(ESP_ARDUINO_VERSION_MAJOR) && (ESP_ARDUINO_VERSION_MAJOR >= 2) ) #define USE_LITTLEFS true #define USE_SPIFFS false #elif defined(ARDUINO_ESP32C3_DEV) // For core v1.0.6-, ESP32-C3 only supporting SPIFFS and EEPROM. To use v2.0.0+ for LittleFS #define USE_LITTLEFS false #define USE_SPIFFS true #endif #if USE_LITTLEFS // Use LittleFS #include ""FS.h"" // Check cores/esp32/esp_arduino_version.h and cores/esp32/core_version.h //#if ( ESP_ARDUINO_VERSION >= ESP_ARDUINO_VERSION_VAL(2, 0, 0) ) //(ESP_ARDUINO_VERSION_MAJOR >= 2) #if ( defined(ESP_ARDUINO_VERSION_MAJOR) && (ESP_ARDUINO_VERSION_MAJOR >= 2) ) #if (_WIFIMGR_LOGLEVEL_ > 3) #warning Using ESP32 Core 1.0.6 or 2.0.0+ #endif // The library has been merged into esp32 core from release 1.0.6 #include // https://github.com/espressif/arduino-esp32/tree/master/libraries/LittleFS FS* filesystem = &LittleFS; #define FileFS LittleFS #define FS_Name ""LittleFS"" #else #if (_WIFIMGR_LOGLEVEL_ > 3) #warning Using ESP32 Core 1.0.5-. You must install LITTLEFS library #endif // The library has been merged into esp32 core from release 1.0.6 #include // https://github.com/lorol/LITTLEFS FS* filesystem = &LITTLEFS; #define FileFS LITTLEFS #define FS_Name ""LittleFS"" #endif #elif USE_SPIFFS #include FS* filesystem = &SPIFFS; #define FileFS SPIFFS #define FS_Name ""SPIFFS"" #else // Use FFat #include FS* filesystem = &FFat; #define FileFS FFat #define FS_Name ""FFat"" #endif ////// #define ESP_getChipId() ((uint32_t)ESP.getEfuseMac()) #define LED_BUILTIN 2 #define LED_ON HIGH #define LED_OFF LOW #else #include //https://github.com/esp8266/Arduino //needed for library #include #include // From v1.1.0 #include ESP8266WiFiMulti wifiMulti; #define USE_LITTLEFS true #if USE_LITTLEFS #include FS* filesystem = &LittleFS; #define FileFS LittleFS #define FS_Name ""LittleFS"" #else FS* filesystem = &SPIFFS; #define FileFS SPIFFS #define FS_Name ""SPIFFS"" #endif ////// #define ESP_getChipId() (ESP.getChipId()) #define LED_ON LOW #define LED_OFF HIGH #endif #ifdef ESP32 //See file .../hardware/espressif/esp32/variants/(esp32|doitESP32devkitV1)/pins_arduino.h #define LED_BUILTIN 2 // Pin D2 mapped to pin GPIO2/ADC12 of ESP32, control on-board LED #define PIN_LED 2 // Pin D2 mapped to pin GPIO2/ADC12 of ESP32, control on-board LED #define PIN_D0 0 // Pin D0 mapped to pin GPIO0/BOOT/ADC11/TOUCH1 of ESP32 #define PIN_D1 1 // Pin D1 mapped to pin GPIO1/TX0 of ESP32 #define PIN_D2 2 // Pin D2 mapped to pin GPIO2/ADC12/TOUCH2 of ESP32 #define PIN_D3 3 // Pin D3 mapped to pin GPIO3/RX0 of ESP32 #define PIN_D4 4 // Pin D4 mapped to pin GPIO4/ADC10/TOUCH0 of ESP32 #define PIN_D5 5 // Pin D5 mapped to pin GPIO5/SPISS/VSPI_SS of ESP32 #define PIN_D6 6 // Pin D6 mapped to pin GPIO6/FLASH_SCK of ESP32 #define PIN_D7 7 // Pin D7 mapped to pin GPIO7/FLASH_D0 of ESP32 #define PIN_D8 8 // Pin D8 mapped to pin GPIO8/FLASH_D1 of ESP32 #define PIN_D9 9 // Pin D9 mapped to pin GPIO9/FLASH_D2 of ESP32 #define PIN_D10 10 // Pin D10 mapped to pin GPIO10/FLASH_D3 of ESP32 #define PIN_D11 11 // Pin D11 mapped to pin GPIO11/FLASH_CMD of ESP32 #define PIN_D12 12 // Pin D12 mapped to pin GPIO12/HSPI_MISO/ADC15/TOUCH5/TDI of ESP32 #define PIN_D13 13 // Pin D13 mapped to pin GPIO13/HSPI_MOSI/ADC14/TOUCH4/TCK of ESP32 #define PIN_D14 14 // Pin D14 mapped to pin GPIO14/HSPI_SCK/ADC16/TOUCH6/TMS of ESP32 #define PIN_D15 15 // Pin D15 mapped to pin GPIO15/HSPI_SS/ADC13/TOUCH3/TDO of ESP32 #define PIN_D16 16 // Pin D16 mapped to pin GPIO16/TX2 of ESP32 #define PIN_D17 17 // Pin D17 mapped to pin GPIO17/RX2 of ESP32 #define PIN_D18 18 // Pin D18 mapped to pin GPIO18/VSPI_SCK of ESP32 #define PIN_D19 19 // Pin D19 mapped to pin GPIO19/VSPI_MISO of ESP32 #define PIN_D21 21 // Pin D21 mapped to pin GPIO21/SDA of ESP32 #define PIN_D22 22 // Pin D22 mapped to pin GPIO22/SCL of ESP32 #define PIN_D23 23 // Pin D23 mapped to pin GPIO23/VSPI_MOSI of ESP32 #define PIN_D24 24 // Pin D24 mapped to pin GPIO24 of ESP32 #define PIN_D25 25 // Pin D25 mapped to pin GPIO25/ADC18/DAC1 of ESP32 #define PIN_D26 26 // Pin D26 mapped to pin GPIO26/ADC19/DAC2 of ESP32 #define PIN_D27 27 // Pin D27 mapped to pin GPIO27/ADC17/TOUCH7 of ESP32 #define PIN_D32 32 // Pin D32 mapped to pin GPIO32/ADC4/TOUCH9 of ESP32 #define PIN_D33 33 // Pin D33 mapped to pin GPIO33/ADC5/TOUCH8 of ESP32 #define PIN_D34 34 // Pin D34 mapped to pin GPIO34/ADC6 of ESP32 //Only GPIO pin < 34 can be used as output. Pins >= 34 can be only inputs //See .../cores/esp32/esp32-hal-gpio.h/c //#define digitalPinIsValid(pin) ((pin) < 40 && esp32_gpioMux[(pin)].reg) //#define digitalPinCanOutput(pin) ((pin) < 34 && esp32_gpioMux[(pin)].reg) //#define digitalPinToRtcPin(pin) (((pin) < 40)?esp32_gpioMux[(pin)].rtc:-1) //#define digitalPinToAnalogChannel(pin) (((pin) < 40)?esp32_gpioMux[(pin)].adc:-1) //#define digitalPinToTouchChannel(pin) (((pin) < 40)?esp32_gpioMux[(pin)].touch:-1) //#define digitalPinToDacChannel(pin) (((pin) == 25)?0:((pin) == 26)?1:-1) #define PIN_D35 35 // Pin D35 mapped to pin GPIO35/ADC7 of ESP32 #define PIN_D36 36 // Pin D36 mapped to pin GPIO36/ADC0/SVP of ESP32 #define PIN_D39 39 // Pin D39 mapped to pin GPIO39/ADC3/SVN of ESP32 #define PIN_RX0 3 // Pin RX0 mapped to pin GPIO3/RX0 of ESP32 #define PIN_TX0 1 // Pin TX0 mapped to pin GPIO1/TX0 of ESP32 #define PIN_SCL 22 // Pin SCL mapped to pin GPIO22/SCL of ESP32 #define PIN_SDA 21 // Pin SDA mapped to pin GPIO21/SDA of ESP32 #else //PIN_D0 can't be used for PWM/I2C #define PIN_D0 16 // Pin D0 mapped to pin GPIO16/USER/WAKE of ESP8266. This pin is also used for Onboard-Blue LED. PIN_D0 = 0 => LED ON #define PIN_D1 5 // Pin D1 mapped to pin GPIO5 of ESP8266 #define PIN_D2 4 // Pin D2 mapped to pin GPIO4 of ESP8266 #define PIN_D3 0 // Pin D3 mapped to pin GPIO0/FLASH of ESP8266 #define PIN_D4 2 // Pin D4 mapped to pin GPIO2/TXD1 of ESP8266 #define PIN_LED 2 // Pin D4 mapped to pin GPIO2/TXD1 of ESP8266, NodeMCU and WeMoS, control on-board LED #define PIN_D5 14 // Pin D5 mapped to pin GPIO14/HSCLK of ESP8266 #define PIN_D6 12 // Pin D6 mapped to pin GPIO12/HMISO of ESP8266 #define PIN_D7 13 // Pin D7 mapped to pin GPIO13/RXD2/HMOSI of ESP8266 #define PIN_D8 15 // Pin D8 mapped to pin GPIO15/TXD2/HCS of ESP8266 //Don't use pins GPIO6 to GPIO11 as already connected to flash, etc. Use them can crash the program //GPIO9(D11/SD2) and GPIO11 can be used only if flash in DIO mode ( not the default QIO mode) #define PIN_D11 9 // Pin D11/SD2 mapped to pin GPIO9/SDD2 of ESP8266 #define PIN_D12 10 // Pin D12/SD3 mapped to pin GPIO10/SDD3 of ESP8266 #define PIN_SD2 9 // Pin SD2 mapped to pin GPIO9/SDD2 of ESP8266 #define PIN_SD3 10 // Pin SD3 mapped to pin GPIO10/SDD3 of ESP8266 #define PIN_D9 3 // Pin D9 /RX mapped to pin GPIO3/RXD0 of ESP8266 #define PIN_D10 1 // Pin D10/TX mapped to pin GPIO1/TXD0 of ESP8266 #define PIN_RX 3 // Pin RX mapped to pin GPIO3/RXD0 of ESP8266 #define PIN_TX 1 // Pin RX mapped to pin GPIO1/TXD0 of ESP8266 #define LED_PIN 16 // Pin D0 mapped to pin GPIO16 of ESP8266. This pin is also used for Onboard-Blue LED. PIN_D0 = 0 => LED ON #endif //USE_ESP32 #ifdef ESP32 /* Trigger for inititating config mode is Pin D3 and also flash button on NodeMCU Flash button is convenient to use but if it is pressed it will stuff up the serial port device driver until the computer is rebooted on windows machines. */ const int TRIGGER_PIN = PIN_D0; // Pin D0 mapped to pin GPIO0/BOOT/ADC11/TOUCH1 of ESP32 /* Alternative trigger pin. Needs to be connected to a button to use this pin. It must be a momentary connection not connected permanently to ground. Either trigger pin will work. */ #if ( ARDUINO_ESP32C3_DEV ) const int TRIGGER_PIN2 = PIN_D8; // Pin D8 mapped to pin GPIO8/FLASH_D1 of ESP32 #else const int TRIGGER_PIN2 = PIN_D25; // Pin D25 mapped to pin GPIO25/ADC18/DAC1 of ESP32 #endif #else /* Trigger for inititating config mode is Pin D3 and also flash button on NodeMCU Flash button is convenient to use but if it is pressed it will stuff up the serial port device driver until the computer is rebooted on windows machines. */ const int TRIGGER_PIN = PIN_D3; // D3 on NodeMCU and WeMos. /* Alternative trigger pin. Needs to be connected to a button to use this pin. It must be a momentary connection not connected permanently to ground. Either trigger pin will work. */ const int TRIGGER_PIN2 = PIN_D7; // D7 on NodeMCU and WeMos. #endif // SSID and PW for Config Portal String ssid = ""ESP_"" + String(ESP_getChipId(), HEX); String password; // SSID and PW for your Router String Router_SSID; String Router_Pass; // From v1.1.0 // You only need to format the filesystem once //#define FORMAT_FILESYSTEM true #define FORMAT_FILESYSTEM false #define MIN_AP_PASSWORD_SIZE 8 #define SSID_MAX_LEN 32 //From v1.0.10, WPA2 passwords can be up to 63 characters long. #define PASS_MAX_LEN 64 typedef struct { char wifi_ssid[SSID_MAX_LEN]; char wifi_pw [PASS_MAX_LEN]; } WiFi_Credentials; typedef struct { String wifi_ssid; String wifi_pw; } WiFi_Credentials_String; #define NUM_WIFI_CREDENTIALS 2 // Assuming max 491 chars #define TZNAME_MAX_LEN 50 #define TIMEZONE_MAX_LEN 50 typedef struct { WiFi_Credentials WiFi_Creds [NUM_WIFI_CREDENTIALS]; char TZ_Name[TZNAME_MAX_LEN]; // ""America/Toronto"" char TZ[TIMEZONE_MAX_LEN]; // ""EST5EDT,M3.2.0,M11.1.0"" uint16_t checksum; } WM_Config; WM_Config WM_config; #define CONFIG_FILENAME F(""/wifi_cred.dat"") ////// // Indicates whether ESP has WiFi credentials saved from previous session bool initialConfig = false; // Use false if you don't like to display Available Pages in Information Page of Config Portal // Comment out or use true to display Available Pages in Information Page of Config Portal // Must be placed before #include #define USE_AVAILABLE_PAGES false // From v1.0.10 to permit disable/enable StaticIP configuration in Config Portal from sketch. Valid only if DHCP is used. // You'll loose the feature of dynamically changing from DHCP to static IP, or vice versa // You have to explicitly specify false to disable the feature. //#define USE_STATIC_IP_CONFIG_IN_CP false // Use false to disable NTP config. Advisable when using Cellphone, Tablet to access Config Portal. // See Issue 23: On Android phone ConfigPortal is unresponsive (https://github.com/khoih-prog/ESP_WiFiManager/issues/23) #define USE_ESP_WIFIMANAGER_NTP true // Just use enough to save memory. On ESP8266, can cause blank ConfigPortal screen // if using too much memory #define USING_AFRICA false #define USING_AMERICA true #define USING_ANTARCTICA false #define USING_ASIA false #define USING_ATLANTIC false #define USING_AUSTRALIA false #define USING_EUROPE false #define USING_INDIAN false #define USING_PACIFIC false #define USING_ETC_GMT false // Use true to enable CloudFlare NTP service. System can hang if you don't have Internet access while accessing CloudFlare // See Issue #21: CloudFlare link in the default portal (https://github.com/khoih-prog/ESP_WiFiManager/issues/21) #define USE_CLOUDFLARE_NTP false // New in v1.0.11 #define USING_CORS_FEATURE true //////////////////////////////////////////// // Use USE_DHCP_IP == true for dynamic DHCP IP, false to use static IP which you have to change accordingly to your network #if (defined(USE_STATIC_IP_CONFIG_IN_CP) && !USE_STATIC_IP_CONFIG_IN_CP) // Force DHCP to be true #if defined(USE_DHCP_IP) #undef USE_DHCP_IP #endif #define USE_DHCP_IP true #else // You can select DHCP or Static IP here #define USE_DHCP_IP true //#define USE_DHCP_IP false #endif #if ( USE_DHCP_IP ) // Use DHCP #if (_WIFIMGR_LOGLEVEL_ > 3) #warning Using DHCP IP #endif IPAddress stationIP = IPAddress(0, 0, 0, 0); IPAddress gatewayIP = IPAddress(192, 168, 2, 1); IPAddress netMask = IPAddress(255, 255, 255, 0); #else // Use static IP #if (_WIFIMGR_LOGLEVEL_ > 3) #warning Using static IP #endif #ifdef ESP32 IPAddress stationIP = IPAddress(192, 168, 2, 232); #else IPAddress stationIP = IPAddress(192, 168, 2, 186); #endif IPAddress gatewayIP = IPAddress(192, 168, 2, 1); IPAddress netMask = IPAddress(255, 255, 255, 0); #endif //////////////////////////////////////////// #define USE_CONFIGURABLE_DNS true IPAddress dns1IP = gatewayIP; IPAddress dns2IP = IPAddress(8, 8, 8, 8); #define USE_CUSTOM_AP_IP false // New in v1.4.0 IPAddress APStaticIP = IPAddress(192, 168, 100, 1); IPAddress APStaticGW = IPAddress(192, 168, 100, 1); IPAddress APStaticSN = IPAddress(255, 255, 255, 0); // Must be placed before #include , or default port 80 will be used //#define HTTP_PORT 8080 #include //https://github.com/khoih-prog/ESP_WiFiManager // Redundant, for v1.8.0 only //#include //https://github.com/khoih-prog/ESP_WiFiManager // Function Prototypes uint8_t connectMultiWiFi(); /////////////////////////////////////////// // New in v1.4.0 /****************************************** * // Defined in ESPAsync_WiFiManager.h typedef struct { IPAddress _ap_static_ip; IPAddress _ap_static_gw; IPAddress _ap_static_sn; } WiFi_AP_IPConfig; typedef struct { IPAddress _sta_static_ip; IPAddress _sta_static_gw; IPAddress _sta_static_sn; #if USE_CONFIGURABLE_DNS IPAddress _sta_static_dns1; IPAddress _sta_static_dns2; #endif } WiFi_STA_IPConfig; ******************************************/ WiFi_AP_IPConfig WM_AP_IPconfig; WiFi_STA_IPConfig WM_STA_IPconfig; void initAPIPConfigStruct(WiFi_AP_IPConfig &in_WM_AP_IPconfig) { in_WM_AP_IPconfig._ap_static_ip = APStaticIP; in_WM_AP_IPconfig._ap_static_gw = APStaticGW; in_WM_AP_IPconfig._ap_static_sn = APStaticSN; } void initSTAIPConfigStruct(WiFi_STA_IPConfig &in_WM_STA_IPconfig) { in_WM_STA_IPconfig._sta_static_ip = stationIP; in_WM_STA_IPconfig._sta_static_gw = gatewayIP; in_WM_STA_IPconfig._sta_static_sn = netMask; #if USE_CONFIGURABLE_DNS in_WM_STA_IPconfig._sta_static_dns1 = dns1IP; in_WM_STA_IPconfig._sta_static_dns2 = dns2IP; #endif } void displayIPConfigStruct(WiFi_STA_IPConfig in_WM_STA_IPconfig) { LOGERROR3(F(""stationIP =""), in_WM_STA_IPconfig._sta_static_ip, "", gatewayIP ="", in_WM_STA_IPconfig._sta_static_gw); LOGERROR1(F(""netMask =""), in_WM_STA_IPconfig._sta_static_sn); #if USE_CONFIGURABLE_DNS LOGERROR3(F(""dns1IP =""), in_WM_STA_IPconfig._sta_static_dns1, "", dns2IP ="", in_WM_STA_IPconfig._sta_static_dns2); #endif } void configWiFi(WiFi_STA_IPConfig in_WM_STA_IPconfig) { #if USE_CONFIGURABLE_DNS // Set static IP, Gateway, Subnetmask, DNS1 and DNS2. New in v1.0.5 WiFi.config(in_WM_STA_IPconfig._sta_static_ip, in_WM_STA_IPconfig._sta_static_gw, in_WM_STA_IPconfig._sta_static_sn, in_WM_STA_IPconfig._sta_static_dns1, in_WM_STA_IPconfig._sta_static_dns2); #else // Set static IP, Gateway, Subnetmask, Use auto DNS1 and DNS2. WiFi.config(in_WM_STA_IPconfig._sta_static_ip, in_WM_STA_IPconfig._sta_static_gw, in_WM_STA_IPconfig._sta_static_sn); #endif } /////////////////////////////////////////// uint8_t connectMultiWiFi() { #if ESP32 // For ESP32, this better be 0 to shorten the connect time. // For ESP32-S2/C3, must be > 500 #if ( USING_ESP32_S2 || USING_ESP32_C3 ) #define WIFI_MULTI_1ST_CONNECT_WAITING_MS 500L #else // For ESP32 core v1.0.6, must be >= 500 #define WIFI_MULTI_1ST_CONNECT_WAITING_MS 800L #endif #else // For ESP8266, this better be 2200 to enable connect the 1st time #define WIFI_MULTI_1ST_CONNECT_WAITING_MS 2200L #endif #define WIFI_MULTI_CONNECT_WAITING_MS 500L uint8_t status; //WiFi.mode(WIFI_STA); LOGERROR(F(""ConnectMultiWiFi with :"")); if ( (Router_SSID != """") && (Router_Pass != """") ) { LOGERROR3(F(""* Flash-stored Router_SSID = ""), Router_SSID, F("", Router_Pass = ""), Router_Pass ); LOGERROR3(F(""* Add SSID = ""), Router_SSID, F("", PW = ""), Router_Pass ); wifiMulti.addAP(Router_SSID.c_str(), Router_Pass.c_str()); } for (uint8_t i = 0; i < NUM_WIFI_CREDENTIALS; i++) { // Don't permit NULL SSID and password len < MIN_AP_PASSWORD_SIZE (8) if ( (String(WM_config.WiFi_Creds[i].wifi_ssid) != """") && (strlen(WM_config.WiFi_Creds[i].wifi_pw) >= MIN_AP_PASSWORD_SIZE) ) { LOGERROR3(F(""* Additional SSID = ""), WM_config.WiFi_Creds[i].wifi_ssid, F("", PW = ""), WM_config.WiFi_Creds[i].wifi_pw ); } } LOGERROR(F(""Connecting MultiWifi..."")); //WiFi.mode(WIFI_STA); #if !USE_DHCP_IP // New in v1.4.0 configWiFi(WM_STA_IPconfig); ////// #endif int i = 0; status = wifiMulti.run(); delay(WIFI_MULTI_1ST_CONNECT_WAITING_MS); while ( ( i++ < 20 ) && ( status != WL_CONNECTED ) ) { status = WiFi.status(); if ( status == WL_CONNECTED ) break; else delay(WIFI_MULTI_CONNECT_WAITING_MS); } if ( status == WL_CONNECTED ) { LOGERROR1(F(""WiFi connected after time: ""), i); LOGERROR3(F(""SSID:""), WiFi.SSID(), F("",RSSI=""), WiFi.RSSI()); LOGERROR3(F(""Channel:""), WiFi.channel(), F("",IP address:""), WiFi.localIP() ); } else { LOGERROR(F(""WiFi not connected"")); #if ESP8266 ESP.reset(); #else ESP.restart(); #endif } return status; } #if USE_ESP_WIFIMANAGER_NTP void printLocalTime() { #if ESP8266 static time_t now; now = time(nullptr); if ( now > 1451602800 ) { Serial.print(""Local Date/Time: ""); Serial.print(ctime(&now)); } #else struct tm timeinfo; getLocalTime( &timeinfo ); // Valid only if year > 2000. // You can get from timeinfo : tm_year, tm_mon, tm_mday, tm_hour, tm_min, tm_sec if (timeinfo.tm_year > 100 ) { Serial.print(""Local Date/Time: ""); Serial.print( asctime( &timeinfo ) ); } #endif } #endif void heartBeatPrint() { #if USE_ESP_WIFIMANAGER_NTP printLocalTime(); #else static int num = 1; if (WiFi.status() == WL_CONNECTED) Serial.print(F(""H"")); // H means connected to WiFi else Serial.print(F(""F"")); // F means not connected to WiFi if (num == 80) { Serial.println(); num = 1; } else if (num++ % 10 == 0) { Serial.print(F("" "")); } #endif } void check_WiFi() { if ( (WiFi.status() != WL_CONNECTED) ) { Serial.println(F(""\\nWiFi lost. Call connectMultiWiFi in loop"")); connectMultiWiFi(); } } void check_status() { static ulong checkstatus_timeout = 0; static ulong checkwifi_timeout = 0; static ulong current_millis; #define WIFICHECK_INTERVAL 1000L #if USE_ESP_WIFIMANAGER_NTP #define HEARTBEAT_INTERVAL 60000L #else #define HEARTBEAT_INTERVAL 10000L #endif current_millis = millis(); // Check WiFi every WIFICHECK_INTERVAL (1) seconds. if ((current_millis > checkwifi_timeout) || (checkwifi_timeout == 0)) { check_WiFi(); checkwifi_timeout = current_millis + WIFICHECK_INTERVAL; } // Print hearbeat every HEARTBEAT_INTERVAL (10) seconds. if ((current_millis > checkstatus_timeout) || (checkstatus_timeout == 0)) { heartBeatPrint(); checkstatus_timeout = current_millis + HEARTBEAT_INTERVAL; } } int calcChecksum(uint8_t* address, uint16_t sizeToCalc) { uint16_t checkSum = 0; for (uint16_t index = 0; index < sizeToCalc; index++) { checkSum += * ( ( (byte*) address ) + index); } return checkSum; } bool loadConfigData() { File file = FileFS.open(CONFIG_FILENAME, ""r""); LOGERROR(F(""LoadWiFiCfgFile "")); memset((void *) &WM_config, 0, sizeof(WM_config)); // New in v1.4.0 memset((void *) &WM_STA_IPconfig, 0, sizeof(WM_STA_IPconfig)); ////// if (file) { file.readBytes((char *) &WM_config, sizeof(WM_config)); // New in v1.4.0 file.readBytes((char *) &WM_STA_IPconfig, sizeof(WM_STA_IPconfig)); ////// file.close(); LOGERROR(F(""OK"")); if ( WM_config.checksum != calcChecksum( (uint8_t*) &WM_config, sizeof(WM_config) - sizeof(WM_config.checksum) ) ) { LOGERROR(F(""WM_config checksum wrong"")); return false; } // New in v1.4.0 displayIPConfigStruct(WM_STA_IPconfig); ////// return true; } else { LOGERROR(F(""failed"")); return false; } } void saveConfigData() { File file = FileFS.open(CONFIG_FILENAME, ""w""); LOGERROR(F(""SaveWiFiCfgFile "")); if (file) { WM_config.checksum = calcChecksum( (uint8_t*) &WM_config, sizeof(WM_config) - sizeof(WM_config.checksum) ); file.write((uint8_t*) &WM_config, sizeof(WM_config)); displayIPConfigStruct(WM_STA_IPconfig); // New in v1.4.0 file.write((uint8_t*) &WM_STA_IPconfig, sizeof(WM_STA_IPconfig)); ////// file.close(); LOGERROR(F(""OK"")); } else { LOGERROR(F(""failed"")); } } void setup() { // put your setup code here, to run once: // initialize the LED digital pin as an output. pinMode(PIN_LED, OUTPUT); pinMode(TRIGGER_PIN, INPUT_PULLUP); pinMode(TRIGGER_PIN2, INPUT_PULLUP); Serial.begin(115200); while (!Serial); delay(200); Serial.print(F(""\\nStarting ConfigOnSwitch using "")); Serial.print(FS_Name); Serial.print(F("" on "")); Serial.println(ARDUINO_BOARD); Serial.println(ESP_WIFIMANAGER_VERSION); #if defined(ESP_WIFIMANAGER_VERSION_MIN) if (ESP_WIFIMANAGER_VERSION_INT < ESP_WIFIMANAGER_VERSION_MIN) { Serial.print(""Warning. Must use this example on Version later than : ""); Serial.println(ESP_WIFIMANAGER_VERSION_MIN_TARGET); } #endif Serial.setDebugOutput(false); if (FORMAT_FILESYSTEM) { Serial.println(F(""Forced Formatting."")); FileFS.format(); } // Format FileFS if not yet #ifdef ESP32 if (!FileFS.begin(true)) #else if (!FileFS.begin()) #endif { #ifdef ESP8266 FileFS.format(); #endif Serial.println(F(""SPIFFS/LittleFS failed! Already tried formatting."")); if (!FileFS.begin()) { // prevents debug info from the library to hide err message. delay(100); #if USE_LITTLEFS Serial.println(F(""LittleFS failed!. Please use SPIFFS or EEPROM. Stay forever"")); #else Serial.println(F(""SPIFFS failed!. Please use LittleFS or EEPROM. Stay forever"")); #endif while (true) { delay(1); } } } unsigned long startedAt = millis(); // New in v1.4.0 initAPIPConfigStruct(WM_AP_IPconfig); initSTAIPConfigStruct(WM_STA_IPconfig); ////// //Local intialization. Once its business is done, there is no need to keep it around // Use this to default DHCP hostname to ESP8266-XXXXXX or ESP32-XXXXXX //ESP_WiFiManager ESP_wifiManager; // Use this to personalize DHCP hostname (RFC952 conformed) ESP_WiFiManager ESP_wifiManager(""ConfigOnSwitch""); ESP_wifiManager.setDebugOutput(true); // Use only to erase stored WiFi Credentials //resetSettings(); //ESP_wifiManager.resetSettings(); #if USE_CUSTOM_AP_IP //set custom ip for portal // New in v1.4.0 ESP_wifiManager.setAPStaticIPConfig(WM_AP_IPconfig); ////// #endif ESP_wifiManager.setMinimumSignalQuality(-1); // From v1.0.10 only // Set config portal channel, default = 1. Use 0 => random channel from 1-13 ESP_wifiManager.setConfigPortalChannel(0); ////// #if !USE_DHCP_IP // Set (static IP, Gateway, Subnetmask, DNS1 and DNS2) or (IP, Gateway, Subnetmask). New in v1.0.5 // New in v1.4.0 ESP_wifiManager.setSTAStaticIPConfig(WM_STA_IPconfig); ////// #endif // New from v1.1.1 #if USING_CORS_FEATURE ESP_wifiManager.setCORSHeader(""Your Access-Control-Allow-Origin""); #endif // We can't use WiFi.SSID() in ESP32as it's only valid after connected. // SSID and Password stored in ESP32 wifi_ap_record_t and wifi_config_t are also cleared in reboot // Have to create a new function to store in EEPROM/SPIFFS for this purpose Router_SSID = ESP_wifiManager.WiFi_SSID(); Router_Pass = ESP_wifiManager.WiFi_Pass(); //Remove this line if you do not want to see WiFi password printed Serial.println(""ESP Self-Stored: SSID = "" + Router_SSID + "", Pass = "" + Router_Pass); // SSID to uppercase ssid.toUpperCase(); password = ""My"" + ssid; bool configDataLoaded = false; // From v1.1.0, Don't permit NULL password if ( (Router_SSID != """") && (Router_Pass != """") ) { LOGERROR3(F(""* Add SSID = ""), Router_SSID, F("", PW = ""), Router_Pass); wifiMulti.addAP(Router_SSID.c_str(), Router_Pass.c_str()); ESP_wifiManager.setConfigPortalTimeout(120); //If no access point name has been previously entered disable timeout. Serial.println(F(""Got ESP Self-Stored Credentials. Timeout 120s for Config Portal"")); } else if (loadConfigData()) { configDataLoaded = true; ESP_wifiManager.setConfigPortalTimeout(120); //If no access point name has been previously entered disable timeout. Serial.println(F(""Got stored Credentials. Timeout 120s for Config Portal"")); } else { // Enter CP only if no stored SSID on flash and file Serial.println(F(""Open Config Portal without Timeout: No stored Credentials."")); initialConfig = true; } if (initialConfig) { Serial.print(F(""Starting configuration portal @ "")); #if USE_CUSTOM_AP_IP Serial.print(APStaticIP); #else Serial.print(F(""192.168.4.1"")); #endif #if defined(HTTP_PORT_TO_USE) Serial.print(F("":"")); Serial.print(HTTP_PORT_TO_USE); #endif Serial.print(F("", SSID = "")); Serial.print(ssid); Serial.print(F("", PWD = "")); Serial.println(password); digitalWrite(PIN_LED, LED_ON); // turn the LED on by making the voltage LOW to tell us we are in configuration mode. //sets timeout in seconds until configuration portal gets turned off. //If not specified device will remain in configuration mode until //switched off via webserver or device is restarted. //ESP_wifiManager.setConfigPortalTimeout(600); // Starts an access point if (!ESP_wifiManager.startConfigPortal((const char *) ssid.c_str(), password.c_str())) Serial.println(F(""Not connected to WiFi but continuing anyway."")); else { Serial.println(F(""WiFi connected...yeey :)"")); } // Stored for later usage, from v1.1.0, but clear first memset(&WM_config, 0, sizeof(WM_config)); for (uint8_t i = 0; i < NUM_WIFI_CREDENTIALS; i++) { String tempSSID = ESP_wifiManager.getSSID(i); String tempPW = ESP_wifiManager.getPW(i); if (strlen(tempSSID.c_str()) < sizeof(WM_config.WiFi_Creds[i].wifi_ssid) - 1) strcpy(WM_config.WiFi_Creds[i].wifi_ssid, tempSSID.c_str()); else strncpy(WM_config.WiFi_Creds[i].wifi_ssid, tempSSID.c_str(), sizeof(WM_config.WiFi_Creds[i].wifi_ssid) - 1); if (strlen(tempPW.c_str()) < sizeof(WM_config.WiFi_Creds[i].wifi_pw) - 1) strcpy(WM_config.WiFi_Creds[i].wifi_pw, tempPW.c_str()); else strncpy(WM_config.WiFi_Creds[i].wifi_pw, tempPW.c_str(), sizeof(WM_config.WiFi_Creds[i].wifi_pw) - 1); // Don't permit NULL SSID and password len < MIN_AP_PASSWORD_SIZE (8) if ( (String(WM_config.WiFi_Creds[i].wifi_ssid) != """") && (strlen(WM_config.WiFi_Creds[i].wifi_pw) >= MIN_AP_PASSWORD_SIZE) ) { LOGERROR3(F(""* Add SSID = ""), WM_config.WiFi_Creds[i].wifi_ssid, F("", PW = ""), WM_config.WiFi_Creds[i].wifi_pw ); wifiMulti.addAP(WM_config.WiFi_Creds[i].wifi_ssid, WM_config.WiFi_Creds[i].wifi_pw); } } #if USE_ESP_WIFIMANAGER_NTP String tempTZ = ESP_wifiManager.getTimezoneName(); if (strlen(tempTZ.c_str()) < sizeof(WM_config.TZ_Name) - 1) strcpy(WM_config.TZ_Name, tempTZ.c_str()); else strncpy(WM_config.TZ_Name, tempTZ.c_str(), sizeof(WM_config.TZ_Name) - 1); const char * TZ_Result = ESP_wifiManager.getTZ(WM_config.TZ_Name); if (strlen(TZ_Result) < sizeof(WM_config.TZ) - 1) strcpy(WM_config.TZ, TZ_Result); else strncpy(WM_config.TZ, TZ_Result, sizeof(WM_config.TZ_Name) - 1); if ( strlen(WM_config.TZ_Name) > 0 ) { LOGERROR3(F(""Saving current TZ_Name =""), WM_config.TZ_Name, F("", TZ = ""), WM_config.TZ); #if ESP8266 configTime(WM_config.TZ, ""pool.ntp.org""); #else //configTzTime(WM_config.TZ, ""pool.ntp.org"" ); configTzTime(WM_config.TZ, ""time.nist.gov"", ""0.pool.ntp.org"", ""1.pool.ntp.org""); #endif } else { LOGERROR(F(""Current Timezone Name is not set. Enter Config Portal to set."")); } #endif // New in v1.4.0 ESP_wifiManager.getSTAStaticIPConfig(WM_STA_IPconfig); ////// saveConfigData(); } digitalWrite(PIN_LED, LED_OFF); // Turn led off as we are not in configuration mode. startedAt = millis(); if (!initialConfig) { // Load stored data, the addAP ready for MultiWiFi reconnection if (!configDataLoaded) loadConfigData(); for (uint8_t i = 0; i < NUM_WIFI_CREDENTIALS; i++) { // Don't permit NULL SSID and password len < MIN_AP_PASSWORD_SIZE (8) if ( (String(WM_config.WiFi_Creds[i].wifi_ssid) != """") && (strlen(WM_config.WiFi_Creds[i].wifi_pw) >= MIN_AP_PASSWORD_SIZE) ) { LOGERROR3(F(""* Add SSID = ""), WM_config.WiFi_Creds[i].wifi_ssid, F("", PW = ""), WM_config.WiFi_Creds[i].wifi_pw ); wifiMulti.addAP(WM_config.WiFi_Creds[i].wifi_ssid, WM_config.WiFi_Creds[i].wifi_pw); } } if ( WiFi.status() != WL_CONNECTED ) { Serial.println(F(""ConnectMultiWiFi in setup"")); connectMultiWiFi(); } } Serial.print(F(""After waiting "")); Serial.print((float) (millis() - startedAt) / 1000); Serial.print(F("" secs more in setup(), connection result is "")); if (WiFi.status() == WL_CONNECTED) { Serial.print(F(""connected. Local IP: "")); Serial.println(WiFi.localIP()); } else Serial.println(ESP_wifiManager.getStatus(WiFi.status())); } void loop() { // is configuration portal requested? if ((digitalRead(TRIGGER_PIN) == LOW) || (digitalRead(TRIGGER_PIN2) == LOW)) { Serial.println(F(""\\nConfiguration portal requested."")); digitalWrite(PIN_LED, LED_ON); // turn the LED on by making the voltage LOW to tell us we are in configuration mode. //Local intialization. Once its business is done, there is no need to keep it around ESP_WiFiManager ESP_wifiManager(""ConfigOnSwitch""); ESP_wifiManager.setMinimumSignalQuality(-1); // From v1.0.10 only // Set config portal channel, default = 1. Use 0 => random channel from 1-13 ESP_wifiManager.setConfigPortalChannel(0); ////// #if USE_CUSTOM_AP_IP //set custom ip for portal // New in v1.4.0 ESP_wifiManager.setAPStaticIPConfig(WM_AP_IPconfig); ////// #endif #if !USE_DHCP_IP #if USE_CONFIGURABLE_DNS // Set static IP, Gateway, Subnetmask, DNS1 and DNS2. New in v1.0.5 ESP_wifiManager.setSTAStaticIPConfig(stationIP, gatewayIP, netMask, dns1IP, dns2IP); #else // Set static IP, Gateway, Subnetmask, Use auto DNS1 and DNS2. ESP_wifiManager.setSTAStaticIPConfig(stationIP, gatewayIP, netMask); #endif #endif // New from v1.1.1 #if USING_CORS_FEATURE ESP_wifiManager.setCORSHeader(""Your Access-Control-Allow-Origin""); #endif //Check if there is stored WiFi router/password credentials. //If not found, device will remain in configuration mode until switched off via webserver. Serial.println(F(""Opening configuration portal. "")); Router_SSID = ESP_wifiManager.WiFi_SSID(); Router_Pass = ESP_wifiManager.WiFi_Pass(); //Remove this line if you do not want to see WiFi password printed Serial.println(""ESP Self-Stored: SSID = "" + Router_SSID + "", Pass = "" + Router_Pass); // From v1.1.0, Don't permit NULL password if ( (Router_SSID != """") && (Router_Pass != """") ) { LOGERROR3(F(""* Add SSID = ""), Router_SSID, F("", PW = ""), Router_Pass); wifiMulti.addAP(Router_SSID.c_str(), Router_Pass.c_str()); ESP_wifiManager.setConfigPortalTimeout(120); //If no access point name has been previously entered disable timeout. Serial.println(F(""Got ESP Self-Stored Credentials. Timeout 120s for Config Portal"")); } if (loadConfigData()) { ESP_wifiManager.setConfigPortalTimeout(120); //If no access point name has been previously entered disable timeout. Serial.println(F(""Got stored Credentials. Timeout 120s for Config Portal"")); #if USE_ESP_WIFIMANAGER_NTP if ( strlen(WM_config.TZ_Name) > 0 ) { LOGERROR3(F(""Current TZ_Name =""), WM_config.TZ_Name, F("", TZ = ""), WM_config.TZ); #if ESP8266 configTime(WM_config.TZ, ""pool.ntp.org""); #else //configTzTime(WM_config.TZ, ""pool.ntp.org"" ); configTzTime(WM_config.TZ, ""time.nist.gov"", ""0.pool.ntp.org"", ""1.pool.ntp.org""); #endif } else { Serial.println(F(""Current Timezone is not set. Enter Config Portal to set."")); } #endif } else { // Enter CP only if no stored SSID on flash and file Serial.println(F(""Open Config Portal without Timeout: No stored Credentials."")); initialConfig = true; } //Starts an access point //and goes into a blocking loop awaiting configuration if (!ESP_wifiManager.startConfigPortal((const char *) ssid.c_str(), password.c_str())) { Serial.println(F(""Not connected to WiFi but continuing anyway."")); } else { //if you get here you have connected to the WiFi Serial.println(F(""connected...yeey :)"")); Serial.print(F(""Local IP: "")); Serial.println(WiFi.localIP()); } // Only clear then save data if CP entered and with new valid Credentials // No CP => stored getSSID() = """" if ( String(ESP_wifiManager.getSSID(0)) != """" && String(ESP_wifiManager.getSSID(1)) != """" ) { // Stored for later usage, from v1.1.0, but clear first memset(&WM_config, 0, sizeof(WM_config)); for (uint8_t i = 0; i < NUM_WIFI_CREDENTIALS; i++) { String tempSSID = ESP_wifiManager.getSSID(i); String tempPW = ESP_wifiManager.getPW(i); if (strlen(tempSSID.c_str()) < sizeof(WM_config.WiFi_Creds[i].wifi_ssid) - 1) strcpy(WM_config.WiFi_Creds[i].wifi_ssid, tempSSID.c_str()); else strncpy(WM_config.WiFi_Creds[i].wifi_ssid, tempSSID.c_str(), sizeof(WM_config.WiFi_Creds[i].wifi_ssid) - 1); if (strlen(tempPW.c_str()) < sizeof(WM_config.WiFi_Creds[i].wifi_pw) - 1) strcpy(WM_config.WiFi_Creds[i].wifi_pw, tempPW.c_str()); else strncpy(WM_config.WiFi_Creds[i].wifi_pw, tempPW.c_str(), sizeof(WM_config.WiFi_Creds[i].wifi_pw) - 1); // Don't permit NULL SSID and password len < MIN_AP_PASSWORD_SIZE (8) if ( (String(WM_config.WiFi_Creds[i].wifi_ssid) != """") && (strlen(WM_config.WiFi_Creds[i].wifi_pw) >= MIN_AP_PASSWORD_SIZE) ) { LOGERROR3(F(""* Add SSID = ""), WM_config.WiFi_Creds[i].wifi_ssid, F("", PW = ""), WM_config.WiFi_Creds[i].wifi_pw ); wifiMulti.addAP(WM_config.WiFi_Creds[i].wifi_ssid, WM_config.WiFi_Creds[i].wifi_pw); } } #if USE_ESP_WIFIMANAGER_NTP String tempTZ = ESP_wifiManager.getTimezoneName(); if (strlen(tempTZ.c_str()) < sizeof(WM_config.TZ_Name) - 1) strcpy(WM_config.TZ_Name, tempTZ.c_str()); else strncpy(WM_config.TZ_Name, tempTZ.c_str(), sizeof(WM_config.TZ_Name) - 1); const char * TZ_Result = ESP_wifiManager.getTZ(WM_config.TZ_Name); if (strlen(TZ_Result) < sizeof(WM_config.TZ) - 1) strcpy(WM_config.TZ, TZ_Result); else strncpy(WM_config.TZ, TZ_Result, sizeof(WM_config.TZ_Name) - 1); if ( strlen(WM_config.TZ_Name) > 0 ) { LOGERROR3(F(""Saving current TZ_Name =""), WM_config.TZ_Name, F("", TZ = ""), WM_config.TZ); #if ESP8266 configTime(WM_config.TZ, ""pool.ntp.org""); #else //configTzTime(WM_config.TZ, ""pool.ntp.org"" ); configTzTime(WM_config.TZ, ""time.nist.gov"", ""0.pool.ntp.org"", ""1.pool.ntp.org""); #endif } else { LOGERROR(F(""Current Timezone Name is not set. Enter Config Portal to set."")); } #endif // New in v1.4.0 ESP_wifiManager.getSTAStaticIPConfig(WM_STA_IPconfig); ////// saveConfigData(); digitalWrite(PIN_LED, LED_OFF); // Turn led off as we are not in configuration mode. } } // put your main code here, to run repeatedly check_status(); } ",12236,False,1976.652445736289,median "// Uncomment this to enable Arduino OTA //#define UseOTA #include #include #include #include #include #ifdef UseOTA #include #include #include #endif // Neopixel #define PIN 3 #define NUMPIXELS 41 Adafruit_NeoPixel pixels = Adafruit_NeoPixel(NUMPIXELS, PIN, NEO_GRB + NEO_KHZ800); int ledArray[NUMPIXELS][3]; // Custom array to allow us to buffer changes before sending them // Wifi WiFiClient espClient; char* SSID = ""REDACTED""; char* WiFiPassword = ""REDACTED""; char* WiFiHostname = ""REDACTED""; // MQTT const char* mqtt_server = ""REDACTED""; int mqtt_port = 1883; const char* mqttUser = ""REDACTED""; const char* mqttPass = ""REDACTED""; PubSubClient client(espClient); const uint8_t bufferSize = 20; char buffer[bufferSize]; // Reconnect Variables unsigned long reconnectStart = 0; unsigned long lastReconnectMessage = 0; unsigned long messageInterval = 1000; int currentReconnectStep = 0; boolean offlineMode = true; boolean recovered = false; // Device Specific Topics const char* commandlTopic = ""light/test""; const char* stateTopic = ""light/test/state""; const char* rgbCommandTopic = ""light/test/rgb""; const char* rgbStateTopic = ""light/test/rgb/state""; const char* availabilityTopic = ""light/test/availability""; const char* recoveryTopic = ""light/test/recovery""; // Device specific variables (currently only used for animations specific to my stair LEDs, leave false if you are not me) boolean stairs = false; int stairPixelArray[13]; int stairPixelArrayLength = 13; // Sun Position const char* sunPositionTopic = ""sunPosition""; // This will be sent as a retained message so will be updated upon boot int sunPosition = 0; // Other unsigned long availabilityPublishTimer = 0; int availabilityPublishInterval = 30000; #pragma region Global Animation Variables const int numModes = 11; // This is the total number of modes int currentMode; // 0 int brightness = 255; int rgbValueOne[3]; // 1 int rgbValueTwo[3]; // 2 unsigned long colourDelay; // 3 int colourJump; // 4 unsigned long pixelDelay; // 5 int pixelJump; // 6 boolean randomise; // 7 unsigned long loopDelay; // 8 float highPixelDelay; // 9 float multiplier; // 10 int chance; // 11 int trailLength; // 12 unsigned long previousMillis; boolean flipFlop; int currentStep; int currentPixel; unsigned long colourDelaySeed; int colourJumpSeed; unsigned long pixelDelaySeed; unsigned long loopDelaySeed; float highPixelDelaySeed; float multiplierSeed; #pragma endregion void resetGlobalAnimationVariables() { currentMode = 0; for (int colour = 0;colour < 3;colour ++) { rgbValueOne[colour] = 0; rgbValueTwo[colour] = 255; } colourDelay = 0; colourJump = 1; pixelDelay = 0; pixelJump = 1; randomise = false; loopDelay = 0; highPixelDelay = 0; multiplier = 1; previousMillis = 0; flipFlop = 0; currentStep = 0; currentPixel = 0; trailLength = 0; colourDelaySeed = 0; colourJumpSeed = 1; pixelDelaySeed = 0; loopDelaySeed = 0; highPixelDelaySeed = 0; multiplierSeed = 0; chance = 100; } void setModeDefaults(int mode) { // All Off // No additional defaults // All On if (mode == 1) { rgbValueTwo[0] = 255; rgbValueTwo[1] = 147; rgbValueTwo[2] = 41; colourDelay = 2; } // Fade To Colour else if (mode == 2) { rgbValueTwo[0] = 0; rgbValueTwo[1] = 0; rgbValueTwo[2] = 255; colourDelay = 20; } // Strobe else if (mode == 3) { colourDelay = 40; } // Fire else if (mode == 4) { colourDelay = 20; } // Colour Phase else if (mode == 5) { colourDelay = 30; } // Sparkle else if (mode == 6) { rgbValueTwo[0] = 150; rgbValueTwo[1] = 150; rgbValueTwo[2] = 150; colourJump = 5; } // Shoot else if (mode == 7) { rgbValueTwo[0] = 50; rgbValueTwo[1] = 50; rgbValueTwo[2] = 255; colourJump = 20; loopDelay = 10000; highPixelDelay = 5; multiplier = 1.15; randomise = true; trailLength = 7; } // Mode 8 else if (mode == 8) { rgbValueTwo[0] = 100; rgbValueTwo[1] = 100; rgbValueTwo[2] = 255; colourDelay = 4; chance = 15000; } // Stairs On else if (mode == 9) { rgbValueTwo[0] = 255; rgbValueTwo[1] = 147; rgbValueTwo[2] = 41; } // Stair Shutdown else if (mode == 10) { rgbValueTwo[0] = 255; rgbValueTwo[1] = 0; rgbValueTwo[2] = 0; } // Stair Startup else if (mode == 11) { rgbValueTwo[0] = 255; rgbValueTwo[1] = 147; rgbValueTwo[2] = 41; } } void reconnect() { // IF statements used to complete process in single loop if possible // 0 - Turn the LED on and log the reconnect start time if (currentReconnectStep == 0) { digitalWrite(LED_BUILTIN, LOW); reconnectStart = millis(); currentReconnectStep++; // If the ESP is reconnecting after a connection failure then wait a second before starting the reconnect routine if (offlineMode == false) { delay(1000); } } // If we've previously had a connection and have been trying to connect for more than 2 minutes then restart the ESP. // We don't do this if we've never had a connection as that means the issue isn't temporary and we don't want the relay // to turn off every 2 minutes. if (offlineMode == false && ((millis() - reconnectStart) > 120000)) { Serial.println(""Restarting!""); ESP.restart(); } // 1 - Check WiFi Connection if (currentReconnectStep == 1) { if (WiFi.status() != WL_CONNECTED) { if ((millis() - lastReconnectMessage) > messageInterval) { Serial.print(""Awaiting WiFi Connection (""); Serial.print((millis() - reconnectStart) / 1000); Serial.println(""s)""); lastReconnectMessage = millis(); } } else { Serial.println(""WiFi connected!""); Serial.print(""SSID: ""); Serial.print(WiFi.SSID()); Serial.println(""""); Serial.print(""IP address: ""); Serial.println(WiFi.localIP()); Serial.println(""""); lastReconnectMessage = 0; currentReconnectStep = 2; } } // 2 - Check MQTT Connection if (currentReconnectStep == 2) { if (!client.connected()) { if ((millis() - lastReconnectMessage) > messageInterval) { Serial.print(""Awaiting MQTT Connection (""); Serial.print((millis() - reconnectStart) / 1000); Serial.println(""s)""); lastReconnectMessage = millis(); String clientId = ""ESP8266Client-""; clientId += String(random(0xffff), HEX); client.connect(clientId.c_str(), mqttUser, mqttPass, availabilityTopic, 0, true, ""0""); } // Check the MQTT again and go forward if necessary if (client.connected()) { Serial.println(""MQTT connected!""); Serial.println(""""); lastReconnectMessage = 0; currentReconnectStep = 3; } // Check the WiFi again and go back if necessary else if (WiFi.status() != WL_CONNECTED) { currentReconnectStep = 1; } } else { Serial.println(""MQTT connected!""); Serial.println(""""); lastReconnectMessage = 0; currentReconnectStep = 3; } } // 3 - All connected, turn the LED back on and then subscribe to the MQTT topics if (currentReconnectStep == 3) { digitalWrite(LED_BUILTIN, HIGH); // Turn the LED off publishAvailability(); // MQTT Subscriptions client.subscribe(sunPositionTopic); client.subscribe(rgbCommandTopic); client.subscribe(commandlTopic); client.subscribe(recoveryTopic); if (offlineMode == true) { offlineMode = false; Serial.println(""Offline Mode Deactivated""); Serial.println(""""); } currentReconnectStep = 0; // Reset } } #pragma region MiscFunctions int* randomColour() { // Not yet used but could be useful static int aRandomColour[3]; aRandomColour[0] = random(255); aRandomColour[1] = random(255); aRandomColour[2] = random(255); return aRandomColour; } void updateLedArray_singleColour(int targetColour[3]) { for (int i = 0; i < NUMPIXELS; i++) { ledArray[i][0] = targetColour[0]; ledArray[i][1] = targetColour[1]; ledArray[i][2] = targetColour[2]; } } void updateStripFromLedArray() { for (int i = 0; i < NUMPIXELS; i++) { pixels.setPixelColor(i, pixels.Color(ledArray[i][0], ledArray[i][1], ledArray[i][2])); } pixels.show(); } void publishState() { if (currentMode == 0) { client.publish(stateTopic, ""0"", true); } else { client.publish(stateTopic, ""1"", true); } } void publishColour() { snprintf(buffer, bufferSize, ""%d,%d,%d"", rgbValueTwo[0], rgbValueTwo[1], rgbValueTwo[2]); client.publish(rgbStateTopic, buffer); } void publishAvailability() { client.publish(availabilityTopic, ""1"", true); } void publishRecovery() { DynamicJsonBuffer jsonBuffer; // Reserve memory space (https://bblanchon.github.io/ArduinoJson/) JsonObject& root = jsonBuffer.createObject(); // Create the JSON object // Always publish the mode so that there is a current retained message root[""0""] = currentMode; // Only publish the other variables if they are non-default if (rgbValueOne[0] != 0 | rgbValueOne[1] != 0 | rgbValueOne[2] != 0) { JsonArray& rgbValueOneArray = root.createNestedArray(""1""); rgbValueOneArray.add(rgbValueOne[0]); rgbValueOneArray.add(rgbValueOne[1]); rgbValueOneArray.add(rgbValueOne[2]); } if (rgbValueTwo[0] != 255 | rgbValueTwo[1] != 255 | rgbValueTwo[2] != 255) { JsonArray& rgbValueTwoArray = root.createNestedArray(""2""); rgbValueTwoArray.add(rgbValueTwo[0]); rgbValueTwoArray.add(rgbValueTwo[1]); rgbValueTwoArray.add(rgbValueTwo[2]); } if (colourDelay != 0) { root[""3""] = colourDelay; } if (colourJump != 1) { root[""4""] = colourJump; } if (pixelDelay != 0) { root[""5""] = pixelDelay; } if (pixelJump != 1) { root[""6""] = pixelJump; } if (randomise != false) { root[""7""] = randomise; } if (loopDelay != 0) { root[""8""] = loopDelay; } if (highPixelDelay != 0) { root[""9""] = highPixelDelay; } if (multiplier != 1) { root[""10""] = multiplier; } if (chance != 100) { root[""11""] = chance; } if (trailLength != 0) { root[""12""] = trailLength; } char buffer[256]; root.printTo(buffer, sizeof(buffer)); client.publish(recoveryTopic, buffer, true); } void publishAll() { publishColour(); publishState(); publishRecovery(); publishAvailability(); } #pragma endregion #pragma region Modes void allRgbValueOne() { if (flipFlop == 0) { // This is used updateLedArray_singleColour(rgbValueOne); updateStripFromLedArray(); flipFlop = 1; } } void allRgbValueTwo() { if (flipFlop == 0) { // This is used updateLedArray_singleColour(rgbValueTwo); updateStripFromLedArray(); flipFlop = 1; } } void stairsOn() { if (flipFlop == 0) { // This isn't used updateLedArray_singleColour(rgbValueOne); for (int i = 0; i < 3; i++) { ledArray[3][i] = rgbValueTwo[i]; ledArray[12][i] = rgbValueTwo[i]; ledArray[21][i] = rgbValueTwo[i]; ledArray[30][i] = rgbValueTwo[i]; ledArray[40][i] = rgbValueTwo[i]; ledArray[49][i] = rgbValueTwo[i]; ledArray[58][i] = rgbValueTwo[i]; ledArray[68][i] = rgbValueTwo[i]; ledArray[77][i] = rgbValueTwo[i]; ledArray[86][i] = rgbValueTwo[i]; ledArray[96][i] = rgbValueTwo[i]; ledArray[105][i] = rgbValueTwo[i]; ledArray[111][i] = rgbValueTwo[i]; } updateStripFromLedArray(); } } void stairsOff() { if (flipFlop == 0) { // This isn't used updateLedArray_singleColour(rgbValueOne); if (sunPosition == 0) { rgbValueTwo[0] = 2; rgbValueTwo[1] = 1; rgbValueTwo[2] = 0; } else if (sunPosition == 1) { rgbValueTwo[0] = 0; rgbValueTwo[1] = 0; rgbValueTwo[2] = 0; } for (int i = 0; i < 3; i++) { ledArray[0][i] = rgbValueTwo[i]; ledArray[9][i] = rgbValueTwo[i]; ledArray[18][i] = rgbValueTwo[i]; ledArray[27][i] = rgbValueTwo[i]; ledArray[37][i] = rgbValueTwo[i]; ledArray[46][i] = rgbValueTwo[i]; ledArray[55][i] = rgbValueTwo[i]; ledArray[65][i] = rgbValueTwo[i]; ledArray[74][i] = rgbValueTwo[i]; ledArray[83][i] = rgbValueTwo[i]; ledArray[93][i] = rgbValueTwo[i]; ledArray[102][i] = rgbValueTwo[i]; ledArray[111][i] = rgbValueTwo[i]; } updateStripFromLedArray(); } } void fadeToColour(bool useFlipFlop = false) { if (flipFlop == 0) { // This is used unsigned long currentMillis = millis(); if (currentMillis - previousMillis >= colourDelay) { int count = 0; // Reset the count for (int pixel = 0;pixel < NUMPIXELS;pixel ++){ // For every pixel if (ledArray[pixel][0] != rgbValueTwo[0] | ledArray[pixel][1] != rgbValueTwo[1] | ledArray[pixel][2] != rgbValueTwo[2]) { for (int colour = 0;colour < 3;colour++) { // For each colour if (ledArray[pixel][colour] < rgbValueTwo[colour]) { // If the colour value is less that it should be ledArray[pixel][colour] += 1; // Add 1 } else if (ledArray[pixel][colour] > rgbValueTwo[colour]) { // If the colour value is more that it should be ledArray[pixel][colour] -= 1; // Subtract 1 } } pixels.setPixelColor(pixel, pixels.Color(ledArray[pixel][0], ledArray[pixel][1], ledArray[pixel][2])); } else { count ++; } } pixels.show(); if (count == NUMPIXELS && useFlipFlop == true) { flipFlop = 1; } previousMillis = currentMillis; } } } void fadePixelToTargetColour(int pixelNo) { if (millis() - previousMillis >= colourDelay) { if (ledArray[pixelNo][0] != rgbValueTwo[0] | ledArray[pixelNo][1] != rgbValueTwo[1] | ledArray[pixelNo][2] != rgbValueTwo[2]) { for (int colour = 0; colour < 3; colour++) { // For each colour if (ledArray[pixelNo][colour] < rgbValueTwo[colour]) { // If the colour value is less that it should be ledArray[pixelNo][colour] += colourJump; // Add the colour jump if (ledArray[pixelNo][colour] > rgbValueTwo[colour]) { // Jump back if we've jumped over it ledArray[pixelNo][colour] = rgbValueTwo[colour]; } } else if (ledArray[pixelNo][colour] > rgbValueTwo[colour]) { // If the colour value is more that it should be ledArray[pixelNo][colour] -= colourJump; // Subtract the colour jump if (ledArray[pixelNo][colour] < rgbValueTwo[colour]) { // Jump back if we've jumped under it ledArray[pixelNo][colour] = rgbValueTwo[colour]; } } } pixels.setPixelColor(pixelNo, pixels.Color(ledArray[pixelNo][0], ledArray[pixelNo][1], ledArray[pixelNo][2])); pixels.show(); } else { currentStep++; } previousMillis = millis(); } } void fadePixelToBaseColour(int pixelNo) { if (millis() - previousMillis >= colourDelay) { if (ledArray[pixelNo][0] != rgbValueOne[0] | ledArray[pixelNo][1] != rgbValueOne[1] | ledArray[pixelNo][2] != rgbValueOne[2]) { for (int colour = 0; colour < 3; colour++) { // For each colour if (ledArray[pixelNo][colour] < rgbValueOne[colour]) { // If the colour value is less that it should be ledArray[pixelNo][colour] += colourJump; // Add the colour jump if (ledArray[pixelNo][colour] > rgbValueOne[colour]) { // Jump back if we've jumped over it ledArray[pixelNo][colour] = rgbValueOne[colour]; } } else if (ledArray[pixelNo][colour] > rgbValueOne[colour]) { // If the colour value is more that it should be ledArray[pixelNo][colour] -= colourJump; // Subtract the colour jump if (ledArray[pixelNo][colour] < rgbValueOne[colour]) { // Jump back if we've jumped under it ledArray[pixelNo][colour] = rgbValueOne[colour]; } } } pixels.setPixelColor(pixelNo, pixels.Color(ledArray[pixelNo][0], ledArray[pixelNo][1], ledArray[pixelNo][2])); pixels.show(); } else { currentStep++; } previousMillis = millis(); } } void strobe() { unsigned long currentMillis = millis(); if (currentMillis - previousMillis >= colourDelay) { if (flipFlop == 1) { updateLedArray_singleColour(rgbValueTwo); updateStripFromLedArray(); flipFlop = !flipFlop; } else if (flipFlop == 0) { updateLedArray_singleColour(rgbValueOne); updateStripFromLedArray(); flipFlop = !flipFlop; } previousMillis = currentMillis; } } void fire(int Cooling, int Sparking, int SpeedDelay) { // Need to tailor variables and update LED array static byte heat[NUMPIXELS]; int cooldown; // Step 1. Cool down every cell a little for( int i = 0; i < NUMPIXELS; i++) { cooldown = random(0, ((Cooling * 10) / NUMPIXELS) + 2); if(cooldown>heat[i]) { heat[i]=0; } else { heat[i]=heat[i]-cooldown; } } // Step 2. Heat from each cell drifts 'up' and diffuses a little for( int k= NUMPIXELS - 1; k >= 2; k--) { heat[k] = (heat[k - 1] + heat[k - 2] + heat[k - 2]) / 3; } // Step 3. Randomly ignite new 'sparks' near the bottom if( random(255) < Sparking ) { int y = random(7); heat[y] = heat[y] + random(160,255); //heat[y] = random(160,255); } // Step 4. Convert heat to LED colors for( int j = 0; j < NUMPIXELS; j++) { setPixelHeatColor(j, heat[j] ); } pixels.show(); delay(SpeedDelay); } void setPixelHeatColor (int Pixel, byte temperature) { // Scale 'heat' down from 0-255 to 0-191 byte t192 = round((temperature/255.0)*191); // calculate ramp up from byte heatramp = t192 & 0x3F; // 0..63 heatramp <<= 2; // scale up to 0..252 // figure out which third of the spectrum we're in: if( t192 > 0x80) { // hottest pixels.setPixelColor(Pixel, 255, 255, heatramp); } else if( t192 > 0x40 ) { // middle pixels.setPixelColor(Pixel, 255, heatramp, 0); } else { // coolest pixels.setPixelColor(Pixel, heatramp, 0, 0); } } // Fire Source: https://www.tweaking4all.com/hardware/arduino/adruino-led-strip-effects/#fire void colourPhase() { if (flipFlop == 1) { // fadeToColour will set flipFlop to 1 when complete so we use this to update the current step then reset the flipFlop currentStep++; flipFlop = 0; if (currentStep > 5) { // If the current step is greater than the number of steps we reset currentStep = 0; } } if (currentStep == 0) { rgbValueTwo[0] = 255; rgbValueTwo[1] = 0; rgbValueTwo[2] = 0; fadeToColour(true); } else if (currentStep == 1) { rgbValueTwo[0] = 255; rgbValueTwo[1] = 255; rgbValueTwo[2] = 0; fadeToColour(true); } else if (currentStep == 2) { rgbValueTwo[0] = 0; rgbValueTwo[1] = 255; rgbValueTwo[2] = 0; fadeToColour(true); } else if (currentStep == 3) { rgbValueTwo[0] = 0; rgbValueTwo[1] = 255; rgbValueTwo[2] = 255; fadeToColour(true); } else if (currentStep == 4) { rgbValueTwo[0] = 0; rgbValueTwo[1] = 0; rgbValueTwo[2] = 255; fadeToColour(true); } else if (currentStep == 5) { rgbValueTwo[0] = 255; rgbValueTwo[1] = 255; rgbValueTwo[2] = 255; fadeToColour(true); } } void sparkle() { unsigned long currentMillis = millis(); // Initiator if (currentStep == 0) { allRgbValueOne(); // Sets all LEDs to rgbValueOne colourDelaySeed = colourDelay; colourJumpSeed = colourJump; pixelDelaySeed = pixelDelay; currentStep ++; } // Pixel Delay if (currentStep == 1) { if (currentMillis - previousMillis >= pixelDelay) { if (randomise == true) { pixelDelay = random(pixelDelaySeed); colourDelay = random(colourDelaySeed); // Only change between pixels so the light doesn't waver colourJump = random(1,colourJumpSeed); // Min of 1 otherwise there's a chance the loop will stop } previousMillis = currentMillis; currentStep ++; } } // Roll Up if (currentStep == 2 && (currentMillis - previousMillis >= colourDelay )) { if (ledArray[currentPixel][0] != rgbValueTwo[0] | ledArray[currentPixel][1] != rgbValueTwo[1] | ledArray[currentPixel][2] != rgbValueTwo[2]) { // If the pixel hasn't reached peak for (int i = 1;!(i > colourJump);i++) { for (int col = 0;col < 3;col++) { // For each colour if (ledArray[currentPixel][col] < rgbValueTwo[col]) { // If the colour value is less that it should be ledArray[currentPixel][col] += 1; // Add 1 } else if (ledArray[currentPixel][col] > rgbValueTwo[col]) { // If the colour value is more that it should be ledArray[currentPixel][col] -= 1; // Subtract 1 } } } updateStripFromLedArray(); } else { currentStep ++; } previousMillis = currentMillis; } // Roll Down if (currentStep == 3 && (currentMillis - previousMillis >= colourDelay )) { if (ledArray[currentPixel][0] != rgbValueOne[0] | ledArray[currentPixel][1] != rgbValueOne[1] | ledArray[currentPixel][2] != rgbValueOne[2]) { // If the pixel hasn't reached base for (int i = 1;!(i > colourJump);i++) { for (int col = 0;col < 3;col++) { // For each colour if (ledArray[currentPixel][col] < rgbValueOne[col]) { // If the colour value is less that it should be ledArray[currentPixel][col] += 1; // Add 1 } else if (ledArray[currentPixel][col] > rgbValueOne[col]) { // If the colour value is more that it should be ledArray[currentPixel][col] -= 1; // Subtract 1 } } } updateStripFromLedArray(); } else { currentStep = 1; // Go back to the mid pixel wait currentPixel = random(NUMPIXELS); } previousMillis = currentMillis; } } void rain() { unsigned long currentMillis = millis(); if (random(chance) == 1) { int randomPixel = random(NUMPIXELS); ledArray[randomPixel][0] = rgbValueTwo[0]; ledArray[randomPixel][1] = rgbValueTwo[1]; ledArray[randomPixel][2] = rgbValueTwo[2]; updateStripFromLedArray(); } if (currentMillis - previousMillis >= colourDelay) { for (int pixel = 0;pixel < NUMPIXELS;pixel ++){ // For every pixel for (int i = 1;!(i > colourJump);i++) { if (ledArray[pixel][0] != rgbValueOne[0] | ledArray[pixel][1] != rgbValueOne[1] | ledArray[pixel][2] != rgbValueOne[2]) { for (int colour = 0;colour < 3;colour++) { // For each colour if (ledArray[pixel][colour] < rgbValueOne[colour]) { // If the colour value is less that it should be ledArray[pixel][colour] += 1; // Add 1 } else if (ledArray[pixel][colour] > rgbValueOne[colour]) { // If the colour value is more that it should be ledArray[pixel][colour] -= 1; // Subtract 1 } } pixels.setPixelColor(pixel, pixels.Color(ledArray[pixel][0],ledArray[pixel][1],ledArray[pixel][2])); } } } updateStripFromLedArray(); previousMillis = currentMillis; } } void shoot() { unsigned long currentMillis = millis(); // Initiator if (currentStep == 0) { allRgbValueOne(); // Sets all LEDs to rgbValueOne loopDelaySeed = loopDelay; colourJumpSeed = colourJump; multiplierSeed = multiplier; highPixelDelaySeed = highPixelDelay; // Seeded because it's multiplied not because it's randomised currentStep++; } // Loop Delay if (currentStep == 1) { if (currentMillis - previousMillis >= loopDelay) { if (randomise == true) { loopDelay = random(loopDelaySeed); colourJump = random(1, colourJumpSeed); float multiplierSeedX = (multiplier * 100.00); multiplier = (random(multiplierSeedX * 0.95, multiplierSeedX * 1.05)) / 100.00; // +-5% - Best at 1.25 } highPixelDelay = highPixelDelaySeed; previousMillis = currentMillis; currentStep++; } } // Pixel Delay if (currentStep == 2) { if (currentMillis - previousMillis >= pixelDelay) { previousMillis = currentMillis; currentStep++; } } // Roll Up if (currentPixel > (NUMPIXELS - 1)) { // Skip the roll up if we're after the last pixel (trail) currentStep = 4; } if (currentStep == 3 && (currentMillis - previousMillis >= colourDelay)) { if (ledArray[currentPixel][0] != rgbValueTwo[0] | ledArray[currentPixel][1] != rgbValueTwo[1] | ledArray[currentPixel][2] != rgbValueTwo[2]) { // If the pixel hasn't reached peak for (int i = 1; !(i > colourJump); i++) { for (int col = 0; col < 3; col++) { // For each colour if (ledArray[currentPixel][col] < rgbValueTwo[col]) { // If the colour value is less that it should be ledArray[currentPixel][col] += 1; // Add 1 } else if (ledArray[currentPixel][col] > rgbValueTwo[col]) { // If the colour value is more that it should be ledArray[currentPixel][col] -= 1; // Subtract 1 } } } updateStripFromLedArray(); } else { currentStep++; } previousMillis = currentMillis; } // High Pixel Delay if (currentStep == 4) { if (currentMillis - previousMillis >= highPixelDelay) { previousMillis = currentMillis; highPixelDelay = (highPixelDelay * multiplier); currentStep++; } } // Roll Down if (currentStep == 5 && (currentMillis - previousMillis >= colourDelay)) { if (trailLength == 0) { if (ledArray[currentPixel][0] != rgbValueOne[0] | ledArray[currentPixel][1] != rgbValueOne[1] | ledArray[currentPixel][2] != rgbValueOne[2]) { // If the pixel hasn't reached base for (int i = 1; !(i > colourJump); i++) { for (int col = 0; col < 3; col++) { // For each colour if (ledArray[currentPixel][col] < rgbValueOne[col]) { // If the colour value is less that it should be ledArray[currentPixel][col] += 1; // Add 1 } else if (ledArray[currentPixel][col] > rgbValueOne[col]) { // If the colour value is more that it should be ledArray[currentPixel][col] -= 1; // Subtract 1 } } } updateStripFromLedArray(); } else { if (currentPixel == (NUMPIXELS - 1)) { currentPixel = 0; currentStep = 1; } else { currentPixel++; currentStep = 2; } } } else { Serial.println(""---""); Serial.print(""currentPixel = ""); Serial.println(currentPixel); int currentTrailPixel = currentPixel; // Start with the current pixel as we're about to put the next one up while (currentTrailPixel >= (currentPixel - (trailLength + 1))) { if (currentTrailPixel >= 0 && currentTrailPixel < NUMPIXELS) { Serial.print(""trailPixelToUpdate = ""); Serial.println(currentTrailPixel); if (currentTrailPixel > (currentPixel - trailLength)) { // This is the trail int trailDifference = (currentPixel - currentTrailPixel); float trailPercentage = ((1.0 / trailLength) * (trailLength - trailDifference)); Serial.print(""trailPercentage = ""); Serial.println(trailPercentage); ledArray[currentTrailPixel][0] = (rgbValueTwo[0] * trailPercentage); ledArray[currentTrailPixel][1] = (rgbValueTwo[1] * trailPercentage); ledArray[currentTrailPixel][2] = (rgbValueTwo[2] * trailPercentage); } else { // Clear the trail ledArray[currentTrailPixel][0] = rgbValueOne[0]; ledArray[currentTrailPixel][1] = rgbValueOne[1]; ledArray[currentTrailPixel][2] = rgbValueOne[2]; } } currentTrailPixel = (currentTrailPixel - 1); } updateStripFromLedArray(); if (currentPixel == ((NUMPIXELS - 1) + trailLength)) { currentPixel = 0; currentStep = 1; } else { currentPixel++; currentStep = 2; } } previousMillis = currentMillis; } } void stairStartup() { if (currentStep == 0) { allRgbValueOne(); // Turn all the lights off first currentPixel = 12; // Start at the end currentStep++; } else if (currentStep == 1) { fadePixelToTargetColour(stairPixelArray[currentPixel]); } else if (currentStep == 2) { if ((currentPixel - 1) <= -1) { // If we've done all the pixels currentStep = 4; } else if (millis() - previousMillis >= pixelDelay) { currentPixel--; currentStep = 1; } } else if (currentStep == 4) { currentMode = 9; // stairsOn setModeDefaults(currentMode); // No need to publish state as mode 10 is considered on anyway and so has already been published publishColour(); publishRecovery(); } } void stairShutdown() { // This step fades the top LED to red to indicate shutdown if (currentStep == 0) { fadePixelToTargetColour(111); } else if (currentStep == 1) { fadePixelToBaseColour(stairPixelArray[currentPixel]); } else if (currentStep == 2) { if ((currentPixel + 1) >= stairPixelArrayLength) { // If we've done all the pixels currentStep = 3; } else if (millis() - previousMillis >= pixelDelay) { currentPixel++; currentStep = 1; } } else if (currentStep == 3) { currentMode = 0; // Off setModeDefaults(currentMode); publishAll(); } } #pragma endregion void setup() { pinMode(LED_BUILTIN, OUTPUT); // Initialize the LED_BUILTIN pin as an output digitalWrite(LED_BUILTIN, LOW); // Turn the LED on to indicate no connection Serial.begin(115200); pixels.begin(); // This initializes the NeoPixel library. pixels.setBrightness(brightness); pixels.show(); WiFi.hostname(WiFiHostname); WiFi.mode(WIFI_STA); WiFi.begin(SSID, WiFiPassword); client.setServer(mqtt_server, mqtt_port); client.setCallback(callback); // Initialise the custom ledArray library for (int i = 0;i < NUMPIXELS;i ++) { ledArray[i][0] = 0; ledArray[i][1] = 0; ledArray[i][2] = 0; } // Initialise the stairPixelArray stairPixelArray[0] = 3; stairPixelArray[1] = 12; stairPixelArray[2] = 21; stairPixelArray[3] = 30; stairPixelArray[4] = 40; stairPixelArray[5] = 49; stairPixelArray[6] = 58; stairPixelArray[7] = 68; stairPixelArray[8] = 77; stairPixelArray[9] = 86; stairPixelArray[10] = 96; stairPixelArray[11] = 105; stairPixelArray[12] = 111; // Set all global animation variables to their defaults resetGlobalAnimationVariables(); // OTA #ifdef UseOTA ArduinoOTA.setHostname(WiFiHostname); ArduinoOTA.onStart([]() { String type; if (ArduinoOTA.getCommand() == U_FLASH) { type = ""sketch""; } else { // U_SPIFFS type = ""filesystem""; } // NOTE: if updating SPIFFS this would be the place to unmount SPIFFS using SPIFFS.end() Serial.println(""Start updating "" + type); }); ArduinoOTA.onEnd([]() { Serial.println(""\\nEnd""); }); ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) { Serial.printf(""Progress: %u%%\\r"", (progress / (total / 100))); }); ArduinoOTA.onError([](ota_error_t error) { Serial.printf(""Error[%u]: "", error); if (error == OTA_AUTH_ERROR) { Serial.println(""Auth Failed""); } else if (error == OTA_BEGIN_ERROR) { Serial.println(""Begin Failed""); } else if (error == OTA_CONNECT_ERROR) { Serial.println(""Connect Failed""); } else if (error == OTA_RECEIVE_ERROR) { Serial.println(""Receive Failed""); } else if (error == OTA_END_ERROR) { Serial.println(""End Failed""); } }); ArduinoOTA.begin(); #endif } void callback(char* topic, byte* payload, unsigned int length) { Serial.println(""> MQTT Received""); #pragma region commandlTopic if (String(commandlTopic).equals(topic)) { if (length == 1) { // Off if ((char)payload[0] == '0') { resetGlobalAnimationVariables(); currentMode = 0; // Not required as 0 is set by the reset, left in for clarity setModeDefaults(currentMode); publishState(); publishRecovery(); } // On else if ((char)payload[0] == '1') { // Only turn on if currentMode is 0 if (currentMode == 0) { resetGlobalAnimationVariables(); currentMode = 1; setModeDefaults(currentMode); publishAll(); // State + Colour + Recovery } } // Toggle - Using a re-publish ensures any changes to the On / Off routines are used for the toggle as well else if ((char)payload[0] == '2') { if (currentMode == 0) { client.publish(commandlTopic, ""1""); } else { client.publish(commandlTopic, ""0""); } } // Cycle Modes else if ((char)payload[0] == '9') { int lastMode = currentMode; resetGlobalAnimationVariables(); currentMode = ++lastMode; if (currentMode > numModes) { currentMode = 0; } setModeDefaults(currentMode); publishAll(); } } else if ((char)payload[0] == '{') { // It's a JSON char message_buff[256]; // Max of 256 characters for (int i = 0; i < length; i++) { message_buff[i] = payload[i]; if (i == (length - 1)) { // If we're at the last character message_buff[i + 1] = '\\0'; // Add a string terminator to the next character } } DynamicJsonBuffer jsonBuffer; // Step 1: Reserve memory space (https://bblanchon.github.io/ArduinoJson/) JsonObject& root = jsonBuffer.parseObject(message_buff); // Step 2: Deserialize the JSON string if (!root.success()) { Serial.println(""parseObject() failed""); } else if (root.success()) { if (root.containsKey(""0"")) { resetGlobalAnimationVariables(); // Only do this if the mode changes currentMode = root[""0""]; setModeDefaults(currentMode); // Only do this if the mode changes // We don't publish the recovery message here as other variables might have changed without the mode changing and so we wait until later publishState(); publishColour(); } if (currentMode > numModes) { // If mode is greater than is possible, set to 0 currentMode = 0; } if (root.containsKey(""1"")) { rgbValueOne[0] = root[""1""][0]; rgbValueOne[1] = root[""1""][1]; rgbValueOne[2] = root[""1""][2]; flipFlop = 0; // When displaying a static colour this is set to 1 once the LED strip has been updated, resetting this to 0 is needed to trigger the strip update again now the colour has changed. } if (root.containsKey(""2"")) { rgbValueTwo[0] = root[""2""][0]; rgbValueTwo[1] = root[""2""][1]; rgbValueTwo[2] = root[""2""][2]; flipFlop = 0; // When displaying a static colour this is set to 1 once the LED strip has been updated, resetting this to 0 is needed to trigger the strip update again now the colour has changed. publishColour(); } if (root.containsKey(""3"")) { colourDelay = root[""3""]; } if (root.containsKey(""4"")) { colourJump = root[""4""]; } if (root.containsKey(""5"")) { pixelDelay = root[""5""]; } if (root.containsKey(""6"")) { pixelJump = root[""6""]; } if (root.containsKey(""7"")) { randomise = root[""7""]; } if (root.containsKey(""8"")) { loopDelay = root[""8""]; } if (root.containsKey(""9"")) { highPixelDelay = root[""9""]; } if (root.containsKey(""10"")) { multiplier = root[""10""]; } if (root.containsKey(""11"")) { chance = root[""11""]; } if (root.containsKey(""12"")) { trailLength = root[""12""]; } } publishRecovery(); } } #pragma endregion #pragma region rgbCommandTopic else if (String(rgbCommandTopic).equals(topic)) { String payloadString; for (uint8_t i = 0; i < length; i++) { payloadString.concat((char)payload[i]); } uint8_t firstIndex = payloadString.indexOf(','); uint8_t lastIndex = payloadString.lastIndexOf(','); uint8_t rgb_red = payloadString.substring(0, firstIndex).toInt(); if (rgb_red < 0 || rgb_red > 255) { return; } else { rgbValueTwo[0] = rgb_red; } uint8_t rgb_green = payloadString.substring(firstIndex + 1, lastIndex).toInt(); if (rgb_green < 0 || rgb_green > 255) { return; } else { rgbValueTwo[1] = rgb_green; } uint8_t rgb_blue = payloadString.substring(lastIndex + 1).toInt(); if (rgb_blue < 0 || rgb_blue > 255) { return; } else { rgbValueTwo[2] = rgb_blue; } flipFlop = 0; // When displaying a static colour this is set to 1 once the LED strip has been updated, resetting this to 0 is needed to trigger the strip update again now the colour has changed. // No need to publish the state, it can't have changed. publishColour(); publishRecovery(); } #pragma endregion #pragma region sunPositionTopic else if (String(sunPositionTopic).equals(topic)) { if ((char)payload[0] == '0') { sunPosition = 0; } else if ((char)payload[0] == '1') { sunPosition = 1; } } #pragma endregion #pragma region recoveryTopic else if (String(recoveryTopic).equals(topic) && recovered == false) { char message_buff[256]; for (int i = 0; i < length; i++) { message_buff[i] = payload[i]; if (i == (length - 1)) { // If we're at the last character message_buff[i + 1] = '\\0'; // Add a string terminator to the next character } } StaticJsonBuffer<300> jsonBuffer; // Reserve memory space (https://bblanchon.github.io/ArduinoJson/) JsonObject& root = jsonBuffer.parseObject(message_buff); // Step 2: Deserialize the JSON string if (!root.success()) { Serial.println(""parseObject() failed""); } else if (root.success()) { if (root.containsKey(""0"")) { currentMode = root[""0""]; setModeDefaults(currentMode); // Only do this if the mode changes } if (currentMode > numModes) { // If mode is greater than is possible, set to 0 currentMode = 0; } if (root.containsKey(""1"")) { rgbValueOne[0] = root[""1""][0]; rgbValueOne[1] = root[""1""][1]; rgbValueOne[2] = root[""1""][2]; } if (root.containsKey(""2"")) { rgbValueTwo[0] = root[""2""][0]; rgbValueTwo[1] = root[""2""][1]; rgbValueTwo[2] = root[""2""][2]; publishColour(); } if (root.containsKey(""3"")) { colourDelay = root[""3""]; } if (root.containsKey(""4"")) { colourJump = root[""4""]; } if (root.containsKey(""5"")) { pixelDelay = root[""5""]; } if (root.containsKey(""6"")) { pixelJump = root[""6""]; } if (root.containsKey(""7"")) { randomise = root[""7""]; } if (root.containsKey(""8"")) { loopDelay = root[""8""]; } if (root.containsKey(""9"")) { highPixelDelay = root[""9""]; } if (root.containsKey(""10"")) { multiplier = root[""10""]; } if (root.containsKey(""11"")) { chance = root[""11""]; } if (root.containsKey(""12"")) { trailLength = root[""12""]; } // No need to publish recovery message as it would match the current settings anyway publishState(); publishColour(); flipFlop = 0; // When displaying a static colour this is set to 1 once the LED strip has been updated, resetting this to 0 is needed to trigger the strip update again. } recovered = true; } #pragma endregion } void loop() { if (!client.connected()) { reconnect(); } else { client.loop(); } if (currentMode == 0) { if (stairs == true) { // Special Off Mode for Stairs stairsOff(); } else { allRgbValueOne(); // Normal } } else if (currentMode == 1) { fadeToColour(true); } else if (currentMode == 2) { fadeToColour(true); } else if (currentMode == 3) { strobe(); } else if (currentMode == 4) { fire(55,120,colourDelay); } else if (currentMode == 5) { colourPhase(); } else if (currentMode == 6) { sparkle(); } else if (currentMode == 7) { shoot(); } else if (currentMode == 8) { rain(); } else if (currentMode == 9) { stairsOn(); } else if (currentMode == 10) { stairShutdown(); } else if (currentMode == 11) { stairStartup(); } if ((millis() - availabilityPublishInterval) >= availabilityPublishTimer) { publishAvailability(); availabilityPublishTimer = millis(); } #ifdef UseOTA ArduinoOTA.handle(); #endif yield(); } ",12180,False,2341.5449232062933,median "; =============================================================================================================================== ; Name ..........: GUI Wrapper for Autocharts ; Version .......: v3.1 ; Author ........: oNevion ; =============================================================================================================================== ;!Highly recommended for improved overall performance and responsiveness of the GUI effects etc.! (after compiling): #AutoIt3Wrapper_Run_Au3Stripper=y #Au3Stripper_Parameters=/so /rm /pe ;YOU NEED TO EXCLUDE FOLLOWING FUNCTIONS FROM AU3STRIPPER, OTHERWISE IT WON'T WORK: #Au3Stripper_Ignore_Funcs=_iHoverOn,_iHoverOff,_iFullscreenToggleBtn,_cHvr_CSCP_X64,_cHvr_CSCP_X86,_iControlDelete ;Please not that Au3Stripper will show errors. You can ignore them as long as you use the above Au3Stripper_Ignore_Funcs parameters. ;Required if you want High DPI scaling enabled. (Also requries _Metro_EnableHighDPIScaling()) #AutoIt3Wrapper_Res_HiDpi=y ; =============================================================================================================================== #NoTrayIcon #include ""GUI\\MetroGUI_UDF.au3"" #include ""GUI\\_GUIDisable.au3"" ; For Dim effects when msgbox is displayed #include ;=======================================================================Creating the GUI=============================================================================== ;Enable high DPI support: Detects the users DPI settings and resizes GUI and all controls to look perfectly sharp. _Metro_EnableHighDPIScaling() ; Note: Requries ""#AutoIt3Wrapper_Res_HiDpi=y"" for compiling. To see visible changes without compiling, you have to disable dpi scaling in compatibility settings of Autoit3.exe SplashImageOn("""", @ScriptDir & ""\\assets\\GUI_Menus\\splash.jpg"", ""443"", ""294"", ""-1"", ""-1"", 1) Sleep(2000) SplashOff() CheckForSettingsMigrate() OpenMainGUI() Func OpenMainGUI() Global $DropboxDir = IniRead($ini, 'Settings', 'DropboxDir', '') _LogaInfo(""Set dropbox directory to | "" & $DropboxDir) ; Write to the logfile Global $INPT_Name = IniRead($ini, 'Settings', 'UserName', '') _LogaInfo(""Set UserName to | "" & $INPT_Name) ; Write to the logfile Global $Select_Quarter = IniRead($ini, 'Settings', 'CurrentQuarter', '') _LogaInfo(""Set current quarter to | "" & $Select_Quarter) ; Write to the logfile Global $INPT_CurYear = IniRead($ini, 'Settings', 'CurrentYear', '') _LogaInfo(""Set current year to | "" & $INPT_CurYear) ; Write to the logfile Global $bDBVerified = IniRead($ini, 'Settings', 'DBVerified', '') _LogaInfo(""Dropbox directory verified? | "" & $bDBVerified) ; Write to the logfile Global $Select_Theme = IniRead($ini, 'Settings', 'UITheme', '') _LogaInfo(""Set theme to | "" & $Select_Theme) ; Write to the logfile ;Set Theme _SetTheme($Select_Theme) ;See MetroThemes.au3 for selectable themes or to add more ;Create resizable Metro GUI Global $Form1 = _Metro_CreateGUI(""AutoCharts 3.0.0"", 540, 700, -1, -1, True) GUISetIcon(@ScriptDir & ""\\assets\\GUI_Menus\\programicon_hxv_icon.ico"") ;Add/create control buttons to the GUI $Control_Buttons = _Metro_AddControlButtons(True, True, True, True, True) ;CloseBtn = True, MaximizeBtn = True, MinimizeBtn = True, FullscreenBtn = True, MenuBtn = True ;Set variables for the handles of the GUI-Control buttons. (Above function always returns an array this size and in this order, no matter which buttons are selected.) $GUI_CLOSE_BUTTON = $Control_Buttons[0] $GUI_MAXIMIZE_BUTTON = $Control_Buttons[1] $GUI_RESTORE_BUTTON = $Control_Buttons[2] $GUI_MINIMIZE_BUTTON = $Control_Buttons[3] $GUI_FULLSCREEN_BUTTON = $Control_Buttons[4] $GUI_FSRestore_BUTTON = $Control_Buttons[5] $GUI_MENU_BUTTON = $Control_Buttons[6] ;====================================================================================================================================================================== $Pic1 = GUICtrlCreatePic(@ScriptDir & ""\\assets\\GUI_Menus\\main-img.bmp"", 0, 35, 540, 158, BitOR($GUI_SS_DEFAULT_PIC, $SS_CENTERIMAGE)) $HSeperator1 = _Metro_AddHSeperator(50, 240, 440, 1) Local $Label_Main = GUICtrlCreateLabel(""Please Select a Fund Family"", 50, 275, 440, 50) GUICtrlSetColor(-1, $FontThemeColor) GUICtrlSetFont(-1, 20, 400, 0, ""Segoe UI"") ;Create Buttons $TAB_Catalyst = _Metro_CreateButton(""Catalyst Funds"", 50, 350, 140, 40) $TAB_Rational = _Metro_CreateButton(""Rational Funds"", 200, 350, 140, 40) $TAB_StrategyShares = _Metro_CreateButton(""Strategy Shares"", 350, 350, 140, 40) $HSeperator2 = _Metro_AddHSeperator(50, 570, 440, 1) Local $BTN_Settings = _Metro_CreateButton(""Settings"", 50, 600, 100, 40, 0xE9E9E9, $ButtonBKColor, ""Segoe UI"", 10, 1, $ButtonBKColor) Local $BTN_About = _Metro_CreateButton(""About"", 170, 600, 100, 40, 0xE9E9E9, $ButtonBKColor, ""Segoe UI"", 10, 1, $ButtonBKColor) Local $Label_Version = GUICtrlCreateLabel(""v3.2.1"", 450, 620, 50, 50, $SS_RIGHT) GUICtrlSetColor(-1, $FontThemeColor) GUICtrlSetFont(-1, 15, 400, 0, ""Segoe UI"") ;Set resizing options for the controls so they don't change in size or position. This can be customized to match your gui perfectly for resizing. See AutoIt Help file. GUICtrlSetResizing($Pic1, 768 + 8) GUICtrlSetResizing($HSeperator1, 768 + 8) GUICtrlSetResizing($TAB_Catalyst, 768 + 8) GUICtrlSetResizing($TAB_Rational, 768 + 8) GUICtrlSetResizing($TAB_StrategyShares, 768 + 8) GUICtrlSetResizing($HSeperator2, 768 + 8) GUICtrlSetResizing($BTN_Settings, 768 + 8) GUICtrlSetResizing($BTN_About, 768 + 8) GUICtrlSetResizing($Label_Version, 768 + 8) GUICtrlSetResizing($Label_Main, 768 + 8) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE, $GUI_CLOSE_BUTTON _Metro_GUIDelete($Form1) ;Delete GUI/release resources, make sure you use this when working with multiple GUIs! Exit Case $GUI_MAXIMIZE_BUTTON GUISetState(@SW_MAXIMIZE, $Form1) Case $GUI_MINIMIZE_BUTTON GUISetState(@SW_MINIMIZE, $Form1) Case $GUI_RESTORE_BUTTON GUISetState(@SW_RESTORE, $Form1) Case $GUI_FULLSCREEN_BUTTON, $GUI_FSRestore_BUTTON ConsoleWrite(""Fullscreen toggled"" & @CRLF) ;Fullscreen toggle is processed automatically when $ControlBtnsAutoMode is set to true, otherwise you need to use here _Metro_FullscreenToggle($Form1) Case $GUI_MENU_BUTTON ;Create an Array containing menu button names Local $MenuButtonsArray[5] = [""Archive Factsheets"", ""Settings"", ""Sync Options"", ""Help"", ""Exit""] ; Open the metro Menu. See decleration of $MenuButtonsArray above. Local $MenuSelect = _Metro_MenuStart($Form1, 150, $MenuButtonsArray) Switch $MenuSelect ;Above function returns the index number of the selected button from the provided buttons array. Case ""0"" CreateFactSheetArchive() Case ""1"" _GUIDisable($Form1, 0, 50) _SettingsGUI() _GUIDisable($Form1) Case ""2"" _GUIDisable($Form1, 0, 50) _SyncGUI() _GUIDisable($Form1) Case ""3"" _GUIDisable($Form1, 0, 50) _HelpGUI() _GUIDisable($Form1) Case ""4"" _Metro_GUIDelete($Form1) Exit EndSwitch Case $TAB_Catalyst _GUIDisable($Form1, 0, 50) _CatalystFundsGUI() _GUIDisable($Form1) Case $TAB_Rational _GUIDisable($Form1, 0, 50) _RationalFundsGUI() _GUIDisable($Form1) Case $TAB_StrategyShares _GUIDisable($Form1, 0, 50) _StrategySharesFundsGUI() _GUIDisable($Form1) Case $BTN_Settings _GUIDisable($Form1, 0, 50) _SettingsGUI() _GUIDisable($Form1) Case $BTN_About ShellExecute(""https://onevion.github.io/AutoCharts/"") EndSwitch WEnd EndFunc ;==>OpenMainGUI Func _CatalystFundsGUI() Local $Form2 = _Metro_CreateGUI(""Catalyst Funds GUI"", 540, 620, -1, -1, False, $Form1) ;Add control buttons Local $Control_Buttons_2 = _Metro_AddControlButtons(True, False, False, False) Local $GUI_CLOSE_BUTTON = $Control_Buttons_2[0] ;Create Fund Toggles Local $ACX = _Metro_CreateToggle(""ACX"", 50, 70, 130, 30) Local $ATR = _Metro_CreateToggle(""ATR"", 50, 120, 130, 30) Local $BUY = _Metro_CreateToggle(""BUY"", 50, 170, 130, 30) Local $CAX = _Metro_CreateToggle(""CAX"", 50, 220, 130, 30) Local $CFR = _Metro_CreateToggle(""CFR"", 50, 270, 130, 30) Local $CLP = _Metro_CreateToggle(""CLP"", 50, 320, 130, 30) Local $CLT = _Metro_CreateToggle(""CLT"", 50, 370, 130, 30) Local $vSeperator1 = _Metro_AddVSeperator(180, 85, 300, 1) Local $CPE = _Metro_CreateToggle(""CPE"", 220, 70, 130, 30) Local $CWX = _Metro_CreateToggle(""CWX"", 220, 120, 130, 30) Local $DCX = _Metro_CreateToggle(""DCX"", 220, 170, 130, 30) Local $EIX = _Metro_CreateToggle(""EIX"", 220, 220, 130, 30) Local $HII = _Metro_CreateToggle(""HII"", 220, 270, 130, 30) Local $IIX = _Metro_CreateToggle(""IIX"", 220, 320, 130, 30) Local $INS = _Metro_CreateToggle(""INS"", 220, 370, 130, 30) Local $vSeperator2 = _Metro_AddVSeperator(350, 85, 300, 1) Local $IOX = _Metro_CreateToggle(""IOX"", 390, 70, 130, 30) Local $MBX = _Metro_CreateToggle(""MBX"", 390, 120, 130, 30) Local $MLX = _Metro_CreateToggle(""MLX"", 390, 170, 130, 30) Local $SHI = _Metro_CreateToggle(""SHI"", 390, 220, 130, 30) Local $TEZ = _Metro_CreateToggle(""TEZ"", 390, 270, 130, 30) Local $TRI = _Metro_CreateToggle(""TRI"", 390, 320, 130, 30) Local $TRX = _Metro_CreateToggle(""TRX"", 390, 370, 130, 30) Global $UpdateLabel = GUICtrlCreateLabel("""", 50, 420, 440, 20) GUICtrlSetColor(-1, $FontThemeColor) GUICtrlSetFont(-1, 11, 400, 0, ""Segoe UI"") Global $CB_FactSheet_Catalyst = _Metro_CreateCheckbox(""Factsheet"", 60, 450, 105, 30) Global $CB_Brochure_Catalyst = _Metro_CreateCheckbox(""Brochure"", 210, 450, 105, 30) Global $CB_Presentation_Catalyst = _Metro_CreateCheckbox(""Presentation"", 350, 450, 115, 30) _Metro_CheckboxCheck($CB_FactSheet_Catalyst, True) Global $BTN_RunCatalyst = _Metro_CreateButton(""Process Updates"", 50, 550, 210, 40) Global $BTN_Catalyst_UpdateExpenseRatio = _Metro_CreateButtonEx(""Update Expense Ratios"", 280, 550, 210, 40, 0xE9E9E9, $ButtonBKColor, ""Segoe UI"", 10, 1, $ButtonBKColor) Local $BTN_Back = _Metro_AddControlButton_Back() Global $ProgressBar = _Metro_CreateProgress(50, 500, 440, 26) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE, $BTN_Back, $GUI_CLOSE_BUTTON _Metro_GUIDelete($Form2) ;Delete GUI/release resources, make sure you use this when working with multiple GUIs! Return 0 Case $ACX If _Metro_ToggleIsChecked($ACX) Then _Metro_ToggleUnCheck($ACX) $aCatalystCheck[0] = 0 ; Sets first slot of the Catalyst Array to 1 if CHECKED ConsoleWrite(""Toggle unchecked!"" & @CRLF) Else _Metro_ToggleCheck($ACX) $aCatalystCheck[0] = ""ACX"" ; Sets first slot of the Catalyst Array to 0 if NOT CHECKED ConsoleWrite($aCatalystCheck[0] & "" Toggle checked!"" & @CRLF) EndIf Case $ATR If _Metro_ToggleIsChecked($ATR) Then _Metro_ToggleUnCheck($ATR) $aCatalystCheck[1] = 0 ; Sets first slot of the Catalyst Array to 1 if CHECKED ConsoleWrite(""Toggle unchecked!"" & @CRLF) Else _Metro_ToggleCheck($ATR) $aCatalystCheck[1] = ""ATR"" ; Sets first slot of the Catalyst Array to 0 if NOT CHECKED ConsoleWrite($aCatalystCheck[1] & "" Toggle checked!"" & @CRLF) EndIf Case $BUY If _Metro_ToggleIsChecked($BUY) Then _Metro_ToggleUnCheck($BUY) $aCatalystCheck[2] = 0 ; Sets first slot of the Catalyst Array to 1 if CHECKED ConsoleWrite(""Toggle unchecked!"" & @CRLF) Else _Metro_ToggleCheck($BUY) $aCatalystCheck[2] = ""BUY"" ; Sets first slot of the Catalyst Array to 0 if NOT CHECKED ConsoleWrite($aCatalystCheck[2] & "" Toggle checked!"" & @CRLF) EndIf Case $CAX If _Metro_ToggleIsChecked($CAX) Then _Metro_ToggleUnCheck($CAX) $aCatalystCheck[3] = 0 ; Sets first slot of the Catalyst Array to 1 if CHECKED ConsoleWrite(""Toggle unchecked!"" & @CRLF) Else _Metro_ToggleCheck($CAX) $aCatalystCheck[3] = ""CAX"" ; Sets first slot of the Catalyst Array to 0 if NOT CHECKED ConsoleWrite($aCatalystCheck[3] & "" Toggle checked!"" & @CRLF) EndIf Case $CFR If _Metro_ToggleIsChecked($CFR) Then _Metro_ToggleUnCheck($CFR) $aCatalystCheck[4] = 0 ; Sets first slot of the Catalyst Array to 1 if CHECKED ConsoleWrite(""Toggle unchecked!"" & @CRLF) Else _Metro_ToggleCheck($CFR) $aCatalystCheck[4] = ""CFR"" ; Sets first slot of the Catalyst Array to 0 if NOT CHECKED ConsoleWrite($aCatalystCheck[4] & "" Toggle checked!"" & @CRLF) EndIf Case $CLP If _Metro_ToggleIsChecked($CLP) Then _Metro_ToggleUnCheck($CLP) $aCatalystCheck[5] = 0 ; Sets first slot of the Catalyst Array to 1 if CHECKED ConsoleWrite(""Toggle unchecked!"" & @CRLF) Else _Metro_ToggleCheck($CLP) $aCatalystCheck[5] = ""CLP"" ; Sets first slot of the Catalyst Array to 0 if NOT CHECKED ConsoleWrite($aCatalystCheck[5] & "" Toggle checked!"" & @CRLF) EndIf Case $CLT If _Metro_ToggleIsChecked($CLT) Then _Metro_ToggleUnCheck($CLT) $aCatalystCheck[6] = 0 ; Sets first slot of the Catalyst Array to 1 if CHECKED ConsoleWrite(""Toggle unchecked!"" & @CRLF) Else _Metro_ToggleCheck($CLT) $aCatalystCheck[6] = ""CLT"" ; Sets first slot of the Catalyst Array to 0 if NOT CHECKED ConsoleWrite($aCatalystCheck[6] & "" Toggle checked!"" & @CRLF) EndIf Case $CPE If _Metro_ToggleIsChecked($CPE) Then _Metro_ToggleUnCheck($CPE) $aCatalystCheck[7] = 0 ; Sets first slot of the Catalyst Array to 1 if CHECKED ConsoleWrite(""Toggle unchecked!"" & @CRLF) Else _Metro_ToggleCheck($CPE) $aCatalystCheck[7] = ""CPE"" ; Sets first slot of the Catalyst Array to 0 if NOT CHECKED ConsoleWrite($aCatalystCheck[7] & "" Toggle checked!"" & @CRLF) EndIf Case $CWX If _Metro_ToggleIsChecked($CWX) Then _Metro_ToggleUnCheck($CWX) $aCatalystCheck[8] = 0 ; Sets first slot of the Catalyst Array to 1 if CHECKED ConsoleWrite(""Toggle unchecked!"" & @CRLF) Else _Metro_ToggleCheck($CWX) $aCatalystCheck[8] = ""CWX"" ; Sets first slot of the Catalyst Array to 0 if NOT CHECKED ConsoleWrite($aCatalystCheck[8] & "" Toggle checked!"" & @CRLF) EndIf Case $DCX If _Metro_ToggleIsChecked($DCX) Then _Metro_ToggleUnCheck($DCX) $aCatalystCheck[9] = 0 ; Sets first slot of the Catalyst Array to 1 if CHECKED ConsoleWrite(""Toggle unchecked!"" & @CRLF) Else _Metro_ToggleCheck($DCX) $aCatalystCheck[9] = ""DCX"" ; Sets first slot of the Catalyst Array to 0 if NOT CHECKED ConsoleWrite($aCatalystCheck[9] & "" Toggle checked!"" & @CRLF) EndIf Case $EIX If _Metro_ToggleIsChecked($EIX) Then _Metro_ToggleUnCheck($EIX) $aCatalystCheck[10] = 0 ; Sets first slot of the Catalyst Array to 1 if CHECKED ConsoleWrite(""Toggle unchecked!"" & @CRLF) Else _Metro_ToggleCheck($EIX) $aCatalystCheck[10] = ""EIX"" ; Sets first slot of the Catalyst Array to 0 if NOT CHECKED ConsoleWrite($aCatalystCheck[10] & "" Toggle checked!"" & @CRLF) EndIf Case $HII If _Metro_ToggleIsChecked($HII) Then _Metro_ToggleUnCheck($HII) $aCatalystCheck[11] = 0 ; Sets first slot of the Catalyst Array to 1 if CHECKED ConsoleWrite(""Toggle unchecked!"" & @CRLF) Else _Metro_ToggleCheck($HII) $aCatalystCheck[11] = ""HII"" ; Sets first slot of the Catalyst Array to 0 if NOT CHECKED ConsoleWrite($aCatalystCheck[11] & "" Toggle checked!"" & @CRLF) EndIf Case $IIX If _Metro_ToggleIsChecked($IIX) Then _Metro_ToggleUnCheck($IIX) $aCatalystCheck[12] = 0 ; Sets first slot of the Catalyst Array to 1 if CHECKED ConsoleWrite(""Toggle unchecked!"" & @CRLF) Else _Metro_ToggleCheck($IIX) $aCatalystCheck[12] = ""IIX"" ; Sets first slot of the Catalyst Array to 0 if NOT CHECKED ConsoleWrite($aCatalystCheck[12] & "" Toggle checked!"" & @CRLF) EndIf Case $INS If _Metro_ToggleIsChecked($INS) Then _Metro_ToggleUnCheck($INS) $aCatalystCheck[13] = 0 ; Sets first slot of the Catalyst Array to 1 if CHECKED ConsoleWrite(""Toggle unchecked!"" & @CRLF) Else _Metro_ToggleCheck($INS) $aCatalystCheck[13] = ""INS"" ; Sets first slot of the Catalyst Array to 0 if NOT CHECKED ConsoleWrite($aCatalystCheck[13] & "" Toggle checked!"" & @CRLF) EndIf Case $IOX If _Metro_ToggleIsChecked($IOX) Then _Metro_ToggleUnCheck($IOX) $aCatalystCheck[14] = 0 ; Sets first slot of the Catalyst Array to 1 if CHECKED ConsoleWrite(""Toggle unchecked!"" & @CRLF) Else _Metro_ToggleCheck($IOX) $aCatalystCheck[14] = ""IOX"" ; Sets first slot of the Catalyst Array to 0 if NOT CHECKED ConsoleWrite($aCatalystCheck[14] & "" Toggle checked!"" & @CRLF) EndIf Case $MBX If _Metro_ToggleIsChecked($MBX) Then _Metro_ToggleUnCheck($MBX) $aCatalystCheck[15] = 0 ; Sets first slot of the Catalyst Array to 1 if CHECKED ConsoleWrite(""Toggle unchecked!"" & @CRLF) Else _Metro_ToggleCheck($MBX) $aCatalystCheck[15] = ""MBX"" ; Sets first slot of the Catalyst Array to 0 if NOT CHECKED ConsoleWrite($aCatalystCheck[15] & "" Toggle checked!"" & @CRLF) EndIf Case $MLX If _Metro_ToggleIsChecked($MLX) Then _Metro_ToggleUnCheck($MLX) $aCatalystCheck[16] = 0 ; Sets first slot of the Catalyst Array to 1 if CHECKED ConsoleWrite(""Toggle unchecked!"" & @CRLF) Else _Metro_ToggleCheck($MLX) $aCatalystCheck[16] = ""MLX"" ; Sets first slot of the Catalyst Array to 0 if NOT CHECKED ConsoleWrite($aCatalystCheck[16] & "" Toggle checked!"" & @CRLF) EndIf Case $SHI If _Metro_ToggleIsChecked($SHI) Then _Metro_ToggleUnCheck($SHI) $aCatalystCheck[17] = 0 ; Sets first slot of the Catalyst Array to 1 if CHECKED ConsoleWrite(""Toggle unchecked!"" & @CRLF) Else _Metro_ToggleCheck($SHI) $aCatalystCheck[17] = ""SHI"" ; Sets first slot of the Catalyst Array to 0 if NOT CHECKED ConsoleWrite($aCatalystCheck[17] & "" Toggle checked!"" & @CRLF) EndIf Case $TEZ If _Metro_ToggleIsChecked($TEZ) Then _Metro_ToggleUnCheck($TEZ) $aCatalystCheck[18] = 0 ; Sets first slot of the Catalyst Array to 1 if CHECKED ConsoleWrite(""Toggle unchecked!"" & @CRLF) Else _Metro_ToggleCheck($TEZ) $aCatalystCheck[18] = ""TEZ"" ; Sets first slot of the Catalyst Array to 0 if NOT CHECKED ConsoleWrite($aCatalystCheck[18] & "" Toggle checked!"" & @CRLF) EndIf Case $TRI If _Metro_ToggleIsChecked($TRI) Then _Metro_ToggleUnCheck($TRI) $aCatalystCheck[19] = 0 ; Sets first slot of the Catalyst Array to 1 if CHECKED ConsoleWrite(""Toggle unchecked!"" & @CRLF) Else _Metro_ToggleCheck($TRI) $aCatalystCheck[19] = ""TRI"" ; Sets first slot of the Catalyst Array to 0 if NOT CHECKED ConsoleWrite($aCatalystCheck[19] & "" Toggle checked!"" & @CRLF) EndIf Case $TRX If _Metro_ToggleIsChecked($TRX) Then _Metro_ToggleUnCheck($TRX) $aCatalystCheck[20] = 0 ; Sets first slot of the Catalyst Array to 1 if CHECKED ConsoleWrite(""Toggle unchecked!"" & @CRLF) Else _Metro_ToggleCheck($TRX) $aCatalystCheck[20] = ""TRX"" ; Sets first slot of the Catalyst Array to 0 if NOT CHECKED ConsoleWrite($aCatalystCheck[20] & "" Toggle checked!"" & @CRLF) EndIf Case $CB_FactSheet_Catalyst If _Metro_CheckboxIsChecked($CB_FactSheet_Catalyst) Then _Metro_CheckboxUnCheck($CB_FactSheet_Catalyst) ConsoleWrite(""Checkbox unchecked!"" & @CRLF) Else _Metro_CheckboxCheck($CB_FactSheet_Catalyst) ConsoleWrite(""Checkbox checked!"" & @CRLF) EndIf Case $CB_Brochure_Catalyst If _Metro_CheckboxIsChecked($CB_Brochure_Catalyst) Then _Metro_CheckboxUnCheck($CB_Brochure_Catalyst) ConsoleWrite(""Checkbox unchecked!"" & @CRLF) Else _Metro_CheckboxCheck($CB_Brochure_Catalyst) ConsoleWrite(""Checkbox checked!"" & @CRLF) EndIf Case $CB_Presentation_Catalyst If _Metro_CheckboxIsChecked($CB_Presentation_Catalyst) Then _Metro_CheckboxUnCheck($CB_Presentation_Catalyst) ConsoleWrite(""Checkbox unchecked!"" & @CRLF) Else _Metro_CheckboxCheck($CB_Presentation_Catalyst) ConsoleWrite(""Checkbox checked!"" & @CRLF) EndIf Case $BTN_RunCatalyst VerifyDropbox() If $bDBVerified = True Then $FundFamily = ""Catalyst"" $FamilySwitch = $aCatalystCheck ImportDatalinker() RunCSVConvert() CreateCharts() _LogaInfo(""############################### END OF RUN - CATALYST ###############################"") _GUIDisable($Form2, 0, 30) _Metro_MsgBox(0, ""Finished"", ""The process has finished."", 500, 11, $Form2) _GUIDisable($Form2) _Metro_GUIDelete($Form2) ;Delete GUI/release resources, make sure you use this when working with multiple GUIs! Return 0 Global $aCatalystCheck[24] Else If @error = 50 Then _GUIDisable($Form2, 0, 30) _Metro_MsgBox(0, ""Error"", ""Error Code: "" & @error & "" | Dropbox path not verified. Process has been aborted."", 500, 11, $Form2) _GUIDisable($Form2) EndIf EndIf Case $BTN_Catalyst_UpdateExpenseRatio $FundFamily = ""Catalyst"" $FamilySwitch = $aCatalystCheck GUICtrlSetData($ProgressBar, 10) ImportDatalinker() PullCatalystData() RunExpenseRatios() _LogaInfo(""############################### END OF RUN - CATALYST ###############################"") ; Write to the logfile GUICtrlSetData($ProgressBar, 0) _GUIDisable($Form2, 0, 30) _Metro_MsgBox(0, ""Finished"", ""The process has finished."", 500, 11, $Form2) _GUIDisable($Form2) Global $aCatalystCheck[24] If @error = 50 Then _GUIDisable($Form2, 0, 30) _Metro_MsgBox(0, ""Error"", ""Error Code: "" & @error & "" | Dropbox path not verified. Process has been aborted."", 500, 11, $Form2) _GUIDisable($Form2) EndIf EndSwitch WEnd EndFunc ;==>_CatalystFundsGUI Func _RationalFundsGUI() Local $Form3 = _Metro_CreateGUI(""Rational Funds GUI"", 540, 620, -1, -1, False, $Form1) ;Add control buttons Local $Control_Buttons_2 = _Metro_AddControlButtons(True, False, False, False) Local $GUI_CLOSE_BUTTON = $Control_Buttons_2[0] ;Create Fund Toggles Local $HBA = _Metro_CreateToggle(""HBA"", 50, 70, 130, 30) Local $HDC = _Metro_CreateToggle(""HDC"", 50, 120, 130, 30) Local $HRS = _Metro_CreateToggle(""HRS"", 50, 170, 130, 30) Local $HSU = _Metro_CreateToggle(""HSU"", 50, 220, 130, 30) Local $IGO = _Metro_CreateToggle(""IGO"", 50, 270, 130, 30) Local $PBX = _Metro_CreateToggle(""PBX"", 50, 320, 130, 30) Local $RDM = _Metro_CreateToggle(""RDM"", 50, 370, 130, 30) Local $RFX = _Metro_CreateToggle(""RFX"", 220, 70, 130, 30) Local $vSeperator1 = _Metro_AddVSeperator(180, 85, 300, 1) Global $UpdateLabel = GUICtrlCreateLabel("""", 50, 420, 440, 20) GUICtrlSetColor(-1, $FontThemeColor) GUICtrlSetFont(-1, 11, 400, 0, ""Segoe UI"") Global $CB_FactSheet_Rational = _Metro_CreateCheckbox(""Factsheet"", 60, 450, 105, 30) Global $CB_Brochure_Rational = _Metro_CreateCheckbox(""Brochure"", 210, 450, 105, 30) Global $CB_Presentation_Rational = _Metro_CreateCheckbox(""Presentation"", 350, 450, 115, 30) _Metro_CheckboxCheck($CB_FactSheet_Rational, True) Local $BTN_RunRational = _Metro_CreateButton(""Process Updates"", 50, 550, 210, 40) Local $BTN_Rational_UpdateExpenseRatio = _Metro_CreateButton(""Update Expense Ratios"", 280, 550, 210, 40, 0xE9E9E9, $ButtonBKColor, ""Segoe UI"", 10, 1, $ButtonBKColor) Local $BTN_Back = _Metro_AddControlButton_Back() Global $ProgressBar = _Metro_CreateProgress(50, 500, 440, 26) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE, $BTN_Back, $GUI_CLOSE_BUTTON _Metro_GUIDelete($Form3) ;Delete GUI/release resources, make sure you use this when working with multiple GUIs! Return 0 Case $HBA If _Metro_ToggleIsChecked($HBA) Then _Metro_ToggleUnCheck($HBA) $aRationalCheck[0] = 0 ; Sets first slot of the Catalyst Array to 1 if CHECKED ConsoleWrite(""Toggle unchecked!"" & @CRLF) Else _Metro_ToggleCheck($HBA) $aRationalCheck[0] = ""HBA"" ; Sets first slot of the Catalyst Array to 0 if NOT CHECKED ConsoleWrite($aRationalCheck[0] & "" Toggle checked!"" & @CRLF) EndIf Case $HDC If _Metro_ToggleIsChecked($HDC) Then _Metro_ToggleUnCheck($HDC) $aRationalCheck[1] = 0 ; Sets first slot of the Catalyst Array to 1 if CHECKED ConsoleWrite(""Toggle unchecked!"" & @CRLF) Else _Metro_ToggleCheck($HDC) $aRationalCheck[1] = ""HDC"" ; Sets first slot of the Catalyst Array to 0 if NOT CHECKED ConsoleWrite($aRationalCheck[1] & "" Toggle checked!"" & @CRLF) EndIf Case $HRS If _Metro_ToggleIsChecked($HRS) Then _Metro_ToggleUnCheck($HRS) $aRationalCheck[2] = 0 ; Sets first slot of the Catalyst Array to 1 if CHECKED ConsoleWrite(""Toggle unchecked!"" & @CRLF) Else _Metro_ToggleCheck($HRS) $aRationalCheck[2] = ""HRS"" ; Sets first slot of the Catalyst Array to 0 if NOT CHECKED ConsoleWrite($aRationalCheck[2] & "" Toggle checked!"" & @CRLF) EndIf Case $HSU If _Metro_ToggleIsChecked($HSU) Then _Metro_ToggleUnCheck($HSU) $aRationalCheck[3] = 0 ; Sets first slot of the Catalyst Array to 1 if CHECKED ConsoleWrite(""Toggle unchecked!"" & @CRLF) Else _Metro_ToggleCheck($HSU) $aRationalCheck[3] = ""HSU"" ; Sets first slot of the Catalyst Array to 0 if NOT CHECKED ConsoleWrite($aRationalCheck[3] & "" Toggle checked!"" & @CRLF) EndIf Case $IGO If _Metro_ToggleIsChecked($IGO) Then _Metro_ToggleUnCheck($IGO) $aRationalCheck[4] = 0 ; Sets first slot of the Catalyst Array to 1 if CHECKED ConsoleWrite(""Toggle unchecked!"" & @CRLF) Else _Metro_ToggleCheck($IGO) $aRationalCheck[4] = ""IGO"" ; Sets first slot of the Catalyst Array to 0 if NOT CHECKED ConsoleWrite($aRationalCheck[4] & "" Toggle checked!"" & @CRLF) EndIf Case $PBX If _Metro_ToggleIsChecked($PBX) Then _Metro_ToggleUnCheck($PBX) $aRationalCheck[5] = 0 ; Sets first slot of the Catalyst Array to 1 if CHECKED ConsoleWrite(""Toggle unchecked!"" & @CRLF) Else _Metro_ToggleCheck($PBX) $aRationalCheck[5] = ""PBX"" ; Sets first slot of the Catalyst Array to 0 if NOT CHECKED ConsoleWrite($aRationalCheck[5] & "" Toggle checked!"" & @CRLF) EndIf Case $RDM If _Metro_ToggleIsChecked($RDM) Then _Metro_ToggleUnCheck($RDM) $aRationalCheck[6] = 0 ; Sets first slot of the Catalyst Array to 1 if CHECKED ConsoleWrite(""Toggle unchecked!"" & @CRLF) Else _Metro_ToggleCheck($RDM) $aRationalCheck[6] = ""RDM"" ; Sets first slot of the Catalyst Array to 0 if NOT CHECKED ConsoleWrite($aRationalCheck[6] & "" Toggle checked!"" & @CRLF) EndIf Case $RFX If _Metro_ToggleIsChecked($RFX) Then _Metro_ToggleUnCheck($RFX) $aRationalCheck[7] = 0 ; Sets first slot of the Catalyst Array to 1 if CHECKED ConsoleWrite(""Toggle unchecked!"" & @CRLF) Else _Metro_ToggleCheck($RFX) $aRationalCheck[7] = ""RFX"" ; Sets first slot of the Catalyst Array to 0 if NOT CHECKED ConsoleWrite($aRationalCheck[7] & "" Toggle checked!"" & @CRLF) EndIf Case $CB_FactSheet_Rational If _Metro_CheckboxIsChecked($CB_FactSheet_Rational) Then _Metro_CheckboxUnCheck($CB_FactSheet_Rational) ConsoleWrite(""Checkbox unchecked!"" & @CRLF) Else _Metro_CheckboxCheck($CB_FactSheet_Rational) ConsoleWrite(""Checkbox checked!"" & @CRLF) EndIf Case $CB_Brochure_Rational If _Metro_CheckboxIsChecked($CB_Brochure_Rational) Then _Metro_CheckboxUnCheck($CB_Brochure_Rational) ConsoleWrite(""Checkbox unchecked!"" & @CRLF) Else _Metro_CheckboxCheck($CB_Brochure_Rational) ConsoleWrite(""Checkbox checked!"" & @CRLF) EndIf Case $CB_Presentation_Rational If _Metro_CheckboxIsChecked($CB_Presentation_Rational) Then _Metro_CheckboxUnCheck($CB_Presentation_Rational) ConsoleWrite(""Checkbox unchecked!"" & @CRLF) Else _Metro_CheckboxCheck($CB_Presentation_Rational) ConsoleWrite(""Checkbox checked!"" & @CRLF) EndIf Case $BTN_RunRational $FundFamily = ""Rational"" $FamilySwitch = $aRationalCheck GUICtrlSetData($ProgressBar, 10) ImportDatalinker() RunCSVConvert() CreateCharts() _LogaInfo(""############################### END OF RUN - RATIONAL ###############################"") ; Write to the logfile GUICtrlSetData($ProgressBar, 0) _GUIDisable($Form3, 0, 30) _Metro_MsgBox(0, ""Finished"", ""The process has finished."", 500, 11, $Form3) _GUIDisable($Form3) _Metro_GUIDelete($Form3) ;Delete GUI/release resources, make sure you use this when working with multiple GUIs! Return 0 Global $aRationalCheck[8] Case $BTN_Rational_UpdateExpenseRatio $FundFamily = ""Rational"" $FamilySwitch = $aRationalCheck GUICtrlSetData($ProgressBar, 10) ImportDatalinker() PullRationalData() RunExpenseRatios() _LogaInfo(""############################### END OF RUN - RATIONAL ###############################"") ; Write to the logfile GUICtrlSetData($ProgressBar, 0) _GUIDisable($Form3, 0, 30) _Metro_MsgBox(0, ""Finished"", ""The process has finished."", 500, 11, $Form3) _GUIDisable($Form3) Global $aRationalCheck[8] If @error = 50 Then _GUIDisable($Form3, 0, 30) _Metro_MsgBox(0, ""Error"", ""Error Code: "" & @error & "" | Dropbox path not verified. Process has been aborted."", 500, 11, $Form3) _GUIDisable($Form3) EndIf EndSwitch WEnd EndFunc ;==>_RationalFundsGUI Func _StrategySharesFundsGUI() Local $Form4 = _Metro_CreateGUI(""Strategy Shares Funds GUI"", 540, 620, -1, -1, False, $Form1) ;Add control buttons Local $Control_Buttons_2 = _Metro_AddControlButtons(True, False, False, False) Local $GUI_CLOSE_BUTTON = $Control_Buttons_2[0] ;Create Fund Toggles Local $GLDB = _Metro_CreateToggle(""GLDB"", 50, 70, 130, 30) Local $HNDL = _Metro_CreateToggle(""HNDL"", 50, 120, 130, 30) Local $ROMO = _Metro_CreateToggle(""ROMO"", 50, 170, 130, 30) Local $vSeperator1 = _Metro_AddVSeperator(180, 85, 300, 1) Global $UpdateLabel = GUICtrlCreateLabel("""", 50, 420, 440, 20) GUICtrlSetColor(-1, $FontThemeColor) GUICtrlSetFont(-1, 11, 400, 0, ""Segoe UI"") Global $CB_FactSheet_SS = _Metro_CreateCheckbox(""Factsheet"", 60, 450, 105, 30) Global $CB_Brochure_SS = _Metro_CreateCheckbox(""Brochure"", 210, 450, 105, 30) Global $CB_Presentation_SS = _Metro_CreateCheckbox(""Presentation"", 350, 450, 115, 30) _Metro_CheckboxCheck($CB_FactSheet_SS, True) Local $BTN_RunStrategyShares = _Metro_CreateButton(""Process Updates"", 50, 550, 210, 40) Local $BTN_Back = _Metro_AddControlButton_Back() Global $ProgressBar = _Metro_CreateProgress(50, 500, 440, 26) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE, $BTN_Back, $GUI_CLOSE_BUTTON _Metro_GUIDelete($Form4) ;Delete GUI/release resources, make sure you use this when working with multiple GUIs! Return 0 Case $GLDB If _Metro_ToggleIsChecked($GLDB) Then _Metro_ToggleUnCheck($GLDB) $aStrategyCheck[0] = 0 ; Sets first slot of the Catalyst Array to 1 if CHECKED ConsoleWrite(""Toggle unchecked!"" & @CRLF) Else _Metro_ToggleCheck($GLDB) $aStrategyCheck[0] = ""GLDB"" ; Sets first slot of the Catalyst Array to 0 if NOT CHECKED ConsoleWrite($aStrategyCheck[0] & "" Toggle checked!"" & @CRLF) EndIf Case $HNDL If _Metro_ToggleIsChecked($HNDL) Then _Metro_ToggleUnCheck($HNDL) $aStrategyCheck[1] = 0 ; Sets first slot of the Catalyst Array to 1 if CHECKED ConsoleWrite(""Toggle unchecked!"" & @CRLF) Else _Metro_ToggleCheck($HNDL) $aStrategyCheck[1] = ""HNDL"" ; Sets first slot of the Catalyst Array to 0 if NOT CHECKED ConsoleWrite($aStrategyCheck[1] & "" Toggle checked!"" & @CRLF) EndIf Case $ROMO If _Metro_ToggleIsChecked($ROMO) Then _Metro_ToggleUnCheck($ROMO) $aStrategyCheck[2] = 0 ; Sets first slot of the Catalyst Array to 1 if CHECKED ConsoleWrite(""Toggle unchecked!"" & @CRLF) Else _Metro_ToggleCheck($ROMO) $aStrategyCheck[2] = ""ROMO"" ; Sets first slot of the Catalyst Array to 0 if NOT CHECKED ConsoleWrite($aStrategyCheck[2] & "" Toggle checked!"" & @CRLF) EndIf Case $CB_FactSheet_SS If _Metro_CheckboxIsChecked($CB_FactSheet_SS) Then _Metro_CheckboxUnCheck($CB_FactSheet_SS) ConsoleWrite(""Checkbox unchecked!"" & @CRLF) Else _Metro_CheckboxCheck($CB_FactSheet_SS) ConsoleWrite(""Checkbox checked!"" & @CRLF) EndIf Case $CB_Brochure_SS If _Metro_CheckboxIsChecked($CB_Brochure_SS) Then _Metro_CheckboxUnCheck($CB_Brochure_SS) ConsoleWrite(""Checkbox unchecked!"" & @CRLF) Else _Metro_CheckboxCheck($CB_Brochure_SS) ConsoleWrite(""Checkbox checked!"" & @CRLF) EndIf Case $CB_Presentation_SS If _Metro_CheckboxIsChecked($CB_Presentation_SS) Then _Metro_CheckboxUnCheck($CB_Presentation_SS) ConsoleWrite(""Checkbox unchecked!"" & @CRLF) Else _Metro_CheckboxCheck($CB_Presentation_SS) ConsoleWrite(""Checkbox checked!"" & @CRLF) EndIf Case $BTN_RunStrategyShares $FundFamily = ""StrategyShares"" $FamilySwitch = $aStrategyCheck GUICtrlSetData($ProgressBar, 10) ImportDatalinker() ;PullStrategySharesData() RunCSVConvert() CreateCharts() _LogaInfo(""############################### END OF RUN - STRATEGY SHARES ###############################"") ; Write to the logfile GUICtrlSetData($ProgressBar, 0) _GUIDisable($Form4, 0, 30) _Metro_MsgBox(0, ""Finished"", ""The process has finished."", 500, 11, $Form4) _GUIDisable($Form4) _Metro_GUIDelete($Form4) ;Delete GUI/release resources, make sure you use this when working with multiple GUIs! Return 0 Global $aStrategyCheck[3] EndSwitch WEnd EndFunc ;==>_StrategySharesFundsGUI Func _SettingsGUI() $DropboxDir = IniRead($ini, 'Settings', 'DropboxDir', '') $INPT_Name = IniRead($ini, 'Settings', 'UserName', '') $Select_Quarter = IniRead($ini, 'Settings', 'CurrentQuarter', '') $INPT_CurYear = IniRead($ini, 'Settings', 'CurrentYear', '') Global $Form5 = _Metro_CreateGUI(""AutoCharts Settings"", 540, 620, -1, -1, False, $Form1) ;Add control buttons Local $Control_Buttons_2 = _Metro_AddControlButtons(True, False, False, False) Local $GUI_CLOSE_BUTTON = $Control_Buttons_2[0] ;Create Settings Options Local $Label_Dropbox = GUICtrlCreateLabel(""Path to Dropbox Folder:"", 50, 50, 440, 20) GUICtrlSetColor(-1, $FontThemeColor) GUICtrlSetFont(-1, 11, 400, 0, ""Segoe UI"") Global $INPT_DropboxFolder = GUICtrlCreateInput($DropboxDir, 50, 75, 440, 30) GUICtrlSetFont(-1, 11, 500, 0, ""Segoe UI"") Local $BTN_SelectDBPath = _Metro_CreateButton(""Browse"", 280, 110, 210, 40) Local $Label_Name = GUICtrlCreateLabel(""Your Name:"", 50, 175, 440, 40) GUICtrlSetColor(-1, $FontThemeColor) GUICtrlSetFont(-1, 11, 400, 0, ""Segoe UI"") Local $INPT_Name_BOX = GUICtrlCreateInput($INPT_Name, 50, 200, 440, 30) GUICtrlSetFont(-1, 11, 500, 0, ""Segoe UI"") Local $Label_CurQuarter = GUICtrlCreateLabel(""Current Quarter:"", 50, 275, 440, 40) GUICtrlSetColor(-1, $FontThemeColor) GUICtrlSetFont(-1, 11, 400, 0, ""Segoe UI"") ;Create 4 Radios that are assigned to Radio Group 1 Local $Radio_Q1 = _Metro_CreateRadioEx(""1"", ""Q1"", 50, 300, 100, 30) If $Select_Quarter = ""Q1"" Then _Metro_RadioCheck(""1"", $Radio_Q1) ;check $Radio1 which is assigned to radio group ""1"" and uncheck any other radio in group ""1"" EndIf Local $Radio_Q2 = _Metro_CreateRadioEx(""1"", ""Q2"", 160, 300, 100, 30) If $Select_Quarter = ""Q2"" Then _Metro_RadioCheck(""1"", $Radio_Q2) ;check $Radio1 which is assigned to radio group ""1"" and uncheck any other radio in group ""1"" EndIf Local $Radio_Q3 = _Metro_CreateRadioEx(""1"", ""Q3"", 270, 300, 100, 30) If $Select_Quarter = ""Q3"" Then _Metro_RadioCheck(""1"", $Radio_Q3) ;check $Radio1 which is assigned to radio group ""1"" and uncheck any other radio in group ""1"" EndIf Local $Radio_Q4 = _Metro_CreateRadioEx(""1"", ""Q4"", 380, 300, 100, 30) If $Select_Quarter = ""Q4"" Then _Metro_RadioCheck(""1"", $Radio_Q4) ;check $Radio1 which is assigned to radio group ""1"" and uncheck any other radio in group ""1"" EndIf Local $Label_CurYear = GUICtrlCreateLabel(""Current Year:"", 50, 375, 440, 40) GUICtrlSetColor(-1, $FontThemeColor) GUICtrlSetFont(-1, 11, 400, 0, ""Segoe UI"") Local $INPT_CurYear_BOX = GUICtrlCreateInput($INPT_CurYear, 50, 400, 440, 30) GUICtrlSetFont(-1, 11, 500, 0, ""Segoe UI"") ;Create 4 Radios that are assigned to Radio Group 1 Local $Radio_DarkBlue = _Metro_CreateRadioEx(""2"", ""Blue"", 50, 480, 100, 30) If $Select_Theme = ""DarkBlue"" Then _Metro_RadioCheck(""2"", $Radio_DarkBlue) ;check $Radio1 which is assigned to radio group ""1"" and uncheck any other radio in group ""1"" EndIf Local $Radio_LightBlue = _Metro_CreateRadioEx(""2"", ""Blue 2"", 160, 480, 100, 30) If $Select_Theme = ""LightBlue"" Then _Metro_RadioCheck(""2"", $Radio_LightBlue) ;check $Radio1 which is assigned to radio group ""1"" and uncheck any other radio in group ""1"" EndIf Local $Radio_DarkPurple = _Metro_CreateRadioEx(""2"", ""Purple"", 270, 480, 100, 30) If $Select_Theme = ""DarkPurple"" Then _Metro_RadioCheck(""2"", $Radio_DarkPurple) ;check $Radio1 which is assigned to radio group ""1"" and uncheck any other radio in group ""1"" EndIf Local $Radio_LightPurple = _Metro_CreateRadioEx(""2"", ""Purple 2"", 380, 480, 100, 30) If $Select_Theme = ""LightPurple"" Then _Metro_RadioCheck(""2"", $Radio_LightPurple) ;check $Radio1 which is assigned to radio group ""1"" and uncheck any other radio in group ""1"" EndIf Local $BTN_Save = _Metro_CreateButton(""Save Settings"", 50, 550, 210, 40) Local $BTN_Cancel = _Metro_CreateButton(""Cancel"", 280, 550, 210, 40, 0xE9E9E9, $ButtonBKColor, ""Segoe UI"", 10, 1, $ButtonBKColor) Local $BTN_Back = _Metro_AddControlButton_Back() GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE, $BTN_Back, $GUI_CLOSE_BUTTON, $BTN_Cancel _Metro_GUIDelete($Form5) ;Delete GUI/release resources, make sure you use this when working with multiple GUIs! Return 0 Case $BTN_SelectDBPath BrowseForDBPath() Case $Radio_Q1 _Metro_RadioCheck(1, $Radio_Q1) ConsoleWrite(""Radio 1 selected!"" & @CRLF) Case $Radio_Q2 _Metro_RadioCheck(1, $Radio_Q2) ConsoleWrite(""Radio 4 selected!"" & @CRLF) Case $Radio_Q3 _Metro_RadioCheck(1, $Radio_Q3) ConsoleWrite(""Radio 3 selected!"" & @CRLF) Case $Radio_Q4 _Metro_RadioCheck(1, $Radio_Q4) ConsoleWrite(""Radio 4 selected!"" & @CRLF) Case $Radio_DarkBlue _Metro_RadioCheck(2, $Radio_DarkBlue) ConsoleWrite(""Dark Blue Theme selected!"" & @CRLF) Case $Radio_LightBlue _Metro_RadioCheck(2, $Radio_LightBlue) ConsoleWrite(""Light Blue Theme selected!"" & @CRLF) Case $Radio_DarkPurple _Metro_RadioCheck(2, $Radio_DarkPurple) ConsoleWrite(""Dark Purple Theme selected!"" & @CRLF) Case $Radio_LightPurple _Metro_RadioCheck(2, $Radio_LightPurple) ConsoleWrite(""Light Purple Theme selected!"" & @CRLF) Case $BTN_Save $DATA_UserSettings = GUICtrlRead($INPT_DropboxFolder) If $DATA_UserSettings = """" Then _GUIDisable($Form5, 0, 30) _Metro_MsgBox(0, ""Error!"", ""You must select a dropbox directory!"", 500, 11, $Form5) _GUIDisable($Form5) Else $iSettingsConfirm = IniWrite(@ScriptDir & '\\settings.ini', 'Settings', 'DropboxDir', $DATA_UserSettings) $DATA_UserSettings = GUICtrlRead($INPT_Name_BOX) $iSettingsConfirm = IniWrite(@ScriptDir & '\\settings.ini', 'Settings', 'UserName', $DATA_UserSettings) If _Metro_RadioIsChecked(1, $Radio_Q1) Then $Select_Quarter = ""Q1"" ; Checks to see if Radio for Q1 is Checked $DATA_UserSettings = ""Q1"" $iSettingsConfirm = IniWrite(@ScriptDir & '\\settings.ini', 'Settings', 'CurrentQuarter', $DATA_UserSettings) EndIf If _Metro_RadioIsChecked(1, $Radio_Q2) Then $Select_Quarter = ""Q2"" ; Checks to see if Radio for Q2 is Checked $DATA_UserSettings = ""Q2"" $iSettingsConfirm = IniWrite(@ScriptDir & '\\settings.ini', 'Settings', 'CurrentQuarter', $DATA_UserSettings) EndIf If _Metro_RadioIsChecked(1, $Radio_Q3) Then $Select_Quarter = ""Q3"" ; Checks to see if Radio for Q3 is Checked $DATA_UserSettings = ""Q3"" $iSettingsConfirm = IniWrite(@ScriptDir & '\\settings.ini', 'Settings', 'CurrentQuarter', $DATA_UserSettings) EndIf If _Metro_RadioIsChecked(1, $Radio_Q4) Then $Select_Quarter = ""Q4"" ; Checks to see if Radio for Q4 is Checked $DATA_UserSettings = ""Q4"" $iSettingsConfirm = IniWrite(@ScriptDir & '\\settings.ini', 'Settings', 'CurrentQuarter', $DATA_UserSettings) EndIf If _Metro_RadioIsChecked(2, $Radio_DarkBlue) Then $Select_Theme = ""DarkBlue"" ; Checks to see if Radio for Dark Blue Theme is Checked _SetTheme(""DarkBlue"") ;See MetroThemes.au3 for selectable themes or to add more $DATA_UserSettings = ""DarkBlue"" $iSettingsConfirm = IniWrite(@ScriptDir & '\\settings.ini', 'Settings', 'UITheme', $DATA_UserSettings) EndIf If _Metro_RadioIsChecked(2, $Radio_LightBlue) Then $Select_Theme = ""LightBlue"" ; Checks to see if Radio for Dark Blue Theme is Checked _SetTheme(""LightBlue"") ;See MetroThemes.au3 for selectable themes or to add more $DATA_UserSettings = ""LightBlue"" $iSettingsConfirm = IniWrite(@ScriptDir & '\\settings.ini', 'Settings', 'UITheme', $DATA_UserSettings) EndIf If _Metro_RadioIsChecked(2, $Radio_DarkPurple) Then $Select_Theme = ""DarkPurple"" ; Checks to see if Radio for Dark Blue Theme is Checked _SetTheme(""DarkPurple"") ;See MetroThemes.au3 for selectable themes or to add more $DATA_UserSettings = ""DarkPurple"" $iSettingsConfirm = IniWrite(@ScriptDir & '\\settings.ini', 'Settings', 'UITheme', $DATA_UserSettings) EndIf If _Metro_RadioIsChecked(2, $Radio_LightPurple) Then $Select_Theme = ""LightPurple"" ; Checks to see if Radio for Dark Blue Theme is Checked _SetTheme(""LightPurple"") ;See MetroThemes.au3 for selectable themes or to add more $DATA_UserSettings = ""LightPurple"" $iSettingsConfirm = IniWrite(@ScriptDir & '\\settings.ini', 'Settings', 'UITheme', $DATA_UserSettings) EndIf $DATA_UserSettings = GUICtrlRead($INPT_CurYear_BOX) $iSettingsConfirm = IniWrite(@ScriptDir & '\\settings.ini', 'Settings', 'CurrentYear', $DATA_UserSettings) If $iSettingsConfirm = 1 Then $DropboxDir = IniRead($ini, 'Settings', 'DropboxDir', '') $INPT_Name = IniRead($ini, 'Settings', 'UserName', '') $Select_Quarter = IniRead($ini, 'Settings', 'CurrentQuarter', '') $INPT_CurYear = IniRead($ini, 'Settings', 'CurrentYear', '') $bDBVerified = IniRead($ini, 'Settings', 'DBVerified', '') $Select_Theme = IniRead($ini, 'Settings', 'UITheme', '') DetermineDates() _GUIDisable($Form5, 0, 30) _Metro_MsgBox(0, ""Success!"", ""Your settings were saved."", 500, 11, $Form5) _GUIDisable($Form5) Else _GUIDisable($Form5, 0, 30) _Metro_MsgBox(0, ""Error!"", ""An error occured"", 500, 11, $Form5) _GUIDisable($Form5) EndIf VerifyDropbox() If @error = 50 Then _GUIDisable($Form5, 0, 30) _Metro_MsgBox(0, ""Error!"", ""Error Code: "" & @error & "" | Dropbox path not verified. Please try resetting it."", 500, 11, $Form5) _GUIDisable($Form5) EndIf _Metro_GUIDelete($Form5) ;Delete GUI/release resources, make sure you use this when working with multiple GUIs! _Metro_GUIDelete($Form1) ;Delete GUI/release resources, make sure you use this when working with multiple GUIs! OpenMainGUI() EndIf EndSwitch WEnd EndFunc ;==>_SettingsGUI Func _HelpGUI() Global $Form6 = _Metro_CreateGUI(""AutoCharts Help"", 540, 500, -1, -1, False, $Form1) ;Add control buttons Local $Control_Buttons_2 = _Metro_AddControlButtons(True, False, False, False) Local $GUI_CLOSE_BUTTON = $Control_Buttons_2[0] ;Create Settings Options Local $BTN_About = _Metro_CreateButton(""About AutoCharts"", 50, 100, 440, 40) Local $BTN_OpenLog = _Metro_CreateButton(""Open Log File"", 50, 160, 440, 40) Local $BTN_ClearLog = _Metro_CreateButton(""Clear Log File"", 50, 220, 440, 40) Local $BTN_CheckForUpdate = _Metro_CreateButton(""Check for Update"", 50, 280, 440, 40) Local $BTN_Back = _Metro_AddControlButton_Back() GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE, $BTN_Back, $GUI_CLOSE_BUTTON _Metro_GUIDelete($Form6) ;Delete GUI/release resources, make sure you use this when working with multiple GUIs! Return 0 Case $BTN_About ShellExecute(""https://onevion.github.io/AutoCharts/"") Case $BTN_OpenLog $sTextFile = @ScriptDir & ""\\AutoCharts.log"" $_Run = ""notepad.exe "" & $sTextFile ConsoleWrite(""$_Run : "" & $_Run & @CRLF) Run($_Run, @WindowsDir, @SW_SHOWDEFAULT) Case $BTN_ClearLog ClearLog() Case $BTN_CheckForUpdate CheckForUpdate() EndSwitch WEnd EndFunc ;==>_HelpGUI Func _SyncGUI() Global $Form7 = _Metro_CreateGUI(""AutoCharts Sync Options"", 540, 500, -1, -1, False, $Form1) ;Add control buttons Local $Control_Buttons_2 = _Metro_AddControlButtons(True, False, False, False) Local $GUI_CLOSE_BUTTON = $Control_Buttons_2[0] ;Create Settings Options Local $BTN_SyncAll = _Metro_CreateButton(""Pull Data from Dropbox"", 50, 100, 440, 40) Local $BTN_DL_Import = _Metro_CreateButton(""Import Datalinker from Database"", 50, 160, 440, 40) _Metro_AddHSeperator(50, 240, 440, 1) Local $Label_AdminSettings = GUICtrlCreateLabel(""Admin Settings"", 200, 230, 150, 40, $SS_CENTER) GUICtrlSetColor(-1, $FontThemeColor) GUICtrlSetFont(-1, 12, 400, 0, ""Segoe UI"") Local $BTN_UploadAMCharts = _Metro_CreateButton(""Upload amCharts to Database"", 50, 280, 440, 40, 0xE9E9E9, $ButtonBKColor, ""Segoe UI"", 10, 1, $ButtonBKColor) Local $BTN_UploadDatalinker = _Metro_CreateButton(""Upload DataLinker to Database"", 50, 340, 440, 40, 0xE9E9E9, $ButtonBKColor, ""Segoe UI"", 10, 1, $ButtonBKColor) Local $BTN_Back = _Metro_AddControlButton_Back() GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE, $BTN_Back, $GUI_CLOSE_BUTTON _Metro_GUIDelete($Form7) ;Delete GUI/release resources, make sure you use this when working with multiple GUIs! Return 0 Case $BTN_SyncAll ConsoleWrite($DatabaseDir & @CRLF) SyncronizeDataFiles() _GUIDisable($Form7, 0, 50) _Metro_MsgBox(0, ""Alert"", ""Sync Completed. Done in "" & TimerDiff($timer) / 1000 & "" seconds!"") _GUIDisable($Form7) Case $BTN_DL_Import ImportDatalinker() If @error Then _GUIDisable($Form7, 0, 50) _Metro_MsgBox($MB_SYSTEMMODAL, ""Error"", ""There was an error importing your Datalinker file to InDesign | Could not replace directory in file"") _GUIDisable($Form7) Else _GUIDisable($Form7, 0, 50) _Metro_MsgBox($MB_SYSTEMMODAL, ""Success"", ""DataLinker file has successfully been imported. Please Restart InDesign if it is currently Open."") _GUIDisable($Form7) EndIf Case $BTN_UploadAMCharts UploadamCharts() Case $BTN_UploadDatalinker UploadDatalinker() EndSwitch WEnd EndFunc ;==>_SyncGUI Func BrowseForDBPath() ; Create a constant variable in Local scope of the message to display in FileSelectFolder. Local Const $sMessage = ""Select a folder"" ; Display an open dialog to select a file. Local $sFileSelectFolder = FileSelectFolder($sMessage, """") If @error Then ; Display the error message. _GUIDisable($Form5, 0, 50) _Metro_MsgBox($MB_SYSTEMMODAL, ""Error"", ""No folder was selected."") _GUIDisable($Form5) GUICtrlSetData($INPT_DropboxFolder, """") Else GUICtrlSetData($INPT_DropboxFolder, $sFileSelectFolder) EndIf EndFunc ;==>BrowseForDBPath ",16378,True,3893.8182998512216,median "#include-once #include ""Memory.au3"" #include ""RebarConstants.au3"" #include ""SendMessage.au3"" #include ""StructureConstants.au3"" #include ""UDFGlobalID.au3"" #include ""WinAPI.au3"" ; #INDEX# ======================================================================================================================= ; Title .........: Rebar ; AutoIt Version : 3.3.14.2 ; Language ......: English ; Description ...: Functions that assist with Rebar control management. ; Rebar controls act as containers for child windows. An application assigns child windows, ; which are often other controls, to a rebar control band. Rebar controls contain one or more bands, ; and each band can have any combination of a gripper bar, a bitmap, a text label, and a child window. ; However, bands cannot contain more than one child window. ; Author(s) .....: Gary Frost ; =============================================================================================================================== ; #VARIABLES# =================================================================================================================== Global $__g_hRBLastWnd ; =============================================================================================================================== ; #CONSTANTS# =================================================================================================================== Global Const $__REBARCONSTANT_ClassName = ""ReBarWindow32"" Global Const $__REBARCONSTANT_TB_GETBUTTONSIZE = $__REBARCONSTANT_WM_USER + 58 Global Const $__REBARCONSTANT_TB_BUTTONCOUNT = $__REBARCONSTANT_WM_USER + 24 Global Const $__REBARCONSTANT_WS_CLIPCHILDREN = 0x02000000 Global Const $__REBARCONSTANT_WS_CLIPSIBLINGS = 0x04000000 Global Const $__REBARCONSTANT_CCS_TOP = 0x01 ; =============================================================================================================================== ; #NO_DOC_FUNCTION# ============================================================================================================= ; Not working/documented/implemented at this time ; ; _GUICtrlRebar_GetBandStyleNoVert ; _GUICtrlRebar_SetBandStyleNoVert ; =============================================================================================================================== ; #CURRENT# ===================================================================================================================== ; _GUICtrlRebar_AddBand ; _GUICtrlRebar_AddToolBarBand ; _GUICtrlRebar_BeginDrag ; _GUICtrlRebar_Create ; _GUICtrlRebar_DeleteBand ; _GUICtrlRebar_Destroy ; _GUICtrlRebar_DragMove ; _GUICtrlRebar_EndDrag ; _GUICtrlRebar_GetBandBackColor ; _GUICtrlRebar_GetBandBorders ; _GUICtrlRebar_GetBandBordersEx ; _GUICtrlRebar_GetBandChildHandle ; _GUICtrlRebar_GetBandChildSize ; _GUICtrlRebar_GetBandCount ; _GUICtrlRebar_GetBandForeColor ; _GUICtrlRebar_GetBandHeaderSize ; _GUICtrlRebar_GetBandID ; _GUICtrlRebar_GetBandIdealSize ; _GUICtrlRebar_GetBandLParam ; _GUICtrlRebar_GetBandLength ; _GUICtrlRebar_GetBandMargins ; _GUICtrlRebar_GetBandMarginsEx ; _GUICtrlRebar_GetBandStyle ; _GUICtrlRebar_GetBandStyleBreak ; _GUICtrlRebar_GetBandStyleChildEdge ; _GUICtrlRebar_GetBandStyleFixedBMP ; _GUICtrlRebar_GetBandStyleFixedSize ; _GUICtrlRebar_GetBandStyleGripperAlways ; _GUICtrlRebar_GetBandStyleHidden ; _GUICtrlRebar_GetBandStyleHideTitle ; _GUICtrlRebar_GetBandStyleNoGripper ; _GUICtrlRebar_GetBandStyleTopAlign ; _GUICtrlRebar_GetBandStyleUseChevron ; _GUICtrlRebar_GetBandStyleVariableHeight ; _GUICtrlRebar_GetBandRect ; _GUICtrlRebar_GetBandRectEx ; _GUICtrlRebar_GetBandText ; _GUICtrlRebar_GetBarHeight ; _GUICtrlRebar_GetBarInfo ; _GUICtrlRebar_GetBKColor ; _GUICtrlRebar_GetColorScheme ; _GUICtrlRebar_GetRowCount ; _GUICtrlRebar_GetRowHeight ; _GUICtrlRebar_GetTextColor ; _GUICtrlRebar_GetToolTips ; _GUICtrlRebar_GetUnicodeFormat ; _GUICtrlRebar_HitTest ; _GUICtrlRebar_IDToIndex ; _GUICtrlRebar_MaximizeBand ; _GUICtrlRebar_MinimizeBand ; _GUICtrlRebar_MoveBand ; _GUICtrlRebar_SetBandBackColor ; _GUICtrlRebar_SetBandForeColor ; _GUICtrlRebar_SetBandHeaderSize ; _GUICtrlRebar_SetBandID ; _GUICtrlRebar_SetBandIdealSize ; _GUICtrlRebar_SetBandLength ; _GUICtrlRebar_SetBandLParam ; _GUICtrlRebar_SetBandStyle ; _GUICtrlRebar_SetBandStyleBreak ; _GUICtrlRebar_SetBandStyleChildEdge ; _GUICtrlRebar_SetBandStyleFixedBMP ; _GUICtrlRebar_SetBandStyleFixedSize ; _GUICtrlRebar_SetBandStyleGripperAlways ; _GUICtrlRebar_SetBandStyleHidden ; _GUICtrlRebar_SetBandStyleHideTitle ; _GUICtrlRebar_SetBandStyleNoGripper ; _GUICtrlRebar_SetBandStyleTopAlign ; _GUICtrlRebar_SetBandStyleUseChevron ; _GUICtrlRebar_SetBandStyleVariableHeight ; _GUICtrlRebar_SetBandText ; _GUICtrlRebar_SetBKColor ; _GUICtrlRebar_SetBarInfo ; _GUICtrlRebar_SetColorScheme ; _GUICtrlRebar_SetTextColor ; _GUICtrlRebar_SetToolTips ; _GUICtrlRebar_SetUnicodeFormat ; _GUICtrlRebar_ShowBand ; =============================================================================================================================== ; #INTERNAL_USE_ONLY# =========================================================================================================== ; $tagREBARINFO ; $tagRBHITTESTINFO ; __GUICtrlRebar_GetBandInfo ; __GUICtrlRebar_GetColorSchemeEx ; __GUICtrlRebar_SetBandInfo ; =============================================================================================================================== ; #INTERNAL_USE_ONLY# =========================================================================================================== ; Name...........: $tagREBARINFO ; Description ...: Contains information that describes rebar control characteristics ; Fields ........: cbSize - Size of this structure, in bytes. Your application must fill this member before sending any messages that use the address of this structure as a parameter. ; fMask - Flag values that describe characteristics of the rebar control. Currently, rebar controls support only one value: ; |$RBIM_IMAGELIST - The himl member is valid or must be filled ; himl - Handle to an image list. The rebar control will use the specified image list to obtain images ; Author ........: Gary Frost ; Remarks .......: ; =============================================================================================================================== Global Const $tagREBARINFO = ""uint cbSize;uint fMask;handle himl"" ; #INTERNAL_USE_ONLY# =========================================================================================================== ; Name...........: $tagRBHITTESTINFO ; Description ...: Contains information specific to a hit test operation ; Fields ........: X - Specifies the x-coordinate of the point ; Y - Specifies the y-coordinate of the point ; flags - Member that receives a flag value indicating the rebar band's component located at the point described by pt ; |This member will be one of the following: ; - ; |$RBHT_CAPTION - The point was in the rebar band's caption ; |$RBHT_CHEVRON - The point was in the rebar band's chevron (version 5.80 and greater) ; |$RBHT_CLIENT - The point was in the rebar band's client area ; |$RBHT_GRABBER - The point was in the rebar band's gripper ; |$RBHT_NOWHERE - The point was not in a rebar band ; iBand - Member that receives the rebar band's index at the point described by pt ; |This value will be the zero-based index of the band, or -1 if no band was at the hit-tested point ; Author ........: Gary Frost ; Remarks .......: ; =============================================================================================================================== Global Const $tagRBHITTESTINFO = $tagPOINT & "";uint flags;int iBand"" ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_AddBand($hWndRebar, $hWndChild, $iMinWidth = 100, $iDefaultWidth = 100, $sText = """", $iIndex = -1, $iStyle = -1) Local $bUnicode = _GUICtrlRebar_GetUnicodeFormat($hWndRebar) If Not IsHWnd($hWndChild) Then $hWndChild = GUICtrlGetHandle($hWndChild) Local $tINFO = DllStructCreate($tagREBARBANDINFO) Local $iSize = DllStructGetSize($tINFO) If $iDefaultWidth < $iMinWidth Then $iDefaultWidth = $iMinWidth If $iStyle <> -1 Then $iStyle = BitOR($iStyle, $RBBS_CHILDEDGE, $RBBS_GRIPPERALWAYS) Else $iStyle = BitOR($RBBS_CHILDEDGE, $RBBS_GRIPPERALWAYS) EndIf ;// Initialize band info used by the control DllStructSetData($tINFO, ""cbSize"", $iSize) DllStructSetData($tINFO, ""fMask"", BitOR($RBBIM_STYLE, $RBBIM_TEXT, $RBBIM_CHILD, $RBBIM_CHILDSIZE, $RBBIM_SIZE, $RBBIM_ID)) DllStructSetData($tINFO, ""fStyle"", $iStyle) ;// Set values unique to the band with the control Local $tRECT = _WinAPI_GetWindowRect($hWndChild) Local $iBottom = DllStructGetData($tRECT, ""Bottom"") Local $iTop = DllStructGetData($tRECT, ""Top"") Local $iBuffer = StringLen($sText) + 1 Local $tBuffer If $bUnicode Then $tBuffer = DllStructCreate(""wchar Text["" & $iBuffer & ""]"") $iBuffer *= 2 Else $tBuffer = DllStructCreate(""char Text["" & $iBuffer & ""]"") EndIf DllStructSetData($tBuffer, ""Text"", $sText) DllStructSetData($tINFO, ""hwndChild"", $hWndChild) DllStructSetData($tINFO, ""cxMinChild"", $iMinWidth) DllStructSetData($tINFO, ""cyMinChild"", $iBottom - $iTop) ;// The default width should be set to some value wider than the text. The combo ;// box itself will expand to fill the band. DllStructSetData($tINFO, ""cx"", $iDefaultWidth) DllStructSetData($tINFO, ""wID"", _GUICtrlRebar_GetBandCount($hWndRebar)) Local $tMemMap Local $pMemory = _MemInit($hWndRebar, $iSize + $iBuffer, $tMemMap) Local $pText = $pMemory + $iSize DllStructSetData($tINFO, ""lpText"", $pText) _MemWrite($tMemMap, $tINFO, $pMemory, $iSize) _MemWrite($tMemMap, $tBuffer, $pText, $iBuffer) ;// Add the band that has the combobox Local $iRet If $bUnicode Then $iRet = _SendMessage($hWndRebar, $RB_INSERTBANDW, $iIndex, $pMemory, 0, ""wparam"", ""ptr"") <> 0 Else $iRet = _SendMessage($hWndRebar, $RB_INSERTBANDA, $iIndex, $pMemory, 0, ""wparam"", ""ptr"") <> 0 EndIf _MemFree($tMemMap) Return $iRet EndFunc ;==>_GUICtrlRebar_AddBand ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_AddToolBarBand($hWndRebar, $hWndToolbar, $sText = """", $iIndex = -1, $iStyle = -1) Local $bUnicode = _GUICtrlRebar_GetUnicodeFormat($hWndRebar) Local $tINFO = DllStructCreate($tagREBARBANDINFO) Local $iSize = DllStructGetSize($tINFO) If $iStyle <> -1 Then $iStyle = BitOR($iStyle, $RBBS_CHILDEDGE, $RBBS_GRIPPERALWAYS) Else $iStyle = BitOR($RBBS_CHILDEDGE, $RBBS_GRIPPERALWAYS) EndIf ;// Initialize band info used by the toolbar DllStructSetData($tINFO, ""cbSize"", $iSize) DllStructSetData($tINFO, ""fMask"", BitOR($RBBIM_STYLE, $RBBIM_TEXT, $RBBIM_CHILD, $RBBIM_CHILDSIZE, $RBBIM_SIZE, $RBBIM_ID)) DllStructSetData($tINFO, ""fStyle"", $iStyle) ;// Get the height of the toolbar. Local $iBtnSize = _SendMessage($hWndToolbar, $__REBARCONSTANT_TB_GETBUTTONSIZE) ; Get the number of buttons contained in toolbar for calculation Local $iNumButtons = _SendMessage($hWndToolbar, $__REBARCONSTANT_TB_BUTTONCOUNT) Local $iDefaultWidth = $iNumButtons * _WinAPI_LoWord($iBtnSize) ;// Set values unique to the band with the toolbar. Local $iBuffer = StringLen($sText) + 1 Local $tBuffer If $bUnicode Then $tBuffer = DllStructCreate(""wchar Text["" & $iBuffer & ""]"") $iBuffer *= 2 Else $tBuffer = DllStructCreate(""char Text["" & $iBuffer & ""]"") EndIf DllStructSetData($tBuffer, ""Text"", $sText) DllStructSetData($tINFO, ""hwndChild"", $hWndToolbar) DllStructSetData($tINFO, ""cyChild"", _WinAPI_HiWord($iBtnSize)) DllStructSetData($tINFO, ""cxMinChild"", $iDefaultWidth) DllStructSetData($tINFO, ""cyMinChild"", _WinAPI_HiWord($iBtnSize)) DllStructSetData($tINFO, ""cx"", $iDefaultWidth) ;// The default width is the width of the buttons. DllStructSetData($tINFO, ""wID"", _GUICtrlRebar_GetBandCount($hWndRebar)) ;// Add the band that has the toolbar. Local $tMemMap, $iRet Local $pMemory = _MemInit($hWndRebar, $iSize + $iBuffer, $tMemMap) Local $pText = $pMemory + $iSize DllStructSetData($tINFO, ""lpText"", $pText) _MemWrite($tMemMap, $tINFO, $pMemory, $iSize) _MemWrite($tMemMap, $tBuffer, $pText, $iBuffer) ;// Add the band that has the combobox If $bUnicode Then $iRet = _SendMessage($hWndRebar, $RB_INSERTBANDW, $iIndex, $pMemory, 0, ""wparam"", ""ptr"") <> 0 Else $iRet = _SendMessage($hWndRebar, $RB_INSERTBANDA, $iIndex, $pMemory, 0, ""wparam"", ""ptr"") <> 0 EndIf _MemFree($tMemMap) Return $iRet EndFunc ;==>_GUICtrlRebar_AddToolBarBand ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_BeginDrag($hWnd, $iIndex, $iPos = -1) _SendMessage($hWnd, $RB_BEGINDRAG, $iIndex, $iPos, 0, ""wparam"", ""dword"") EndFunc ;==>_GUICtrlRebar_BeginDrag ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_Create($hWnd, $iStyles = 0x513) Local Const $ICC_BAR_CLASSES = 0x00000004; toolbar Local Const $ICC_COOL_CLASSES = 0x00000400; rebar Local $iStyle = BitOR($__UDFGUICONSTANT_WS_CHILD, $__UDFGUICONSTANT_WS_VISIBLE, $__REBARCONSTANT_WS_CLIPCHILDREN, $__REBARCONSTANT_WS_CLIPSIBLINGS) If $iStyles <> BitOR($__REBARCONSTANT_CCS_TOP, $RBS_VARHEIGHT) Then $iStyle = BitOR($iStyle, $iStyles) Else $iStyle = BitOR($iStyle, $__REBARCONSTANT_CCS_TOP, $RBS_VARHEIGHT) EndIf Local $tICCE = DllStructCreate('dword;dword') DllStructSetData($tICCE, 1, DllStructGetSize($tICCE)) DllStructSetData($tICCE, 2, BitOR($ICC_BAR_CLASSES, $ICC_COOL_CLASSES)) Local $aResult = DllCall('comctl32.dll', 'int', 'InitCommonControlsEx', 'struct*', $tICCE) If @error Then Return SetError(@error, @extended, 0) If $aResult[0] = 0 Then Return SetError(-2, 0, 0) Local $nCtrlID = __UDF_GetNextGlobalID($hWnd) If @error Then Return SetError(@error, @extended, 0) Local $hReBar = _WinAPI_CreateWindowEx(0, $__REBARCONSTANT_ClassName, """", $iStyle, 0, 0, 0, 0, $hWnd, $nCtrlID) If @error Then Return SetError(-1, -1, 0) Return $hReBar EndFunc ;==>_GUICtrlRebar_Create ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_DeleteBand($hWnd, $iIndex) Return _SendMessage($hWnd, $RB_DELETEBAND, $iIndex) <> 0 EndFunc ;==>_GUICtrlRebar_DeleteBand ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost (gafrost) ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_Destroy(ByRef $hWnd) If Not _WinAPI_IsClassName($hWnd, $__REBARCONSTANT_ClassName) Then Return SetError(2, 2, False) Local $iDestroyed = 0 If _WinAPI_InProcess($hWnd, $__g_hRBLastWnd) Then Local $iRebarCount = _GUICtrlRebar_GetBandCount($hWnd) For $iIndex = $iRebarCount - 1 To 0 Step -1 _GUICtrlRebar_DeleteBand($hWnd, $iIndex) Next Local $nCtrlID = _WinAPI_GetDlgCtrlID($hWnd) Local $hParent = _WinAPI_GetParent($hWnd) $iDestroyed = _WinAPI_DestroyWindow($hWnd) Local $iRet = __UDF_FreeGlobalID($hParent, $nCtrlID) If Not $iRet Then ; can check for errors here if needed, for debug EndIf Else ; Not Allowed to Destroy Other Applications Control(s) Return SetError(1, 1, False) EndIf If $iDestroyed Then $hWnd = 0 Return $iDestroyed <> 0 EndFunc ;==>_GUICtrlRebar_Destroy ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_DragMove($hWnd, $iPos = -1) _SendMessage($hWnd, $RB_DRAGMOVE, 0, $iPos, 0, ""wparam"", ""dword"") EndFunc ;==>_GUICtrlRebar_DragMove ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_EndDrag($hWnd) _SendMessage($hWnd, $RB_ENDDRAG) EndFunc ;==>_GUICtrlRebar_EndDrag ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_GetBandBackColor($hWnd, $iIndex) Local $tINFO = __GUICtrlRebar_GetBandInfo($hWnd, $iIndex, $RBBIM_COLORS) If @error Then Return SetError(@error, @error, 0) Return DllStructGetData($tINFO, ""clrBack"") EndFunc ;==>_GUICtrlRebar_GetBandBackColor ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_GetBandBorders($hWnd, $iIndex) Local $tRECT = _GUICtrlRebar_GetBandBordersEx($hWnd, $iIndex) Local $aRect[4] $aRect[0] = DllStructGetData($tRECT, ""Left"") $aRect[1] = DllStructGetData($tRECT, ""Top"") $aRect[2] = DllStructGetData($tRECT, ""Right"") $aRect[3] = DllStructGetData($tRECT, ""Bottom"") Return $aRect EndFunc ;==>_GUICtrlRebar_GetBandBorders ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_GetBandBordersEx($hWnd, $iIndex) Local $tRECT = DllStructCreate($tagRECT) _SendMessage($hWnd, $RB_GETBANDBORDERS, $iIndex, $tRECT, 0, ""uint"", ""struct*"") Return $tRECT EndFunc ;==>_GUICtrlRebar_GetBandBordersEx ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_GetBandChildHandle($hWnd, $iIndex) Local $tINFO = __GUICtrlRebar_GetBandInfo($hWnd, $iIndex, $RBBIM_CHILD) If @error Then Return SetError(@error, @error, 0) Return DllStructGetData($tINFO, ""hwndChild"") EndFunc ;==>_GUICtrlRebar_GetBandChildHandle ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_GetBandChildSize($hWnd, $iIndex) Local $aSizes[5] Local $tINFO = __GUICtrlRebar_GetBandInfo($hWnd, $iIndex, $RBBIM_CHILDSIZE) If @error Then Return SetError(@error, @error, $aSizes) $aSizes[0] = DllStructGetData($tINFO, ""cxMinChild"") $aSizes[1] = DllStructGetData($tINFO, ""cyMinChild"") $aSizes[2] = DllStructGetData($tINFO, ""cyChild"") $aSizes[3] = DllStructGetData($tINFO, ""cyMaxChild"") $aSizes[4] = DllStructGetData($tINFO, ""cyIntegral"") Return $aSizes EndFunc ;==>_GUICtrlRebar_GetBandChildSize ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_GetBandCount($hWnd) Return _SendMessage($hWnd, $RB_GETBANDCOUNT) EndFunc ;==>_GUICtrlRebar_GetBandCount ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_GetBandForeColor($hWnd, $iIndex) Local $tINFO = __GUICtrlRebar_GetBandInfo($hWnd, $iIndex, $RBBIM_COLORS) If @error Then Return SetError(@error, @error, 0) Return DllStructGetData($tINFO, ""clrFore"") EndFunc ;==>_GUICtrlRebar_GetBandForeColor ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_GetBandHeaderSize($hWnd, $iIndex) Local $tINFO = __GUICtrlRebar_GetBandInfo($hWnd, $iIndex, $RBBIM_HEADERSIZE) If @error Then Return SetError(@error, @error, 0) Return DllStructGetData($tINFO, ""cxHeader"") EndFunc ;==>_GUICtrlRebar_GetBandHeaderSize ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_GetBandID($hWnd, $iIndex) Local $tINFO = __GUICtrlRebar_GetBandInfo($hWnd, $iIndex, $RBBIM_ID) If @error Then Return SetError(@error, @error, 0) Return DllStructGetData($tINFO, ""wID"") EndFunc ;==>_GUICtrlRebar_GetBandID ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_GetBandIdealSize($hWnd, $iIndex) Local $tINFO = __GUICtrlRebar_GetBandInfo($hWnd, $iIndex, $RBBIM_IDEALSIZE) If @error Then Return SetError(@error, @error, 0) Return DllStructGetData($tINFO, ""cxIdeal"") EndFunc ;==>_GUICtrlRebar_GetBandIdealSize ; #INTERNAL_USE_ONLY# =========================================================================================================== ; Name...........: __GUICtrlRebar_GetBandInfo ; Description ...: Get Ideal width of the band, in pixels. ; Syntax.........: __GUICtrlRebar_GetBandInfo ( $hWnd, $iIndex, $iMask ) ; Parameters ....: $hWnd - Handle to rebar control ; $iIndex - Zero-based index of the band ; $iMask - Flags that indicate which members of this structure are valid ; Return values .: Success - $tagREBARBANDINFO structure ; Author ........: Gary Frost ; Modified.......: ; Remarks .......: ; Related .......: ; Link ..........: ; Example .......: Yes ; =============================================================================================================================== Func __GUICtrlRebar_GetBandInfo($hWnd, $iIndex, $iMask) Local $tINFO = DllStructCreate($tagREBARBANDINFO) Local $iSize = DllStructGetSize($tINFO) DllStructSetData($tINFO, ""cbSize"", $iSize) DllStructSetData($tINFO, ""fMask"", $iMask) Local $iRet = _SendMessage($hWnd, $RB_GETBANDINFOW, $iIndex, $tINFO, 0, ""wparam"", ""struct*"") Return SetError($iRet = 0, 0, $tINFO) EndFunc ;==>__GUICtrlRebar_GetBandInfo ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_GetBandLParam($hWnd, $iIndex) Local $tINFO = __GUICtrlRebar_GetBandInfo($hWnd, $iIndex, $RBBIM_LPARAM) If @error Then Return SetError(@error, @error, 0) Return DllStructGetData($tINFO, ""lParam"") EndFunc ;==>_GUICtrlRebar_GetBandLParam ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_GetBandLength($hWnd, $iIndex) Local $tINFO = __GUICtrlRebar_GetBandInfo($hWnd, $iIndex, $RBBIM_SIZE) If @error Then Return SetError(@error, @error, 0) Return DllStructGetData($tINFO, ""cx"") EndFunc ;==>_GUICtrlRebar_GetBandLength ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_GetBandMargins($hWnd) Local $tMargins = _GUICtrlRebar_GetBandMarginsEx($hWnd) Local $aMargins[4] $aMargins[0] = DllStructGetData($tMargins, ""cxLeftWidth"") $aMargins[1] = DllStructGetData($tMargins, ""cxRightWidth"") $aMargins[2] = DllStructGetData($tMargins, ""cyTopHeight"") $aMargins[3] = DllStructGetData($tMargins, ""cyBottomHeight"") Return $aMargins EndFunc ;==>_GUICtrlRebar_GetBandMargins ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_GetBandMarginsEx($hWnd) Local $tMargins = DllStructCreate($tagMARGINS) _SendMessage($hWnd, $RB_GETBANDMARGINS, 0, $tMargins, 0, ""wparam"", ""struct*"") Return $tMargins EndFunc ;==>_GUICtrlRebar_GetBandMarginsEx ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_GetBandStyle($hWnd, $iIndex) Local $tINFO = __GUICtrlRebar_GetBandInfo($hWnd, $iIndex, $RBBIM_STYLE) If @error Then Return SetError(@error, @error, 0) Return DllStructGetData($tINFO, ""fStyle"") EndFunc ;==>_GUICtrlRebar_GetBandStyle ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_GetBandStyleBreak($hWnd, $iIndex) Return BitAND(_GUICtrlRebar_GetBandStyle($hWnd, $iIndex), $RBBS_BREAK) = $RBBS_BREAK EndFunc ;==>_GUICtrlRebar_GetBandStyleBreak ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_GetBandStyleChildEdge($hWnd, $iIndex) Return BitAND(_GUICtrlRebar_GetBandStyle($hWnd, $iIndex), $RBBS_CHILDEDGE) = $RBBS_CHILDEDGE EndFunc ;==>_GUICtrlRebar_GetBandStyleChildEdge ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_GetBandStyleFixedBMP($hWnd, $iIndex) Return BitAND(_GUICtrlRebar_GetBandStyle($hWnd, $iIndex), $RBBS_FIXEDBMP) = $RBBS_FIXEDBMP EndFunc ;==>_GUICtrlRebar_GetBandStyleFixedBMP ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_GetBandStyleFixedSize($hWnd, $iIndex) Return BitAND(_GUICtrlRebar_GetBandStyle($hWnd, $iIndex), $RBBS_FIXEDSIZE) = $RBBS_FIXEDSIZE EndFunc ;==>_GUICtrlRebar_GetBandStyleFixedSize ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_GetBandStyleGripperAlways($hWnd, $iIndex) Return BitAND(_GUICtrlRebar_GetBandStyle($hWnd, $iIndex), $RBBS_GRIPPERALWAYS) = $RBBS_GRIPPERALWAYS EndFunc ;==>_GUICtrlRebar_GetBandStyleGripperAlways ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_GetBandStyleHidden($hWnd, $iIndex) Return BitAND(_GUICtrlRebar_GetBandStyle($hWnd, $iIndex), $RBBS_HIDDEN) = $RBBS_HIDDEN EndFunc ;==>_GUICtrlRebar_GetBandStyleHidden ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_GetBandStyleHideTitle($hWnd, $iIndex) Return BitAND(_GUICtrlRebar_GetBandStyle($hWnd, $iIndex), $RBBS_HIDETITLE) = $RBBS_HIDETITLE EndFunc ;==>_GUICtrlRebar_GetBandStyleHideTitle ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_GetBandStyleNoGripper($hWnd, $iIndex) Return BitAND(_GUICtrlRebar_GetBandStyle($hWnd, $iIndex), $RBBS_NOGRIPPER) = $RBBS_NOGRIPPER EndFunc ;==>_GUICtrlRebar_GetBandStyleNoGripper ; #NO_DOC_FUNCTION# ============================================================================================================= ; Name...........: _GUICtrlRebar_GetBandStyleNoVert ; Description ...: Determine if flag is set ; Syntax.........: _GUICtrlRebar_GetBandStyleNoVert ( $hWnd, $iIndex ) ; Parameters ....: $hWnd - Handle to rebar control ; $iIndex - Zero-based index of the band ; Return values .: True - Flag is set (Don't show when vertical) ; False - Flag not set ; Author ........: Gary Frost ; Modified.......: ; Remarks .......: ; Related .......: _GUICtrlRebar_SetBandStyleNoVert, _GUICtrlRebar_GetBandStyle ; Link ..........: ; Example .......: Yes ; =============================================================================================================================== Func _GUICtrlRebar_GetBandStyleNoVert($hWnd, $iIndex) Return BitAND(_GUICtrlRebar_GetBandStyle($hWnd, $iIndex), $RBBS_NOVERT) = $RBBS_NOVERT EndFunc ;==>_GUICtrlRebar_GetBandStyleNoVert ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_GetBandStyleTopAlign($hWnd, $iIndex) Return BitAND(_GUICtrlRebar_GetBandStyle($hWnd, $iIndex), $RBBS_TOPALIGN) = $RBBS_TOPALIGN EndFunc ;==>_GUICtrlRebar_GetBandStyleTopAlign ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_GetBandStyleUseChevron($hWnd, $iIndex) Return BitAND(_GUICtrlRebar_GetBandStyle($hWnd, $iIndex), $RBBS_USECHEVRON) = $RBBS_USECHEVRON EndFunc ;==>_GUICtrlRebar_GetBandStyleUseChevron ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_GetBandStyleVariableHeight($hWnd, $iIndex) Return BitAND(_GUICtrlRebar_GetBandStyle($hWnd, $iIndex), $RBBS_VARIABLEHEIGHT) = $RBBS_VARIABLEHEIGHT EndFunc ;==>_GUICtrlRebar_GetBandStyleVariableHeight ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_GetBandRect($hWnd, $iIndex) Local $tRECT = _GUICtrlRebar_GetBandRectEx($hWnd, $iIndex) Local $aRect[4] $aRect[0] = DllStructGetData($tRECT, ""Left"") $aRect[1] = DllStructGetData($tRECT, ""Top"") $aRect[2] = DllStructGetData($tRECT, ""Right"") $aRect[3] = DllStructGetData($tRECT, ""Bottom"") Return $aRect EndFunc ;==>_GUICtrlRebar_GetBandRect ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_GetBandRectEx($hWnd, $iIndex) Local $tRECT = DllStructCreate($tagRECT) _SendMessage($hWnd, $RB_GETRECT, $iIndex, $tRECT, 0, ""uint"", ""struct*"") Return $tRECT EndFunc ;==>_GUICtrlRebar_GetBandRectEx ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_GetBandText($hWnd, $iIndex) Local $bUnicode = _GUICtrlRebar_GetUnicodeFormat($hWnd) Local $tINFO = DllStructCreate($tagREBARBANDINFO) Local $iSize = DllStructGetSize($tINFO) Local $tBuffer Local $iBuffer = 4096 If $bUnicode Then $tBuffer = DllStructCreate(""wchar Buffer[4096]"") $iBuffer *= 2 Else $tBuffer = DllStructCreate(""char Buffer[4096]"") EndIf DllStructSetData($tINFO, ""cbSize"", $iSize) DllStructSetData($tINFO, ""fMask"", $RBBIM_TEXT) DllStructSetData($tINFO, ""cch"", $iBuffer) Local $tMemMap Local $pMemory = _MemInit($hWnd, $iSize + $iBuffer, $tMemMap) Local $pText = $pMemory + $iSize DllStructSetData($tINFO, ""lpText"", $pText) _MemWrite($tMemMap, $tINFO, $pMemory, $iSize) Local $iRet If $bUnicode Then $iRet = _SendMessage($hWnd, $RB_GETBANDINFOW, $iIndex, $pMemory, 0, ""wparam"", ""ptr"") Else $iRet = _SendMessage($hWnd, $RB_GETBANDINFOA, $iIndex, $pMemory, 0, ""wparam"", ""ptr"") EndIf _MemRead($tMemMap, $pText, $tBuffer, $iBuffer) _MemFree($tMemMap) Return SetError($iRet = 0, 0, DllStructGetData($tBuffer, ""Buffer"")) EndFunc ;==>_GUICtrlRebar_GetBandText ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_GetBarHeight($hWnd) Return _SendMessage($hWnd, $RB_GETBARHEIGHT) EndFunc ;==>_GUICtrlRebar_GetBarHeight ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_GetBarInfo($hWnd) Local $tINFO = DllStructCreate($tagREBARINFO) DllStructSetData($tINFO, ""cbSize"", DllStructGetSize($tINFO)) DllStructSetData($tINFO, ""fMask"", $RBIM_IMAGELIST) Local $iRet = _SendMessage($hWnd, $RB_GETBARINFO, 0, $tINFO, 0, ""wparam"", ""struct*"") Return SetError($iRet = 0, 0, DllStructGetData($tINFO, ""himl"")) EndFunc ;==>_GUICtrlRebar_GetBarInfo ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_GetBKColor($hWnd) Return _SendMessage($hWnd, $RB_GETBKCOLOR) EndFunc ;==>_GUICtrlRebar_GetBKColor ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_GetColorScheme($hWnd) Local $aColors[2] Local $tColorScheme = __GUICtrlRebar_GetColorSchemeEx($hWnd) If @error Then Return SetError(@error, @error, $aColors) $aColors[0] = DllStructGetData($tColorScheme, ""BtnHighlight"") $aColors[1] = DllStructGetData($tColorScheme, ""BtnShadow"") Return $aColors EndFunc ;==>_GUICtrlRebar_GetColorScheme ; #INTERNAL_USE_ONLY# =========================================================================================================== ; Name...........: __GUICtrlRebar_GetColorSchemeEx ; Description ...: Retrieves the color scheme information from the rebar control ; Syntax.........: __GUICtrlRebar_GetColorSchemeEx ( $hWnd ) ; Parameters ....: $hWnd - Handle to rebar control ; Return values .: Success - $tagCOLORSCHEME structure ; Author ........: Gary Frost ; Modified.......: ; Remarks .......: ; Related .......: _GUICtrlRebar_GetColorScheme, $tagCOLORSCHEME ; Link ..........: ; Example .......: Yes ; =============================================================================================================================== Func __GUICtrlRebar_GetColorSchemeEx($hWnd) Local $tColorScheme = DllStructCreate($tagCOLORSCHEME) DllStructSetData($tColorScheme, ""Size"", DllStructGetSize($tColorScheme)) Local $iRet = _SendMessage($hWnd, $RB_GETCOLORSCHEME, 0, $tColorScheme, 0, ""wparam"", ""struct*"") Return SetError($iRet = 0, 0, $tColorScheme) EndFunc ;==>__GUICtrlRebar_GetColorSchemeEx ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_GetRowCount($hWnd) Return _SendMessage($hWnd, $RB_GETROWCOUNT) EndFunc ;==>_GUICtrlRebar_GetRowCount ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_GetRowHeight($hWnd, $iIndex) Return _SendMessage($hWnd, $RB_GETROWHEIGHT, $iIndex) EndFunc ;==>_GUICtrlRebar_GetRowHeight ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_GetTextColor($hWnd) Return _SendMessage($hWnd, $RB_GETTEXTCOLOR) EndFunc ;==>_GUICtrlRebar_GetTextColor ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_GetToolTips($hWnd) Return _SendMessage($hWnd, $RB_GETTOOLTIPS, 0, 0, 0, ""wparam"", ""lparam"", ""hwnd"") EndFunc ;==>_GUICtrlRebar_GetToolTips ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_GetUnicodeFormat($hWnd) Return _SendMessage($hWnd, $RB_GETUNICODEFORMAT) <> 0 EndFunc ;==>_GUICtrlRebar_GetUnicodeFormat ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_HitTest($hWnd, $iX = -1, $iY = -1) Local $iMode = Opt(""MouseCoordMode"", 1) Local $aPos = MouseGetPos() Opt(""MouseCoordMode"", $iMode) Local $tPoint = DllStructCreate($tagPOINT) DllStructSetData($tPoint, ""X"", $aPos[0]) DllStructSetData($tPoint, ""Y"", $aPos[1]) DllCall(""user32.dll"", ""bool"", ""ScreenToClient"", ""hwnd"", $hWnd, ""struct*"", $tPoint) If @error Then Return SetError(@error, @extended, 0) If $iX = -1 Then $iX = DllStructGetData($tPoint, ""X"") If $iY = -1 Then $iY = DllStructGetData($tPoint, ""Y"") Local $tTest = DllStructCreate($tagRBHITTESTINFO) DllStructSetData($tTest, ""X"", $iX) DllStructSetData($tTest, ""Y"", $iY) Local $iTest = DllStructGetSize($tTest) Local $tMemMap, $aTest[6] Local $pMemory = _MemInit($hWnd, $iTest, $tMemMap) _MemWrite($tMemMap, $tTest, $pMemory, $iTest) $aTest[0] = _SendMessage($hWnd, $RB_HITTEST, 0, $pMemory, 0, ""wparam"", ""ptr"") _MemRead($tMemMap, $pMemory, $tTest, $iTest) _MemFree($tMemMap) Local $iFlags = DllStructGetData($tTest, ""flags"") $aTest[1] = BitAND($iFlags, $RBHT_NOWHERE) <> 0 $aTest[2] = BitAND($iFlags, $RBHT_CLIENT) <> 0 $aTest[3] = BitAND($iFlags, $RBHT_CAPTION) <> 0 $aTest[4] = BitAND($iFlags, $RBHT_CHEVRON) <> 0 $aTest[5] = BitAND($iFlags, $RBHT_GRABBER) <> 0 Return $aTest EndFunc ;==>_GUICtrlRebar_HitTest ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_IDToIndex($hWnd, $iID) Return _SendMessage($hWnd, $RB_IDTOINDEX, $iID) EndFunc ;==>_GUICtrlRebar_IDToIndex ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_MaximizeBand($hWnd, $iIndex, $bIdeal = True) _SendMessage($hWnd, $RB_MAXIMIZEBAND, $iIndex, $bIdeal) EndFunc ;==>_GUICtrlRebar_MaximizeBand ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_MinimizeBand($hWnd, $iIndex) _SendMessage($hWnd, $RB_MINIMIZEBAND, $iIndex) EndFunc ;==>_GUICtrlRebar_MinimizeBand ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_MoveBand($hWnd, $iIndexFrom, $iIndexTo) If $iIndexTo > _GUICtrlRebar_GetBandCount($hWnd) - 1 Then Return False Return _SendMessage($hWnd, $RB_MOVEBAND, $iIndexFrom, $iIndexTo) <> 0 EndFunc ;==>_GUICtrlRebar_MoveBand ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_SetBandBackColor($hWnd, $iIndex, $iColor) Local $tINFO = DllStructCreate($tagREBARBANDINFO) Local $iSize = DllStructGetSize($tINFO) DllStructSetData($tINFO, ""cbSize"", $iSize) DllStructSetData($tINFO, ""fMask"", $RBBIM_COLORS) DllStructSetData($tINFO, ""clrBack"", $iColor) DllStructGetData($tINFO, ""clrFore"", _GUICtrlRebar_GetBandForeColor($hWnd, $iIndex)) Local $iRet, $tMemMap Local $pMemory = _MemInit($hWnd, $iSize, $tMemMap) _MemWrite($tMemMap, $tINFO, $pMemory, $iSize) If _GUICtrlRebar_GetUnicodeFormat($hWnd) Then $iRet = _SendMessage($hWnd, $RB_SETBANDINFOW, $iIndex, $pMemory, 0, ""wparam"", ""ptr"") <> 0 Else $iRet = _SendMessage($hWnd, $RB_SETBANDINFOA, $iIndex, $pMemory, 0, ""wparam"", ""ptr"") <> 0 EndIf _MemFree($tMemMap) Return $iRet EndFunc ;==>_GUICtrlRebar_SetBandBackColor ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_SetBandForeColor($hWnd, $iIndex, $iColor) Local $tINFO = DllStructCreate($tagREBARBANDINFO) Local $iSize = DllStructGetSize($tINFO) DllStructSetData($tINFO, ""cbSize"", $iSize) DllStructSetData($tINFO, ""fMask"", $RBBIM_COLORS) DllStructSetData($tINFO, ""clrFore"", $iColor) DllStructSetData($tINFO, ""clrBack"", _GUICtrlRebar_GetBandBackColor($hWnd, $iIndex)) Local $iRet, $tMemMap Local $pMemory = _MemInit($hWnd, $iSize, $tMemMap) _MemWrite($tMemMap, $tINFO, $pMemory, $iSize) If _GUICtrlRebar_GetUnicodeFormat($hWnd) Then $iRet = _SendMessage($hWnd, $RB_SETBANDINFOW, $iIndex, $pMemory, 0, ""wparam"", ""ptr"") <> 0 Else $iRet = _SendMessage($hWnd, $RB_SETBANDINFOA, $iIndex, $pMemory, 0, ""wparam"", ""ptr"") <> 0 EndIf _MemFree($tMemMap) Return $iRet EndFunc ;==>_GUICtrlRebar_SetBandForeColor ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_SetBandHeaderSize($hWnd, $iIndex, $iNewSize) Return __GUICtrlRebar_SetBandInfo($hWnd, $iIndex, $RBBIM_HEADERSIZE, ""cxHeader"", $iNewSize) EndFunc ;==>_GUICtrlRebar_SetBandHeaderSize ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_SetBandID($hWnd, $iIndex, $iID) Return __GUICtrlRebar_SetBandInfo($hWnd, $iIndex, $RBBIM_ID, ""wID"", $iID) EndFunc ;==>_GUICtrlRebar_SetBandID ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_SetBandIdealSize($hWnd, $iIndex, $iNewSize) Return __GUICtrlRebar_SetBandInfo($hWnd, $iIndex, $RBBIM_IDEALSIZE, ""cxIdeal"", $iNewSize) EndFunc ;==>_GUICtrlRebar_SetBandIdealSize ; #INTERNAL_USE_ONLY# =========================================================================================================== ; Name...........: __GUICtrlRebar_SetBandInfo ; Description ...: Set Ideal width of the band, in pixels. ; Syntax.........: __GUICtrlRebar_SetBandInfo ( $hWnd, $iIndex, $iMask, $sName, $iData ) ; Parameters ....: $hWnd - Handle to rebar control ; $iIndex - Zero-based index of the band ; $iMask - Flags that indicate which members of this structure are valid or must be filled ; $sName - Name of the member ; $iData - Data for the member ; Return values .: Success - True ; Failure - False ; Author ........: Gary Frost ; Modified.......: ; Remarks .......: ; Related .......: __GUICtrlRebar_GetBandInfo ; Link ..........: ; Example .......: Yes ; =============================================================================================================================== Func __GUICtrlRebar_SetBandInfo($hWnd, $iIndex, $iMask, $sName, $iData) Local $tINFO = DllStructCreate($tagREBARBANDINFO) Local $iSize = DllStructGetSize($tINFO) DllStructSetData($tINFO, ""cbSize"", $iSize) DllStructSetData($tINFO, ""fMask"", $iMask) DllStructSetData($tINFO, $sName, $iData) Local $iRet, $tMemMap Local $pMemory = _MemInit($hWnd, $iSize, $tMemMap) _MemWrite($tMemMap, $tINFO, $pMemory, $iSize) If _GUICtrlRebar_GetUnicodeFormat($hWnd) Then $iRet = _SendMessage($hWnd, $RB_SETBANDINFOW, $iIndex, $pMemory, 0, ""wparam"", ""ptr"") <> 0 Else $iRet = _SendMessage($hWnd, $RB_SETBANDINFOA, $iIndex, $pMemory, 0, ""wparam"", ""ptr"") <> 0 EndIf _MemFree($tMemMap) Return $iRet EndFunc ;==>__GUICtrlRebar_SetBandInfo ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_SetBandLength($hWnd, $iIndex, $iLength) Return __GUICtrlRebar_SetBandInfo($hWnd, $iIndex, $RBBIM_SIZE, ""cx"", $iLength) EndFunc ;==>_GUICtrlRebar_SetBandLength ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_SetBandLParam($hWnd, $iIndex, $lParam) Return __GUICtrlRebar_SetBandInfo($hWnd, $iIndex, $RBBIM_LPARAM, ""lParam"", $lParam) EndFunc ;==>_GUICtrlRebar_SetBandLParam ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_SetBandStyle($hWnd, $iIndex, $iStyle) Return __GUICtrlRebar_SetBandInfo($hWnd, $iIndex, $RBBIM_STYLE, ""fStyle"", $iStyle) EndFunc ;==>_GUICtrlRebar_SetBandStyle ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_SetBandStyleBreak($hWnd, $iIndex, $bEnabled = True) If $bEnabled Then Return __GUICtrlRebar_SetBandInfo($hWnd, $iIndex, $RBBIM_STYLE, ""fStyle"", BitOR(_GUICtrlRebar_GetBandStyle($hWnd, $iIndex), $RBBS_BREAK)) Else Return __GUICtrlRebar_SetBandInfo($hWnd, $iIndex, $RBBIM_STYLE, ""fStyle"", BitXOR(_GUICtrlRebar_GetBandStyle($hWnd, $iIndex), $RBBS_BREAK)) EndIf EndFunc ;==>_GUICtrlRebar_SetBandStyleBreak ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_SetBandStyleChildEdge($hWnd, $iIndex, $bEnabled = True) If $bEnabled Then Return __GUICtrlRebar_SetBandInfo($hWnd, $iIndex, $RBBIM_STYLE, ""fStyle"", BitOR(_GUICtrlRebar_GetBandStyle($hWnd, $iIndex), $RBBS_CHILDEDGE)) Else Return __GUICtrlRebar_SetBandInfo($hWnd, $iIndex, $RBBIM_STYLE, ""fStyle"", BitXOR(_GUICtrlRebar_GetBandStyle($hWnd, $iIndex), $RBBS_CHILDEDGE)) EndIf EndFunc ;==>_GUICtrlRebar_SetBandStyleChildEdge ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_SetBandStyleFixedBMP($hWnd, $iIndex, $bEnabled = True) If $bEnabled Then Return __GUICtrlRebar_SetBandInfo($hWnd, $iIndex, $RBBIM_STYLE, ""fStyle"", BitOR(_GUICtrlRebar_GetBandStyle($hWnd, $iIndex), $RBBS_FIXEDBMP)) Else Return __GUICtrlRebar_SetBandInfo($hWnd, $iIndex, $RBBIM_STYLE, ""fStyle"", BitXOR(_GUICtrlRebar_GetBandStyle($hWnd, $iIndex), $RBBS_FIXEDBMP)) EndIf EndFunc ;==>_GUICtrlRebar_SetBandStyleFixedBMP ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_SetBandStyleFixedSize($hWnd, $iIndex, $bEnabled = True) If $bEnabled Then Return __GUICtrlRebar_SetBandInfo($hWnd, $iIndex, $RBBIM_STYLE, ""fStyle"", BitOR(_GUICtrlRebar_GetBandStyle($hWnd, $iIndex), $RBBS_FIXEDSIZE)) Else Return __GUICtrlRebar_SetBandInfo($hWnd, $iIndex, $RBBIM_STYLE, ""fStyle"", BitXOR(_GUICtrlRebar_GetBandStyle($hWnd, $iIndex), $RBBS_FIXEDSIZE)) EndIf EndFunc ;==>_GUICtrlRebar_SetBandStyleFixedSize ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_SetBandStyleGripperAlways($hWnd, $iIndex, $bEnabled = True) If $bEnabled Then Return __GUICtrlRebar_SetBandInfo($hWnd, $iIndex, $RBBIM_STYLE, ""fStyle"", BitOR(_GUICtrlRebar_GetBandStyle($hWnd, $iIndex), $RBBS_GRIPPERALWAYS)) Else Return __GUICtrlRebar_SetBandInfo($hWnd, $iIndex, $RBBIM_STYLE, ""fStyle"", BitXOR(_GUICtrlRebar_GetBandStyle($hWnd, $iIndex), $RBBS_GRIPPERALWAYS)) EndIf EndFunc ;==>_GUICtrlRebar_SetBandStyleGripperAlways ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_SetBandStyleHidden($hWnd, $iIndex, $bEnabled = True) If $bEnabled Then Return __GUICtrlRebar_SetBandInfo($hWnd, $iIndex, $RBBIM_STYLE, ""fStyle"", BitOR(_GUICtrlRebar_GetBandStyle($hWnd, $iIndex), $RBBS_HIDDEN)) Else Return __GUICtrlRebar_SetBandInfo($hWnd, $iIndex, $RBBIM_STYLE, ""fStyle"", BitXOR(_GUICtrlRebar_GetBandStyle($hWnd, $iIndex), $RBBS_HIDDEN)) EndIf EndFunc ;==>_GUICtrlRebar_SetBandStyleHidden ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_SetBandStyleHideTitle($hWnd, $iIndex, $bEnabled = True) If $bEnabled Then Return __GUICtrlRebar_SetBandInfo($hWnd, $iIndex, $RBBIM_STYLE, ""fStyle"", BitOR(_GUICtrlRebar_GetBandStyle($hWnd, $iIndex), $RBBS_HIDETITLE)) Else Return __GUICtrlRebar_SetBandInfo($hWnd, $iIndex, $RBBIM_STYLE, ""fStyle"", BitXOR(_GUICtrlRebar_GetBandStyle($hWnd, $iIndex), $RBBS_HIDETITLE)) EndIf EndFunc ;==>_GUICtrlRebar_SetBandStyleHideTitle ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_SetBandStyleNoGripper($hWnd, $iIndex, $bEnabled = True) If $bEnabled Then Return __GUICtrlRebar_SetBandInfo($hWnd, $iIndex, $RBBIM_STYLE, ""fStyle"", BitOR(_GUICtrlRebar_GetBandStyle($hWnd, $iIndex), $RBBS_NOGRIPPER)) Else Return __GUICtrlRebar_SetBandInfo($hWnd, $iIndex, $RBBIM_STYLE, ""fStyle"", BitXOR(_GUICtrlRebar_GetBandStyle($hWnd, $iIndex), $RBBS_NOGRIPPER)) EndIf EndFunc ;==>_GUICtrlRebar_SetBandStyleNoGripper ; #NO_DOC_FUNCTION# ============================================================================================================= ; Name...........: _GUICtrlRebar_SetBandStyleNoVert ; Description ...: Set whether to Don't show when vertical ; Syntax.........: _GUICtrlRebar_SetBandStyleNoVert ( $hWnd, $iIndex [, $bEnabled = True] ) ; Parameters ....: $hWnd - Handle to rebar control ; $iIndex - Zero-based index of the band ; $bEnabled - If True the item state is set, otherwise it is not set ; Return values .: Success - True ; Failure - False ; Author ........: Gary Frost ; Modified.......: ; Remarks .......: ; Related .......: _GUICtrlRebar_GetBandStyleNoVert, _GUICtrlRebar_SetBandStyle ; Link ..........: ; Example .......: Yes ; =============================================================================================================================== Func _GUICtrlRebar_SetBandStyleNoVert($hWnd, $iIndex, $bEnabled = True) If $bEnabled Then Return __GUICtrlRebar_SetBandInfo($hWnd, $iIndex, $RBBIM_STYLE, ""fStyle"", BitOR(_GUICtrlRebar_GetBandStyle($hWnd, $iIndex), $RBBS_NOVERT)) Else Return __GUICtrlRebar_SetBandInfo($hWnd, $iIndex, $RBBIM_STYLE, ""fStyle"", BitXOR(_GUICtrlRebar_GetBandStyle($hWnd, $iIndex), $RBBS_NOVERT)) EndIf EndFunc ;==>_GUICtrlRebar_SetBandStyleNoVert ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_SetBandStyleTopAlign($hWnd, $iIndex, $bEnabled = True) If $bEnabled Then Return __GUICtrlRebar_SetBandInfo($hWnd, $iIndex, $RBBIM_STYLE, ""fStyle"", BitOR(_GUICtrlRebar_GetBandStyle($hWnd, $iIndex), $RBBS_TOPALIGN)) Else Return __GUICtrlRebar_SetBandInfo($hWnd, $iIndex, $RBBIM_STYLE, ""fStyle"", BitXOR(_GUICtrlRebar_GetBandStyle($hWnd, $iIndex), $RBBS_TOPALIGN)) EndIf EndFunc ;==>_GUICtrlRebar_SetBandStyleTopAlign ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_SetBandStyleUseChevron($hWnd, $iIndex, $bEnabled = True) If $bEnabled Then Return __GUICtrlRebar_SetBandInfo($hWnd, $iIndex, $RBBIM_STYLE, ""fStyle"", BitOR(_GUICtrlRebar_GetBandStyle($hWnd, $iIndex), $RBBS_USECHEVRON)) Else Return __GUICtrlRebar_SetBandInfo($hWnd, $iIndex, $RBBIM_STYLE, ""fStyle"", BitXOR(_GUICtrlRebar_GetBandStyle($hWnd, $iIndex), $RBBS_USECHEVRON)) EndIf EndFunc ;==>_GUICtrlRebar_SetBandStyleUseChevron ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_SetBandStyleVariableHeight($hWnd, $iIndex, $bEnabled = True) If $bEnabled Then Return __GUICtrlRebar_SetBandInfo($hWnd, $iIndex, $RBBIM_STYLE, ""fStyle"", BitOR(_GUICtrlRebar_GetBandStyle($hWnd, $iIndex), $RBBS_VARIABLEHEIGHT)) Else Return __GUICtrlRebar_SetBandInfo($hWnd, $iIndex, $RBBIM_STYLE, ""fStyle"", BitXOR(_GUICtrlRebar_GetBandStyle($hWnd, $iIndex), $RBBS_VARIABLEHEIGHT)) EndIf EndFunc ;==>_GUICtrlRebar_SetBandStyleVariableHeight ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_SetBandText($hWnd, $iIndex, $sText) Local $bUnicode = _GUICtrlRebar_GetUnicodeFormat($hWnd) Local $tINFO = DllStructCreate($tagREBARBANDINFO) Local $iSize = DllStructGetSize($tINFO) Local $iBuffer = StringLen($sText) + 1 Local $tBuffer If $bUnicode Then $tBuffer = DllStructCreate(""wchar Buffer["" & $iBuffer & ""]"") $iBuffer *= 2 Else $tBuffer = DllStructCreate(""char Buffer["" & $iBuffer & ""]"") EndIf DllStructSetData($tBuffer, ""Buffer"", $sText) DllStructSetData($tINFO, ""cbSize"", $iSize) DllStructSetData($tINFO, ""fMask"", $RBBIM_TEXT) DllStructSetData($tINFO, ""cch"", $iBuffer) Local $iRet, $tMemMap Local $pMemory = _MemInit($hWnd, $iSize + $iBuffer, $tMemMap) Local $pText = $pMemory + $iSize DllStructSetData($tINFO, ""lpText"", $pText) _MemWrite($tMemMap, $tINFO, $pMemory, $iSize) _MemWrite($tMemMap, $tBuffer, $pText, $iBuffer) If $bUnicode Then $iRet = _SendMessage($hWnd, $RB_SETBANDINFOW, $iIndex, $pMemory, 0, ""wparam"", ""ptr"") Else $iRet = _SendMessage($hWnd, $RB_SETBANDINFOA, $iIndex, $pMemory, 0, ""wparam"", ""ptr"") EndIf _MemFree($tMemMap) Return $iRet <> 0 EndFunc ;==>_GUICtrlRebar_SetBandText ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_SetBKColor($hWnd, $iColor) Return _SendMessage($hWnd, $RB_SETBKCOLOR, 0, $iColor) EndFunc ;==>_GUICtrlRebar_SetBKColor ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_SetBarInfo($hWnd, $hIml) Local $tINFO = DllStructCreate($tagREBARINFO) DllStructSetData($tINFO, ""cbSize"", DllStructGetSize($tINFO)) DllStructSetData($tINFO, ""fMask"", $RBIM_IMAGELIST) DllStructSetData($tINFO, ""himl"", $hIml) Return _SendMessage($hWnd, $RB_SETBARINFO, 0, $tINFO, 0, ""wparam"", ""struct*"") <> 0 EndFunc ;==>_GUICtrlRebar_SetBarInfo ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_SetColorScheme($hWnd, $iBtnHighlight, $iBtnShadow) Local $tINFO = DllStructCreate($tagCOLORSCHEME) Local $iSize = DllStructGetSize($tINFO) DllStructSetData($tINFO, ""Size"", $iSize) DllStructSetData($tINFO, ""BtnHighlight"", $iBtnHighlight) DllStructSetData($tINFO, ""BtnShadow"", $iBtnShadow) Local $tMemMap Local $pMemory = _MemInit($hWnd, $iSize, $tMemMap) _MemWrite($tMemMap, $tINFO, $pMemory, $iSize) _SendMessage($hWnd, $RB_SETCOLORSCHEME, 0, $pMemory, 0, ""wparam"", ""ptr"") _MemFree($tMemMap) EndFunc ;==>_GUICtrlRebar_SetColorScheme ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_SetTextColor($hWnd, $iColor) Return _SendMessage($hWnd, $RB_SETTEXTCOLOR, 0, $iColor) EndFunc ;==>_GUICtrlRebar_SetTextColor ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_SetToolTips($hWnd, $hToolTip) _SendMessage($hWnd, $RB_SETTOOLTIPS, $hToolTip, 0, 0, ""hwnd"") EndFunc ;==>_GUICtrlRebar_SetToolTips ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_SetUnicodeFormat($hWnd, $bUnicode = True) Return _SendMessage($hWnd, $RB_SETUNICODEFORMAT, $bUnicode) EndFunc ;==>_GUICtrlRebar_SetUnicodeFormat ; #FUNCTION# ==================================================================================================================== ; Author ........: Gary Frost ; Modified.......: ; =============================================================================================================================== Func _GUICtrlRebar_ShowBand($hWnd, $iIndex, $bShow = True) Return _SendMessage($hWnd, $RB_SHOWBAND, $iIndex, $bShow) <> 0 EndFunc ;==>_GUICtrlRebar_ShowBand ",16264,True,4429.79993290566,median "#cs -Program Comments- AutoIt Version: 3.3.6.1 Author: Liapis Nikos Script Name: Arduino Simulator Script Description: A Arduino ""pseudo"" simulator. Date: 18-6-2012 Version: 0.07 Version changes: 0.02) Counters increase (or dicrease) only when the triger input changes condition 0.03) Bug fixed: Counters were not increased (or dicreased) correctly when the same counter was declared in more than one rule 0.04) Display the type of each pin next to the pin 0.05) Create a list view which shows the rules of the project, so that the user can check on them when testing Show the name of the current project on the window title Bug fixed: Delete the labels that shows the pin state when a second project is opened When the project doesn't have any Rules, Display an error message The How to... under the help menu is active 0.06) Show the pin name next the pin 0.07) Corrections made to handle the new ""Compare"" feature Corrections needed: #ce #include #include #include #Include ; include Global $version = ""0.07"" Global $release_date = ""18-6-2012"" Global $project_name = ""..."" Global $pin[20] Global $pin_button[20] Global $pin_state[20] Global $pin_type_label[20] Global $project_running = 0 Global $virtual_coil[1] Global $counter[1] Global $counter_changed[1] Global $timer[1] Global $timer_start[1] Global $timer_diff[1] Global $timer_mark[1] $main = GUICreate(""Arduino Simulator V"" & $version & "" - "" & $project_name, 1100, 538, 70, 82) ; Create a GUI windon #region Create List $List = GUICtrlCreateListView(""Rule|Input A|Is|Value|AND/OR|Input B|Is|Value|Output|Is|Value|Delay"", 530, 10, 540, 460,-1, 0x00000001) _GUICtrlListView_SetColumnWidth($list, 0, 36) _GUICtrlListView_SetColumnWidth($list, 1, 55) _GUICtrlListView_SetColumnWidth($list, 2, 30) _GUICtrlListView_SetColumnWidth($list, 3, 45) _GUICtrlListView_SetColumnWidth($list, 4, 60) _GUICtrlListView_SetColumnWidth($list, 5, 55) _GUICtrlListView_SetColumnWidth($list, 6, 30) _GUICtrlListView_SetColumnWidth($list, 7, 45) _GUICtrlListView_SetColumnWidth($list, 8, 55) _GUICtrlListView_SetColumnWidth($list, 9, 30) _GUICtrlListView_SetColumnWidth($list, 10, 45) _GUICtrlListView_SetColumnWidth($list, 11, 50) #endregion #region Create Buttons $button_run = GUICtrlCreateButton (""RUN"", 200, 480, 50, 25) GUICtrlSetState(-1, $GUI_DISABLE) $button_stop = GUICtrlCreateButton (""STOP"", 290, 480, 50, 25) GUICtrlSetState(-1, $GUI_DISABLE) #endregion #region Create Menu $file_menu = GUICtrlCreateMenu (""File"") $open_menu = GUICtrlCreateMenuItem (""Open..."", $file_menu) $exit_menu = GUICtrlCreateMenuItem (""Exit"", $file_menu) $help_menu = GUICtrlCreateMenu (""Help"") $about_menu = GUICtrlCreateMenuItem (""About"", $help_menu) $how_to_menu = GUICtrlCreateMenuItem (""How To..."", $help_menu) #endregion #region Create static graphics GUICtrlCreateGraphic(110, 48, 345, 417) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0xA6CAF0) GUICtrlCreateGraphic(182, 224, 65, 209) GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0x000000) GUICtrlCreateGraphic(302, 8, 81, 97) GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0x000000) GUICtrlCreateGraphic(126, 24, 65, 89) GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0x000000) GUICtrlCreateGraphic(198, 80, 49, 25) GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0x000000) GUICtrlCreateGraphic(310, 152, 33, 33) GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0x000000) GUICtrlCreateGraphic(252, 128, 25, 65) GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0x000000) GUICtrlCreateGraphic(252, 424, 49, 33) GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0x000000) GUICtrlCreateGraphic(230, 152, 17, 33) GUICtrlSetColor(-1, 0xFFFFFF) GUICtrlSetBkColor(-1, 0x000000) #endregion GUISetState(@SW_SHOW) $a = MouseGetPos(0) ToolTip(""Open A Project"" & @LF & ""And Press RUN To Execute"", 90, 122, """", 0, 1) While 1 $b = MouseGetPos(0) If $a <> $b Then ToolTip("""") ExitLoop EndIf WEnd While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit Case $how_to_menu ShellExecute(""http://codikia.blogspot.gr/2012/06/tutorial-for-arduino-simulator.html"") Case $exit_menu Exit Case $open_menu $project = FileOpenDialog (""Open Project"", @ScriptDir & ""\\"", ""NAG Projects (*.nag)"", 3) $project_full_name = StringSplit($project, ""\\"") $project_name = $project_full_name[$project_full_name[0]] WinSetTitle(""Arduino Simulator"", """", ""Arduino Simulator V"" & $version & "" - "" & $project_name) If Not @error Then $file = FileOpen($project) $header = FileReadLine($file) If $header = ""NAG FILE V.020"" Or $header = ""NAG FILE V.030"" Then $b = _read_settings_from_file($project) For $i = 0 To 19 _delete_pin($pin, $pin_button, $pin_type_label, $i) $pin_button[$i] = _create_pin_button($i) $pin[$i] = _create_pin_graphic($i) $pin_state[$i] = _set_pin($pin, $pin_button, $i, $b[$i][0], ""LOW"") If $i < 14 Then $pin_type_label[$i] = _create_pin_type_label($i, $b[$i][1] & "". "" & $b[$i][0]) Else $pin_type_label[$i] = _create_pin_type_label($i, $b[$i][0] & "". "" & $b[$i][1]) EndIf Next $c = _read_rules_from_file($project) If UBound($c) = 1 And $c[0] = """" Then MsgBox(16, ""ERROR"", ""The Project Doesn't Have Any Rules"") Else GUICtrlSetState($button_run, $GUI_ENABLE) EndIf GUICtrlDelete($list) #region Create List $List = GUICtrlCreateListView(""Rule|Input A|Is|Value|AND/OR|Input B|Is|Value|Output|Is|Value|Delay"", 530, 10, 540, 460,-1, 0x00000001) _GUICtrlListView_SetColumnWidth($list, 0, 36) _GUICtrlListView_SetColumnWidth($list, 1, 55) _GUICtrlListView_SetColumnWidth($list, 2, 30) _GUICtrlListView_SetColumnWidth($list, 3, 45) _GUICtrlListView_SetColumnWidth($list, 4, 60) _GUICtrlListView_SetColumnWidth($list, 5, 55) _GUICtrlListView_SetColumnWidth($list, 6, 30) _GUICtrlListView_SetColumnWidth($list, 7, 45) _GUICtrlListView_SetColumnWidth($list, 8, 55) _GUICtrlListView_SetColumnWidth($list, 9, 30) _GUICtrlListView_SetColumnWidth($list, 10, 45) _GUICtrlListView_SetColumnWidth($list, 11, 50) #endregion For $i=0 To UBound($c)-2 GUICtrlCreateListViewItem($c[$i], $list) Next Else MsgBox (16, ""ERROR"", ""File Not Compatible"") EndIf EndIf Case $button_run $project_running = 1 GUICtrlSetState($button_stop, $GUI_ENABLE) GUICtrlSetState($button_run, $GUI_DISABLE) $running = GUICtrlCreateLabel(""Running"", 100, 480, 50,25) ; Create a label showing that the simulator is running ;$c = _read_rules_from_file($project) ReDim $virtual_coil[_find_max_virt_coil($c)+1] ReDim $counter[_find_max_counter($c)+1] ReDim $counter_changed[UBound($counter)] For $i=0 To UBound($counter_changed)-1 $counter_changed[$i] = ""First_value"" Next ReDim $timer[UBound($c)-1] For $i=0 To UBound($timer)-1 $timer[$i] = ""ON"" Next ReDim $timer_start[UBound($c)-1] ReDim $timer_diff[UBound($c)-1] ReDim $timer_mark[UBound($c)-1] For $i=0 To UBound($timer_mark)-1 $timer_mark[$i] = 0 Next While $msg <> $button_stop $msg = GUIGetMsg() #region Limit the analog inputs If $project_running = 1 Then For $i=0 To 19 If $b[$i][0] = ""AI"" Then If GUICtrlRead($pin_state[$i]) > 1024 Then GUICtrlSetData($pin_state[$i], 1024) ElseIf GUICtrlRead($pin_state[$i]) < 0 Then GUICtrlSetData($pin_state[$i], 0) EndIf EndIf Next EndIf #endregion #region Toggle DI Buttons If $project_running = 1 Then For $i=0 To 19 If $msg = $pin_button[$i] Then If GUICtrlRead($pin_state[$i]) = ""LOW"" Then $pin_state[$i] = _set_pin($pin, $pin_button, $i, ""DI"", ""HIGH"") ElseIf GUICtrlRead($pin_state[$i]) = ""HIGH"" Then $pin_state[$i] = _set_pin($pin, $pin_button, $i, ""DI"", ""LOW"") EndIf EndIf Next EndIf #endregion For $i=0 To UBound($c)-2 ; Loop over the loops $check_first = _check_rule_input($b, $c, $pin_state, $virtual_coil, $counter, $i, 1) $check_second = _check_rule_input($b, $c, $pin_state, $virtual_coil, $counter, $i, 2) $x = StringSplit($c[$i], ""|"", 2) If $check_first <> ""GOOD"" Or $check_second <> ""GOOD"" Then $timer_mark[$i] = 0 If $i = $counter_changed[StringMid($x[8], 9)]Then $counter_changed[StringMid($x[8], 9)] = ""whatever"" EndIf EndIf If $x[4] = ""OR"" Then If $check_first = ""GOOD"" Or $check_second = ""GOOD"" Then #region Execute the rule output If $timer_mark[$i] = 0 Then If $timer[$i] = ""ON""Then $timer_start[$i] = TimerInit() $timer[$i] = ""OFF"" EndIf EndIf $a=StringSplit($c[$i], ""|"", 2) $timer_diff[$i] = TimerDiff($timer_start[$i]) If $timer_diff[$i] >= $a[11] Then $timer[$i] = ""ON"" $timer_diff[$i] = 0 $timer_mark[$i] = 1 If StringInStr($a[8], ""Virtual_Coil"") <> 0 Then ; Case output is a Virtual coil $virtual_coil[StringMid($a[8], 14)] = $a[10] ElseIf StringInStr($a[8], ""Counter"") <> 0 Then ; Case output is a Counter If $a[9] = ""+"" And $counter_changed[StringMid($a[8], 9)] <> String($i) Then $counter[StringMid($a[8], 9)] += $a[10] $counter_changed[StringMid($a[8], 9)] = $i ElseIf $a[9] = ""-"" And $counter_changed[StringMid($a[8], 9)] <> String($i) Then $counter[StringMid($a[8], 9)] -= $a[10] $counter_changed[StringMid($a[8], 9)] = $i ElseIf $a[9] = ""="" And $counter_changed[StringMid($a[8], 9)] <> String($i) Then $counter[StringMid($a[8], 9)] = $a[10] $counter_changed[StringMid($a[8], 9)] = $i EndIf Else ; case output is a Pin For $j=0 To 19 If $a[8] = $b[$j][1] Then $x = $j ExitLoop EndIf Next If $a[9] = ""="" Then If GUICtrlRead($pin_state[$x]) <> $a[10] Then $pin_state[$x] = _set_pin($pin, $pin_button, $x, $b[$x][0], $a[10]) EndIf ElseIf $a[9] = ""f(x)"" Then $func = StringSplit($a[10], ""\\"", 2) For $h=0 To 19 ; Find the pin number If $func[1] = $b[$h][1] Then $func_pin = $h ExitLoop EndIf Next If $func[2] = ""*"" Then $value = Number(GUICtrlRead($pin_state[$func_pin]) * $func[3]) $value = Int($value*255/1024) ; map the value from the range of 0-1024 to a range of 0-255 If $value > 255 Then $value = 255 If $value < 0 Then $value = 0 If GUICtrlRead($pin_state[$x]) <> $value Then $pin_state[$x] = _set_pin($pin, $pin_button, $x, $b[$x][0], $value) EndIf ElseIf $func[2] = ""/"" Then $value = Number(GUICtrlRead($pin_state[$func_pin]) / $func[3]) $value = Int($value*255/1024) ; map the value from the range of 0-1024 to a range of 0-255 If $value > 255 Then $value = 255 If $value < 0 Then $value = 0 If GUICtrlRead($pin_state[$x]) <> $value Then $pin_state[$x] = _set_pin($pin, $pin_button, $x, $b[$x][0], $value) EndIf ElseIf $func[2] = ""+"" Then $value = Number(GUICtrlRead($pin_state[$func_pin]) + $func[3]) $value = Int($value*255/1024) ; map the value from the range of 0-1024 to a range of 0-255 If $value > 255 Then $value = 255 If $value < 0 Then $value = 0 If GUICtrlRead($pin_state[$x]) <> $value Then $pin_state[$x] = _set_pin($pin, $pin_button, $x, $b[$x][0], $value) EndIf ElseIf $func[2] = ""-"" Then $value = Number(GUICtrlRead($pin_state[$func_pin]) - $func[3]) $value = Int($value*255/1024) ; map the value from the range of 0-1024 to a range of 0-255 If $value > 255 Then $value = 255 If $value < 0 Then $value = 0 If GUICtrlRead($pin_state[$x]) <> $value Then $pin_state[$x] = _set_pin($pin, $pin_button, $x, $b[$x][0], $value) EndIf EndIf EndIf EndIf EndIf #endregion EndIf Else If $check_first = ""GOOD"" And $check_second = ""GOOD"" Then #region Execute the rule output If $timer_mark[$i] = 0 Then If $timer[$i] = ""ON""Then $timer_start[$i] = TimerInit() $timer[$i] = ""OFF"" EndIf EndIf $a=StringSplit($c[$i], ""|"", 2) $timer_diff[$i] = TimerDiff($timer_start[$i]) If $timer_diff[$i] >= $a[11] Then $timer[$i] = ""ON"" $timer_diff[$i] = 0 $timer_mark[$i] = 1 If StringInStr($a[8], ""Virtual_Coil"") <> 0 Then ; Case output is a Virtual coil $virtual_coil[StringMid($a[8], 14)] = $a[10] ElseIf StringInStr($a[8], ""Counter"") <> 0 Then ; Case output is a Counter If $a[9] = ""+"" And $counter_changed[StringMid($a[8], 9)] <> String($i) Then $counter[StringMid($a[8], 9)] += $a[10] $counter_changed[StringMid($a[8], 9)] = $i ElseIf $a[9] = ""-"" And $counter_changed[StringMid($a[8], 9)] <> String($i) Then $counter[StringMid($a[8], 9)] -= $a[10] $counter_changed[StringMid($a[8], 9)] = $i ElseIf $a[9] = ""="" And $counter_changed[StringMid($a[8], 9)] <> String($i) Then $counter[StringMid($a[8], 9)] = $a[10] $counter_changed[StringMid($a[8], 9)] = $i EndIf Else ; case output is a Pin For $j=0 To 19 If $a[8] = $b[$j][1] Then $x = $j ExitLoop EndIf Next If $a[9] = ""="" Then If GUICtrlRead($pin_state[$x]) <> $a[10] Then $pin_state[$x] = _set_pin($pin, $pin_button, $x, $b[$x][0], $a[10]) EndIf ElseIf $a[9] = ""f(x)"" Then $func = StringSplit($a[10], ""\\"", 2) For $h=0 To 19 ; Find the pin number If $func[1] = $b[$h][1] Then $func_pin = $h ExitLoop EndIf Next If $func[2] = ""*"" Then $value = Number(GUICtrlRead($pin_state[$func_pin]) * $func[3]) $value = Int($value*255/1024) ; map the value from the range of 0-1024 to a range of 0-255 If $value > 255 Then $value = 255 If $value < 0 Then $value = 0 If GUICtrlRead($pin_state[$x]) <> $value Then $pin_state[$x] = _set_pin($pin, $pin_button, $x, $b[$x][0], $value) EndIf ElseIf $func[2] = ""/"" Then $value = Number(GUICtrlRead($pin_state[$func_pin]) / $func[3]) $value = Int($value*255/1024) ; map the value from the range of 0-1024 to a range of 0-255 If $value > 255 Then $value = 255 If $value < 0 Then $value = 0 If GUICtrlRead($pin_state[$x]) <> $value Then $pin_state[$x] = _set_pin($pin, $pin_button, $x, $b[$x][0], $value) EndIf ElseIf $func[2] = ""+"" Then $value = Number(GUICtrlRead($pin_state[$func_pin]) + $func[3]) $value = Int($value*255/1024) ; map the value from the range of 0-1024 to a range of 0-255 If $value > 255 Then $value = 255 If $value < 0 Then $value = 0 If GUICtrlRead($pin_state[$x]) <> $value Then $pin_state[$x] = _set_pin($pin, $pin_button, $x, $b[$x][0], $value) EndIf ElseIf $func[2] = ""-"" Then $value = Number(GUICtrlRead($pin_state[$func_pin]) - $func[3]) $value = Int($value*255/1024) ; map the value from the range of 0-1024 to a range of 0-255 If $value > 255 Then $value = 255 If $value < 0 Then $value = 0 If GUICtrlRead($pin_state[$x]) <> $value Then $pin_state[$x] = _set_pin($pin, $pin_button, $x, $b[$x][0], $value) EndIf EndIf EndIf EndIf EndIf #endregion EndIf EndIf Next WEnd $project_running = 0 GUICtrlSetState($button_stop, $GUI_DISABLE) GUICtrlSetState($button_run, $GUI_ENABLE) GUICtrlDelete($running) Case $about_menu $about_win = GUICreate(""About"", 400, 250, 298, 120) GUICtrlCreateLabel(""--- ARDUINO SIMULATOR ----"" & @LF & @LF & @LF & ""Version : V"" & $version & @LF & @LF & ""Date : "" & $release_date & @LF _ & @LF & ""Created By : Liapis Nikos"" & @LF & @LF & ""Special Thanks To : Martin, Melba23 and the Autoit community ""& @LF & @LF & ""Updates Available on :"", 5, 5, 361, 160) $button_link_autoit = GUICtrlCreateButton(""http://www.autoitscript.com/forum/topic/138727-arduino-gui-programmer/"", 5, 165, 380, 25) GUICtrlSetColor(-1, 0x0000FF) $button_link_codikia = GUICtrlCreateButton(""http://codikia.blogspot.com/2012/03/simple-arduino-gui-programmer.html"", 5, 205, 380, 25) GUICtrlSetColor(-1, 0x0000FF) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE ExitLoop Case $button_link_autoit ShellExecute (""http://www.autoitscript.com/forum/topic/138727-arduino-gui-programmer/"") Case $button_link_codikia ShellExecute (""http://codikia.blogspot.com/2012/03/simple-arduino-gui-programmer.html"") EndSwitch WEnd GUIDelete ($about_win) EndSwitch WEnd ; #FUNCTION# ; Name...........: _create_pin_type_label ; Description ...: Create a label showing the state of a pin ; Parameters ....: $pin : The pin to create the label To ; $type : The type of pin to create ; Return values .: The number of counters used in the rules. If no counter used then returns 0 ; ============================================================================================================================================ Func _create_pin_type_label($pin, $type) If $pin <= 7 Then $pin_label = GUICtrlCreateLabel($type, 285, 437-($pin*23), 145) GUICtrlSetColor(-1, 0xff0000) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetStyle(-1, 0x0002) GUICtrlSetFont(-1, 10) ElseIf $pin >= 8 And $pin < 14 Then $pin_label = GUICtrlCreateLabel($type, 285, 241-(($pin-8)*23), 145) GUICtrlSetColor(-1, 0xff0000) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetStyle(-1, 0x0002) GUICtrlSetFont(-1, 10) ElseIf $pin >= 14 Then $pin_label = GUICtrlCreateLabel($type, 137, 323+(($pin-14)*23), 145) GUICtrlSetColor(-1, 0xff0000) GUICtrlSetBkColor(-1, $GUI_BKCOLOR_TRANSPARENT) GUICtrlSetFont(-1, 10) EndIf Return $pin_label EndFunc ; #FUNCTION# ; Name...........: _find_max_counter ; Description ...: Extracts the number of counters used at the project rules ; Parameters ....: $rules_array : Array containing the rules of the project ; Return values .: The number of counters used in the rules. If no counter used then returns 0 ; ============================================================================================================================================ Func _find_max_counter($rules_array) $virt=0 For $i=0 To UBound($rules_array)-1 If StringInStr($rules_array[$i], ""Counter"") <> 0 Then $virt=1 EndIf Next If $virt = 1 Then Local $temp[UBound($rules_array)-1] For $i=0 To UBound($temp)-1 $a=StringSplit($rules_array[$i], ""|"", 2) If StringInStr($a[8], ""Counter"") <> 0 Then $temp[$i] = StringMid($a[8], 9) EndIf Next Return _ArrayMax($temp) Else Return 0 EndIf EndFunc ; #FUNCTION# ; Name...........: _find_max_virt_coil ; Description ...: Extracts the number of virtual coils used at the project rules ; Parameters ....: $rules_array : Array containing the rules of the project ; Return values .: The number of virtual coils used in the rules. If no virtual coil used then returns 0 ; ============================================================================================================================================ Func _find_max_virt_coil($rules_array) $virt=0 For $i=0 To UBound($rules_array)-1 If StringInStr($rules_array[$i], ""Virtual_Coil"") <> 0 Then $virt=1 EndIf Next If $virt = 1 Then Local $temp[UBound($rules_array)-1] For $i=0 To UBound($temp)-1 $a=StringSplit($rules_array[$i], ""|"", 2) If StringInStr($a[8], ""Virtual_Coil"") <> 0 Then $temp[$i] = StringMid($a[8], 14) EndIf Next Return _ArrayMax($temp) Else Return 0 EndIf EndFunc ; #FUNCTION# ; Name...........: _check_rule_input ; Description ...: Checks a specific input (first or second) in a specific rule to see if they match ; Parameters ....: $settings_array : Array containing the pin settings and names (created from the _read_settings_from_file() function) ; $rules_array : Array containing the rules (created from the _read_rules_from_file() function) ; $states : Array containing the controlID's of the labels or input boxes next to the pin (created from the _set_pin() function) ; $virtuals : Array containing the states of virtual coils ; $counters : Array containing the values of counters ; $rule : The number of the rule to match the inputs ; $input : The input to check (first or second) ; Return values .: ""GOOD"" if the input matches with the rule or if the rule is empty in that input ; ""BAD"" if the input doesn't match with the rule ; ============================================================================================================================================ Func _check_rule_input($settings_array, $rules_array, $states, $virtuals, $counters, $rule, $input) Local $in[3] Local $in_pin $result = ""BAD"" If $input = 1 Then $a=StringSplit($rules_array[$rule], ""|"", 2) $in[0] = $a[1] $in[1] = $a[2] $in[2] = $a[3] ElseIf $input = 2 Then $a=StringSplit($rules_array[$rule], ""|"", 2) $in[0] = $a[5] $in[1] = $a[6] $in[2] = $a[7] EndIf If $in[0] = """" Then $result = ""GOOD"" EndIf For $i=0 To 19 If $in[0] = $settings_array[$i][1] Then $in_pin = $i ExitLoop EndIf Next If StringInStr($in[0], ""Virtual_Coil"") <> 0 Then ; Case input is a Virtual Coil If $in[1] = ""="" Then If $virtuals[StringMid($in[0], 14)] = $in[2] Then $result = ""GOOD"" EndIf EndIf ElseIf StringInStr($in[0], ""Counter"") <> 0 Then ; Case input is a Counter If $in[1] = ""="" Then If $counters[StringMid($in[0], 9)] = $in[2] Then $result = ""GOOD"" EndIf ElseIf $in[1] = "">"" Then If $counters[StringMid($in[0], 9)] > $in[2] Then $result = ""GOOD"" EndIf ElseIf $in[1] = ""<"" Then If $counters[StringMid($in[0], 9)] < $in[2] Then $result = ""GOOD"" EndIf ElseIf $in[1] = "">="" Then If $counters[StringMid($in[0], 9)] >= $in[2] Then $result = ""GOOD"" EndIf ElseIf $in[1] = ""<="" Then If $counters[StringMid($in[0], 9)] <= $in[2] Then $result = ""GOOD"" EndIf EndIf Else ; Case input is a Pin If $in[1] = ""="" Then If GUICtrlRead($states[$in_pin]) = $in[2] Then $result = ""GOOD"" EndIf ElseIf $in[1] = "">"" Then If GUICtrlRead($states[$in_pin]) > Number($in[2]) Then $result = ""GOOD"" EndIf ElseIf $in[1] = ""<"" Then If GUICtrlRead($states[$in_pin]) < Number($in[2]) Then $result = ""GOOD"" EndIf ElseIf $in[1] = "">="" Then If GUICtrlRead($states[$in_pin]) >= Number($in[2]) Then $result = ""GOOD"" EndIf ElseIf $in[1] = ""<="" Then If GUICtrlRead($states[$in_pin]) <= Number($in[2]) Then $result = ""GOOD"" EndIf ElseIf $in[1] = ""<<>>"" Then ; Prepei na kano map tis times otan sygkrinontai input me output ;_ArrayDisplay($settings_array) $comp_expr=StringSplit($in[2], ""\\"", 2) For $i=0 To 19 If $comp_expr[1] = $settings_array[$i][1] Then $comp_pin_1 = $i ExitLoop EndIf Next For $i=0 To 19 If $comp_expr[3] = $settings_array[$i][1] Then $comp_pin_2 = $i ExitLoop EndIf Next If $comp_expr[4] = ""="" Then If $comp_expr[2] = ""-"" Then $comp_1_val = GUICtrlRead($states[$comp_pin_1]) $comp_2_val = GUICtrlRead($states[$comp_pin_2]) If $settings_array[$comp_pin_1][0] = ""AO"" Then $comp_1_val = (1024*$comp_1_val)/255 ; If output then map the value to a 0-1024 range If $settings_array[$comp_pin_2][0] = ""AO"" Then $comp_2_val = (1024*$comp_2_val)/255 If $comp_1_val - $comp_2_val = $comp_expr[5] Then $result = ""GOOD"" ElseIf $comp_expr[2] = ""+"" Then $comp_1_val = GUICtrlRead($states[$comp_pin_1]) $comp_2_val = GUICtrlRead($states[$comp_pin_2]) If $settings_array[$comp_pin_1][0] = ""AO"" Then $comp_1_val = (1024*$comp_1_val)/255 ; If output then map the value to a 0-1024 range If $settings_array[$comp_pin_2][0] = ""AO"" Then $comp_2_val = (1024*$comp_2_val)/255 If $comp_1_val + $comp_2_val = $comp_expr[5] Then $result = ""GOOD"" ElseIf $comp_expr[2] = ""/"" Then $comp_1_val = GUICtrlRead($states[$comp_pin_1]) $comp_2_val = GUICtrlRead($states[$comp_pin_2]) If $settings_array[$comp_pin_1][0] = ""AO"" Then $comp_1_val = (1024*$comp_1_val)/255 ; If output then map the value to a 0-1024 range If $settings_array[$comp_pin_2][0] = ""AO"" Then $comp_2_val = (1024*$comp_2_val)/255 If $comp_1_val / $comp_2_val = $comp_expr[5] Then $result = ""GOOD"" ElseIf $comp_expr[2] = ""*"" Then $comp_1_val = GUICtrlRead($states[$comp_pin_1]) $comp_2_val = GUICtrlRead($states[$comp_pin_2]) If $settings_array[$comp_pin_1][0] = ""AO"" Then $comp_1_val = (1024*$comp_1_val)/255 ; If output then map the value to a 0-1024 range If $settings_array[$comp_pin_2][0] = ""AO"" Then $comp_2_val = (1024*$comp_2_val)/255 If $comp_1_val * $comp_2_val = $comp_expr[5] Then $result = ""GOOD"" EndIf ElseIf $comp_expr[4] = "">"" Then If $comp_expr[2] = ""-"" Then $comp_1_val = GUICtrlRead($states[$comp_pin_1]) $comp_2_val = GUICtrlRead($states[$comp_pin_2]) If $settings_array[$comp_pin_1][0] = ""AO"" Then $comp_1_val = (1024*$comp_1_val)/255 ; If output then map the value to a 0-1024 range If $settings_array[$comp_pin_2][0] = ""AO"" Then $comp_2_val = (1024*$comp_2_val)/255 If $comp_1_val - $comp_2_val > $comp_expr[5] Then $result = ""GOOD"" ElseIf $comp_expr[2] = ""+"" Then $comp_1_val = GUICtrlRead($states[$comp_pin_1]) $comp_2_val = GUICtrlRead($states[$comp_pin_2]) If $settings_array[$comp_pin_1][0] = ""AO"" Then $comp_1_val = (1024*$comp_1_val)/255 ; If output then map the value to a 0-1024 range If $settings_array[$comp_pin_2][0] = ""AO"" Then $comp_2_val = (1024*$comp_2_val)/255 If $comp_1_val + $comp_2_val > $comp_expr[5] Then $result = ""GOOD"" ElseIf $comp_expr[2] = ""/"" Then $comp_1_val = GUICtrlRead($states[$comp_pin_1]) $comp_2_val = GUICtrlRead($states[$comp_pin_2]) If $settings_array[$comp_pin_1][0] = ""AO"" Then $comp_1_val = (1024*$comp_1_val)/255 ; If output then map the value to a 0-1024 range If $settings_array[$comp_pin_2][0] = ""AO"" Then $comp_2_val = (1024*$comp_2_val)/255 If $comp_1_val / $comp_2_val > $comp_expr[5] Then $result = ""GOOD"" ElseIf $comp_expr[2] = ""*"" Then $comp_1_val = GUICtrlRead($states[$comp_pin_1]) $comp_2_val = GUICtrlRead($states[$comp_pin_2]) If $settings_array[$comp_pin_1][0] = ""AO"" Then $comp_1_val = (1024*$comp_1_val)/255 ; If output then map the value to a 0-1024 range If $settings_array[$comp_pin_2][0] = ""AO"" Then $comp_2_val = (1024*$comp_2_val)/255 If $comp_1_val * $comp_2_val > $comp_expr[5] Then $result = ""GOOD"" EndIf ElseIf $comp_expr[4] = ""<"" Then If $comp_expr[2] = ""-"" Then $comp_1_val = GUICtrlRead($states[$comp_pin_1]) $comp_2_val = GUICtrlRead($states[$comp_pin_2]) If $settings_array[$comp_pin_1][0] = ""AO"" Then $comp_1_val = (1024*$comp_1_val)/255 ; If output then map the value to a 0-1024 range If $settings_array[$comp_pin_2][0] = ""AO"" Then $comp_2_val = (1024*$comp_2_val)/255 If $comp_1_val - $comp_2_val < $comp_expr[5] Then $result = ""GOOD"" ElseIf $comp_expr[2] = ""+"" Then $comp_1_val = GUICtrlRead($states[$comp_pin_1]) $comp_2_val = GUICtrlRead($states[$comp_pin_2]) If $settings_array[$comp_pin_1][0] = ""AO"" Then $comp_1_val = (1024*$comp_1_val)/255 ; If output then map the value to a 0-1024 range If $settings_array[$comp_pin_2][0] = ""AO"" Then $comp_2_val = (1024*$comp_2_val)/255 If $comp_1_val + $comp_2_val < $comp_expr[5] Then $result = ""GOOD"" ElseIf $comp_expr[2] = ""/"" Then $comp_1_val = GUICtrlRead($states[$comp_pin_1]) $comp_2_val = GUICtrlRead($states[$comp_pin_2]) If $settings_array[$comp_pin_1][0] = ""AO"" Then $comp_1_val = (1024*$comp_1_val)/255 ; If output then map the value to a 0-1024 range If $settings_array[$comp_pin_2][0] = ""AO"" Then $comp_2_val = (1024*$comp_2_val)/255 If $comp_1_val / $comp_2_val < $comp_expr[5] Then $result = ""GOOD"" ElseIf $comp_expr[2] = ""*"" Then $comp_1_val = GUICtrlRead($states[$comp_pin_1]) $comp_2_val = GUICtrlRead($states[$comp_pin_2]) If $settings_array[$comp_pin_1][0] = ""AO"" Then $comp_1_val = (1024*$comp_1_val)/255 ; If output then map the value to a 0-1024 range If $settings_array[$comp_pin_2][0] = ""AO"" Then $comp_2_val = (1024*$comp_2_val)/255 If $comp_1_val * $comp_2_val < $comp_expr[5] Then $result = ""GOOD"" EndIf ElseIf $comp_expr[4] = "">="" Then If $comp_expr[2] = ""-"" Then $comp_1_val = GUICtrlRead($states[$comp_pin_1]) $comp_2_val = GUICtrlRead($states[$comp_pin_2]) If $settings_array[$comp_pin_1][0] = ""AO"" Then $comp_1_val = (1024*$comp_1_val)/255 ; If output then map the value to a 0-1024 range If $settings_array[$comp_pin_2][0] = ""AO"" Then $comp_2_val = (1024*$comp_2_val)/255 If $comp_1_val - $comp_2_val >= $comp_expr[5] Then $result = ""GOOD"" ElseIf $comp_expr[2] = ""+"" Then $comp_1_val = GUICtrlRead($states[$comp_pin_1]) $comp_2_val = GUICtrlRead($states[$comp_pin_2]) If $settings_array[$comp_pin_1][0] = ""AO"" Then $comp_1_val = (1024*$comp_1_val)/255 ; If output then map the value to a 0-1024 range If $settings_array[$comp_pin_2][0] = ""AO"" Then $comp_2_val = (1024*$comp_2_val)/255 If $comp_1_val + $comp_2_val >= $comp_expr[5] Then $result = ""GOOD"" ElseIf $comp_expr[2] = ""/"" Then $comp_1_val = GUICtrlRead($states[$comp_pin_1]) $comp_2_val = GUICtrlRead($states[$comp_pin_2]) If $settings_array[$comp_pin_1][0] = ""AO"" Then $comp_1_val = (1024*$comp_1_val)/255 ; If output then map the value to a 0-1024 range If $settings_array[$comp_pin_2][0] = ""AO"" Then $comp_2_val = (1024*$comp_2_val)/255 If $comp_1_val / $comp_2_val >= $comp_expr[5] Then $result = ""GOOD"" ElseIf $comp_expr[2] = ""*"" Then $comp_1_val = GUICtrlRead($states[$comp_pin_1]) $comp_2_val = GUICtrlRead($states[$comp_pin_2]) If $settings_array[$comp_pin_1][0] = ""AO"" Then $comp_1_val = (1024*$comp_1_val)/255 ; If output then map the value to a 0-1024 range If $settings_array[$comp_pin_2][0] = ""AO"" Then $comp_2_val = (1024*$comp_2_val)/255 If $comp_1_val * $comp_2_val >= $comp_expr[5] Then $result = ""GOOD"" EndIf ElseIf $comp_expr[4] = ""<="" Then If $comp_expr[2] = ""-"" Then $comp_1_val = GUICtrlRead($states[$comp_pin_1]) $comp_2_val = GUICtrlRead($states[$comp_pin_2]) If $settings_array[$comp_pin_1][0] = ""AO"" Then $comp_1_val = (1024*$comp_1_val)/255 ; If output then map the value to a 0-1024 range If $settings_array[$comp_pin_2][0] = ""AO"" Then $comp_2_val = (1024*$comp_2_val)/255 If $comp_1_val - $comp_2_val <= $comp_expr[5] Then $result = ""GOOD"" ElseIf $comp_expr[2] = ""+"" Then $comp_1_val = GUICtrlRead($states[$comp_pin_1]) $comp_2_val = GUICtrlRead($states[$comp_pin_2]) If $settings_array[$comp_pin_1][0] = ""AO"" Then $comp_1_val = (1024*$comp_1_val)/255 ; If output then map the value to a 0-1024 range If $settings_array[$comp_pin_2][0] = ""AO"" Then $comp_2_val = (1024*$comp_2_val)/255 If $comp_1_val + $comp_2_val <= $comp_expr[5] Then $result = ""GOOD"" ElseIf $comp_expr[2] = ""/"" Then $comp_1_val = GUICtrlRead($states[$comp_pin_1]) $comp_2_val = GUICtrlRead($states[$comp_pin_2]) If $settings_array[$comp_pin_1][0] = ""AO"" Then $comp_1_val = (1024*$comp_1_val)/255 ; If output then map the value to a 0-1024 range If $settings_array[$comp_pin_2][0] = ""AO"" Then $comp_2_val = (1024*$comp_2_val)/255 If $comp_1_val / $comp_2_val <= $comp_expr[5] Then $result = ""GOOD"" ElseIf $comp_expr[2] = ""*"" Then $comp_1_val = GUICtrlRead($states[$comp_pin_1]) $comp_2_val = GUICtrlRead($states[$comp_pin_2]) If $settings_array[$comp_pin_1][0] = ""AO"" Then $comp_1_val = (1024*$comp_1_val)/255 ; If output then map the value to a 0-1024 range If $settings_array[$comp_pin_2][0] = ""AO"" Then $comp_2_val = (1024*$comp_2_val)/255 If $comp_1_val * $comp_2_val <= $comp_expr[5] Then $result = ""GOOD"" EndIf ElseIf $comp_expr[4] = ""<>"" Then If $comp_expr[2] = ""-"" Then $comp_1_val = GUICtrlRead($states[$comp_pin_1]) $comp_2_val = GUICtrlRead($states[$comp_pin_2]) If $settings_array[$comp_pin_1][0] = ""AO"" Then $comp_1_val = (1024*$comp_1_val)/255 ; If output then map the value to a 0-1024 range If $settings_array[$comp_pin_2][0] = ""AO"" Then $comp_2_val = (1024*$comp_2_val)/255 If $comp_1_val - $comp_2_val <> $comp_expr[5] Then $result = ""GOOD"" ElseIf $comp_expr[2] = ""+"" Then $comp_1_val = GUICtrlRead($states[$comp_pin_1]) $comp_2_val = GUICtrlRead($states[$comp_pin_2]) If $settings_array[$comp_pin_1][0] = ""AO"" Then $comp_1_val = (1024*$comp_1_val)/255 ; If output then map the value to a 0-1024 range If $settings_array[$comp_pin_2][0] = ""AO"" Then $comp_2_val = (1024*$comp_2_val)/255 If $comp_1_val + $comp_2_val <> $comp_expr[5] Then $result = ""GOOD"" ElseIf $comp_expr[2] = ""/"" Then $comp_1_val = GUICtrlRead($states[$comp_pin_1]) $comp_2_val = GUICtrlRead($states[$comp_pin_2]) If $settings_array[$comp_pin_1][0] = ""AO"" Then $comp_1_val = (1024*$comp_1_val)/255 ; If output then map the value to a 0-1024 range If $settings_array[$comp_pin_2][0] = ""AO"" Then $comp_2_val = (1024*$comp_2_val)/255 If $comp_1_val / $comp_2_val <> $comp_expr[5] Then $result = ""GOOD"" ElseIf $comp_expr[2] = ""*"" Then $comp_1_val = GUICtrlRead($states[$comp_pin_1]) $comp_2_val = GUICtrlRead($states[$comp_pin_2]) If $settings_array[$comp_pin_1][0] = ""AO"" Then $comp_1_val = (1024*$comp_1_val)/255 ; If output then map the value to a 0-1024 range If $settings_array[$comp_pin_2][0] = ""AO"" Then $comp_2_val = (1024*$comp_2_val)/255 If $comp_1_val * $comp_2_val <> $comp_expr[5] Then $result = ""GOOD"" EndIf EndIf EndIf EndIf Return $result EndFunc ; #FUNCTION# ; Name...........: _create_pin_button ; Description ...: Creates the button representing the created pin ; Parameters ....: $pin_number : The number of the pin to create ; Return values .: ControlID of the created button ; ============================================================================================================================================ Func _create_pin_button($pin_number) If $pin_number <= 7 Then If $pin_number=3 Or $pin_number=5 Or $pin_number=6 Then ; If the pin is with PWM (P-ulse W-idth M-odulation) capability then set the apropriate options $a=""~"" Else $a="""" EndIf $button = GUICtrlCreateButton ($pin_number & $a, 460, 436-(23*$pin_number), 25, 17) GUICtrlSetState (-1, $GUI_DISABLE) ElseIf $pin_number >= 8 And $pin_number < 14 Then If $pin_number=9 Or $pin_number=10 Or $pin_number=11 Then $a=""~"" Else $a="""" EndIf $button = GUICtrlCreateButton ($pin_number & $a, 460, 240-(23*($pin_number-8)), 25, 17) GUICtrlSetState (-1, $GUI_DISABLE) ElseIf $pin_number >= 14 Then $button = GUICtrlCreateButton (""A"" & ($pin_number-14), 80, 321+(23*($pin_number-14)), 25, 17) GUICtrlSetState (-1, $GUI_DISABLE) EndIf Return $button EndFunc ; #FUNCTION# ; Name...........: _create_pin_graphic ; Description ...: Creates the graphic representing the created pin ; Parameters ....: $pin_number : ; Return values .: ControlID of the created graphic ; ============================================================================================================================================ Func _create_pin_graphic($pin_number) If $pin_number <= 7 Then $pin_graphic = GUICtrlCreateGraphic(435, 432-($pin_number*23), 17, 21) GUICtrlSetColor(-1, 0x000000) ; Black color GUICtrlSetBkColor(-1, 0xA6CAF0) ; Same color as background ElseIf $pin_number >= 8 And $pin_number < 14 Then $pin_graphic = GUICtrlCreateGraphic(435, 236-(($pin_number-8)*23), 17, 21) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0xA6CAF0) ElseIf $pin_number >= 14 Then $pin_graphic = GUICtrlCreateGraphic(117, 321+(($pin_number-14)*23), 17, 21) GUICtrlSetColor(-1, 0x000000) GUICtrlSetBkColor(-1, 0xA6CAF0) EndIf Return $pin_graphic EndFunc ; #FUNCTION# ; Name...........: _delete_pin ; Description ...: Deletes the pin and the button ; Parameters ....: $pins : Array containing the ControlID's of the graphics representing each pin ; $buttons : Array containing the ControlID's of the buttons representing each pin ; $pin_number : The number of pin to delete ; Return values .: An array containing the ControlID's of the labels or the input boxes created ; ============================================================================================================================================ Func _delete_pin($pins, $buttons, $labels, $pin_number) GUICtrlDelete($pins[$pin_number]) GUICtrlDelete($buttons[$pin_number]) GUICtrlDelete($labels[$pin_number]) EndFunc ; #FUNCTION# ; Name...........: _set_pin($pins, $buttons, $pin_number, $pin_type, $pin_state, $pin_value = 0) ; Description ...: Sets the given pin according to its parameters ; Parameters ....: $pins : Array containing the ControlID's of the graphics representing each pin ; $buttons : Array containing the ControlID's of the buttons representing each pin ; $pin_number : The number of pin to set ; $pin_type : DI or DO or AI or AO ; $pin_state : HIGH or LOW ; $pin_value : The value of the pin (Only in case of an analog pin) ; Return values .: ControlID of the label or the input boxe created ; ============================================================================================================================================ Func _set_pin($pins, $buttons, $pin_number, $pin_type, $pin_state);, $pin_value = 0) $pin_label = """" If $pin_number < 8 Then If $pin_type = ""DI"" Then GUICtrlSetState($buttons[$pin_number], $GUI_ENABLE) If $pin_state = ""LOW"" Then GUICtrlSetBkColor($pins[$pin_number], 0xFF0000) ; Red $pin_label = GUICtrlCreateLabel(""LOW"", 490, 437-($pin_number*23), 30, 21) ElseIf $pin_state = ""HIGH"" Then GUICtrlSetBkColor($pins[$pin_number], 0x00FF00) ; Green $pin_label = GUICtrlCreateLabel(""HIGH"", 490, 437-($pin_number*23), 30, 21) EndIf ElseIf $pin_type = ""DO"" Then If $pin_state = ""LOW"" Then GUICtrlSetBkColor($pins[$pin_number], 0xFF0000) ; Red $pin_label = GUICtrlCreateLabel(""LOW"", 490, 437-($pin_number*23), 30, 21) ElseIf $pin_state = ""HIGH"" Then GUICtrlSetBkColor($pins[$pin_number], 0x00FF00) ; Green $pin_label = GUICtrlCreateLabel(""HIGH"", 490, 437-($pin_number*23), 30, 21) EndIf ElseIf $pin_type = ""AO"" Then GUICtrlSetBkColor($pins[$pin_number], 0x0000FF) ; Blue $pin_label = GUICtrlCreateInput($pin_state, 490, 437-($pin_number*23), 30, 21, 0x0880);;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Else $pin_label = GUICtrlCreateLabel(""-"", 490, 437-($pin_number*23), 30, 21) EndIf ElseIf $pin_number >=8 And $pin_number < 14 Then If $pin_type = ""DI"" Then GUICtrlSetState($buttons[$pin_number], $GUI_ENABLE) If $pin_state = ""LOW"" Then GUICtrlSetBkColor($pins[$pin_number], 0xFF0000) ; Red $pin_label = GUICtrlCreateLabel(""LOW"", 490, 241-(($pin_number-8)*23), 30, 21) ElseIf $pin_state = ""HIGH"" Then GUICtrlSetBkColor($pins[$pin_number], 0x00FF00) ; Green $pin_label = GUICtrlCreateLabel(""HIGH"", 490, 241-(($pin_number-8)*23), 30, 21) EndIf ElseIf $pin_type = ""DO"" Then If $pin_state = ""LOW"" Then GUICtrlSetBkColor($pins[$pin_number], 0xFF0000) ; Red $pin_label = GUICtrlCreateLabel(""LOW"", 490, 241-(($pin_number-8)*23), 30, 21) ElseIf $pin_state = ""HIGH"" Then GUICtrlSetBkColor($pins[$pin_number], 0x00FF00) ; Green $pin_label = GUICtrlCreateLabel(""HIGH"", 490, 241-(($pin_number-8)*23), 30, 21) EndIf ElseIf $pin_type = ""AO"" Then GUICtrlSetBkColor($pins[$pin_number], 0x0000FF) ; Blue $pin_label = GUICtrlCreateInput($pin_state, 490, 241-(($pin_number-8)*23), 30, 21, 0x0880);;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; Else $pin_label = GUICtrlCreateLabel(""-"", 490, 241-(($pin_number-8)*23), 30, 21) EndIf ElseIf $pin_number >= 14 Then If $pin_type = ""DI"" Then GUICtrlSetState($buttons[$pin_number], $GUI_ENABLE) If $pin_state = ""LOW"" Then GUICtrlSetBkColor($pins[$pin_number], 0xFF0000) ; Red $pin_label = GUICtrlCreateLabel(""LOW"", 47, 323+(($pin_number-14)*23), 30, 21) ElseIf $pin_state = ""HIGH"" Then GUICtrlSetBkColor($pins[$pin_number], 0x00FF00) ; Green $pin_label = GUICtrlCreateLabel(""HIGH"", 47, 323+(($pin_number-14)*23), 30, 21) EndIf ElseIf $pin_type = ""DO"" Then If $pin_state = ""LOW"" Then GUICtrlSetBkColor($pins[$pin_number], 0xFF0000) ; Red $pin_label = GUICtrlCreateLabel(""LOW"", 47, 323+(($pin_number-14)*23), 30, 21) ElseIf $pin_state = ""HIGH"" Then GUICtrlSetBkColor($pins[$pin_number], 0x00FF00) ; Green $pin_label = GUICtrlCreateLabel(""HIGH"", 47, 323+(($pin_number-14)*23), 30, 21) EndIf ElseIf $pin_type = ""AI"" Then GUICtrlSetBkColor($pins[$pin_number], 0x0000FF) ; Blue $pin_label = GUICtrlCreateInput("""", 17, 323+(($pin_number-14)*23), 60, 21, 0x0080) GUICtrlCreateUpdown(-1, 0xA0) Else $pin_label = GUICtrlCreateLabel("" -"", 17, 323+(($pin_number-14)*23), 60, 21) EndIf EndIf Return ($pin_label) EndFunc ; #FUNCTION# ; Name...........: _read_rules_from_file ; Description ...: Reads the rules from a file previously created from the _write_project_to_file() function ; Parameters ....: The full name of the file to read from ; Return values .: An array containing the read rules ; ============================================================================================================================================ Func _read_rules_from_file($file_name="""") If $file_name="""" Then $project_name = FileOpenDialog (""Open Project"", @ScriptDir & ""\\"", ""NAG Projects (*.nag)"", 3) Else $project_name = $file_name EndIf Local $rules[1] $file=FileOpen($project_name, 0) While 1 $line = FileReadLine($file) If StringInStr($line, ""Rules_START"") <> 0 Then $x=0 While StringInStr($line, ""Rules_END"") = 0 $line = FileReadLine($file) If StringInStr($line, ""|"") <> 0 Then $rules[$x] = $line ReDim $rules[$x+2] $x += 1 EndIf WEnd ExitLoop EndIf WEnd Return $rules EndFunc ; #FUNCTION# ; Name...........: _read_settings_from_file ; Description ...: Reads the pin settings from a file previously created from the _write_project_to_file() function ; Parameters ....: The full name of the file to read from ; Return values .: An array containing the pin settings and names ; ============================================================================================================================================ Func _read_settings_from_file($file_name="""") If $file_name="""" Then $project_name = FileOpenDialog (""Open Project"", @ScriptDir & ""\\"", ""NAG Projects (*.nag)"", 3) Else $project_name = $file_name EndIf Local $settings[20][2] $file=FileOpen($project_name, 0) While 1 $line = FileReadLine($file) If StringInStr($line, ""Settings_START"") <> 0 Then $x=0 While StringInStr($line, ""Settings_END"") = 0 $line = FileReadLine($file) If StringInStr($line, "":"") <> 0 Then ; without this check script crash $a=StringSplit($line, "":"", 2) $settings[$x][0] = $a[1] $settings[$x][1] = $a[2] $x += 1 EndIf WEnd ExitLoop EndIf WEnd Return $settings EndFunc ",16330,True,3212.5901145760695,median "# # ________ ________ _________ ___ ________ ___ _______ # |\\ __ \\ |\\ __ \\ |\\___ ___\\|\\ \\ |\\ ____\\ |\\ \\ |\\ ___ \\ # \\ \\ \\|\\ \\\\ \\ \\|\\ \\\\|___ \\ \\_|\\ \\ \\\\ \\ \\___| \\ \\ \\ \\ \\ __/| # \\ \\ __ \\\\ \\ _ _\\ \\ \\ \\ \\ \\ \\\\ \\ \\ \\ \\ \\ \\ \\ \\_|/__ # \\ \\ \\ \\ \\\\ \\ \\\\ \\| \\ \\ \\ \\ \\ \\\\ \\ \\____ \\ \\ \\____ \\ \\ \\_|\\ \\ # \\ \\__\\ \\__\\\\ \\__\\\\ _\\ \\ \\__\\ \\ \\__\\\\ \\_______\\\\ \\_______\\\\ \\_______\\ # \\|__|\\|__| \\|__|\\|__| \\|__| \\|__| \\|_______| \\|_______| \\|_______| # ________ ________ ________ _________ ___ ________ ___ ___ ________ ___ ___ ________ # |\\ ____\\ |\\ __ \\ |\\ ___ \\ |\\___ ___\\|\\ \\ |\\ ___ \\ |\\ \\|\\ \\ |\\ __ \\ |\\ \\|\\ \\ |\\ ____\\ # \\ \\ \\___| \\ \\ \\|\\ \\\\ \\ \\\\ \\ \\\\|___ \\ \\_|\\ \\ \\\\ \\ \\\\ \\ \\\\ \\ \\\\\\ \\\\ \\ \\|\\ \\\\ \\ \\\\\\ \\\\ \\ \\___|_ # \\ \\ \\ \\ \\ \\\\\\ \\\\ \\ \\\\ \\ \\ \\ \\ \\ \\ \\ \\\\ \\ \\\\ \\ \\\\ \\ \\\\\\ \\\\ \\ \\\\\\ \\\\ \\ \\\\\\ \\\\ \\_____ \\ # \\ \\ \\____ \\ \\ \\\\\\ \\\\ \\ \\\\ \\ \\ \\ \\ \\ \\ \\ \\\\ \\ \\\\ \\ \\\\ \\ \\\\\\ \\\\ \\ \\\\\\ \\\\ \\ \\\\\\ \\\\|____|\\ \\ # \\ \\_______\\\\ \\_______\\\\ \\__\\\\ \\__\\ \\ \\__\\ \\ \\__\\\\ \\__\\\\ \\__\\\\ \\_______\\\\ \\_______\\\\ \\_______\\ ____\\_\\ \\ # \\|_______| \\|_______| \\|__| \\|__| \\|__| \\|__| \\|__| \\|__| \\|_______| \\|_______| \\|_______||\\_________\\ # \\|_________| # ___ ________ _________ _______ ________ ________ ________ _________ ___ ________ ________ # |\\ \\ |\\ ___ \\ |\\___ ___\\|\\ ___ \\ |\\ ____\\ |\\ __ \\ |\\ __ \\ |\\___ ___\\|\\ \\ |\\ __ \\ |\\ ___ \\ # \\ \\ \\\\ \\ \\\\ \\ \\\\|___ \\ \\_|\\ \\ __/| \\ \\ \\___| \\ \\ \\|\\ \\\\ \\ \\|\\ \\\\|___ \\ \\_|\\ \\ \\\\ \\ \\|\\ \\\\ \\ \\\\ \\ \\ # \\ \\ \\\\ \\ \\\\ \\ \\ \\ \\ \\ \\ \\ \\_|/__\\ \\ \\ ___\\ \\ _ _\\\\ \\ __ \\ \\ \\ \\ \\ \\ \\\\ \\ \\\\\\ \\\\ \\ \\\\ \\ \\ # \\ \\ \\\\ \\ \\\\ \\ \\ \\ \\ \\ \\ \\ \\_|\\ \\\\ \\ \\|\\ \\\\ \\ \\\\ \\|\\ \\ \\ \\ \\ \\ \\ \\ \\ \\ \\\\ \\ \\\\\\ \\\\ \\ \\\\ \\ \\ # \\ \\__\\\\ \\__\\\\ \\__\\ \\ \\__\\ \\ \\_______\\\\ \\_______\\\\ \\__\\\\ _\\ \\ \\__\\ \\__\\ \\ \\__\\ \\ \\__\\\\ \\_______\\\\ \\__\\\\ \\__\\ # \\|__| \\|__| \\|__| \\|__| \\|_______| \\|_______| \\|__|\\|__| \\|__|\\|__| \\|__| \\|__| \\|_______| \\|__| \\|__| # # # # DESCRIPTION: # # Article Continuous Integration (ACI), as the name implies, is a tool to help with # the continuous integration of articles. Specifically, it adds several proprietary # notations to the general Markdown notation. The intended audience for this tool is # anyone who creates technical articles about programming. # # # # FEATURES: # # The following is a list of features provided by ACI. # # - Specifying files in code blocks # - Code block operation # - Visualization of directories by tree structure # - Create a table of contents based on heading # - Expand file contents in list format # - Append the playground URL of the program # # # # NOTATION: # # The content enclosed in ""<>"" indicates a required field, and ""[]"" indicates an # optional field. All """" in the following notation are relative paths. # # # === Specifying files in code blocks # # Expand the source code between """" and """" as a code block. # """" to describe the playground URL of the expanded source code in # addition to the code block. If the file does not exist, the message # ""No such file"" is written in the code block. # If you want the entire contents of the program to be expanded into a code block, # enter a whitespace("" "") in the """" and """" sections. # # ```:::[:url-string]``` # # # === Code block operation # # In addition to the language, a sequence of the above notations can be written # to join source code together. The merging is done in the order in which they # are described. """" is ""::. """" is # aligned with whitespace. There is no limit to the number of joins as long as # no line breaks are made # # ```| ...``` # # # === Visualization of directories by tree structure # # Expands the tree structure of the specified directory as code blocks. # """" is also relative, as is """". # # ```tree:```` # # # === Create a table of contents based on heading # # Expand the table of contents where the following notation is entered: # """" usually describes itself. This is to read your file content # once. """" writes the common content described in ""[]"". # ""[heading-start]"" and ""[heading-end]"" are optional and allow you to specify # the size range of the heading to be treated as a table of contents. Normally, # the range is from 2 to 6, not including h1(#). Note that if you want to specify # 2 to 5, you must also specify 2. # # -_||[|heading-start[|heading-end]] # # # === Expand file contents in list format # # Reads the contents of the specified file line by line and expands it in list # format. The """" can be ""li"" for bulleted or numbered ""ol"" as in normal HTML. # ""[summary-word]"" to enclose the expanded contents in a list format with # ""
"" tags. If """" does not match ""li"" or ""ol"", the character # described is treated as a custom prefix. However, no spaces are allowed. # # -||[|summary-word] # # # === Execution of commands in base file # # Outputs the execution result of the described command as it is. The described # command outputs the same operation results as if the user had entered the command # manually and executed it. Therefore, an error may occur depending on the # authorization. Depending on other proprietary notation methods, this method may be # easier to understand in some cases. # # ! # # # # USAGE: # # Execute the following command and the output results will be displayed on the # command line. No new files are created. # # $ awk -f aci.awk # # To write from the base file to a new file, execute the following command. # # $ awk -f aci.awk > # # It may be better to define it globally as its own command. # # BEGIN { # Languages comment-out format # Due to the nature of awk records, comment-out prefixes across multiple lines are not # used, but single-line comment-out prefixes are used. data[""1""] = """"; data[""1in""] = """"; data[""1m""] = """"; data[""1x""] = """"; data[""2""] = """"; data[""2da""] = """"; data[""3""] = """"; data[""3in""] = """"; data[""3m""] = """"; data[""3p""] = """"; data[""3pm""] = """"; data[""3qt""] = """"; data[""3x""] = """"; data[""4""] = """"; data[""4dm""] = ""//""; data[""4gl""] = """"; data[""4th""] = """"; data[""5""] = """"; data[""6""] = """"; data[""6pl""] = ""#""; data[""6pm""] = ""#""; data[""7""] = """"; data[""8""] = """"; data[""8xk""] = """"; data[""8xp""] = """"; data[""9""] = """"; data[""JSON-tmLanguage""] = """"; data[""OutJob""] = ""#""; data[""PcbDoc""] = ""#""; data[""PrjPCB""] = ""#""; data[""Rprofile""] = """"; data[""SchDoc""] = ""#""; data[""XCompose""] = """"; data[""_coffee""] = """"; data[""_js""] = """"; data[""_ls""] = """"; data[""a51""] = "";""; data[""abap""] = """"; data[""abbrev_defs""] = """"; data[""abnf""] = "";""; data[""ada""] = ""--""; data[""adb""] = """"; data[""adml""] = "" ""h3"" for_url_string = gensub("" "", ""-"", ""g"", line); # Convert "" "" to ""-"" to expand the headline string as-is as a url # Heading 1 is the title, so it is not included in the table of contents if (length(arr[1]) > 1) { hash_sign_length = length(arr[1]); if (start_heading_number - 1 < hash_sign_length && hash_sign_length < end_heading_number + 1) { hash_sign_length = (abs(1 - hash_sign_length) - 1) + hash_sign_length - base_heading_number; # Indentation output for (i = 0; i < hash_sign_length - base_value_correction; i++) { print("" ""); } # Output link string in list format print(sprintf(""- [%s](%s%s)\\n"", line, url_prefix, tolower(for_url_string))); } } } close(cmd); ORS = ""\\n""; } function abs(value) { # Functions that return absolute values value += 0; return value < 0 ? -value : value; } function command_runner_for_expanding_data(type, file_path, summary_word) { OFS = """"; ORS = """"; cmd = sprintf(""awk '{print $0}' %s"", file_path); # To generate an error if the type is wrong if (type == ""li"" || type == ""ol"") { line_count = 1; # Counter variable for ""ol"" if (summary_word != """") { print(sprintf(""
\\n %s\\n\\n"", summary_word)); } while (cmd | getline line) { switch (type) { case ""li"": print(sprintf(""- %s\\n"", line)); break; case ""ol"": print(sprintf(""%d. %s\\n"", line_count, line)); line_count += 1; break; } } close(cmd); # Output the end tag of ""
"" when ""summary_word"" is entered if (summary_word != """") { print(""\\n
\\n""); } } else { if (summary_word != """") { print(sprintf(""
\\n %s\\n\\n"", summary_word)); } while (cmd | getline line) { print(sprintf(""%s %s\\n"", type, line)); } close(cmd); if (summary_word != """") { print(""\\n
\\n""); } } OFS = "" ""; ORS = ""\\n""; } # Create a table of contents from a heading # Notation: -_||[|heading-start[|heading-end]] /^-_\\|.+\\|.+/ { split($0, information, ""|""); information_length = length(information); # Implementation to be tolerant of the presence of ""|"" at the end of lines if (information_length == 3 || information_length == 4) { table_of_contents_generator(information[2], information[3], 2, 6); } else if (information_length == 5 || information_length == 6) { table_of_contents_generator(information[2], information[3], information[4], information[5]); } next; } # Code block generation from program loading # Notation: ```:::``` /^```.+:.+:.+:.+```/ && !/^```.+\\|.+```/ { split($0, code_block, "":""); count = 0; language = code_block[1]; file_path = code_block[2]; start = code_block[3]; end = code_block[4]; cmd = sprintf(""bash -c \\""if [[ -e %s ]]; then echo true; else echo false; fi;\\"""", file_path); sub(""```"", """", language); sub(""```"", """", end); # For files that do not require an extension if (language == "" "") { print(sprintf(""```%s"", file_path)); } else { print(sprintf(""```%s:%s"", language, file_path)); } if (cmd | getline line) { if (line == ""true"") { # For playground if (language == ""rust"" && length(code_block) == 5) { sub(""```"", """", code_block[5]); global_file_path = file_path; global_start = start; global_end = end; global_comment_word = data[language]; global_url_word = code_block[5]; count += 1; } # Stdout source code command_runner(file_path, start, end, data[language]); } else { print(""ERROR: No such file""); } } close(cmd); print(""```""); start = """"; end = """"; # If the counter variable count is greater than 1, that is, if it is a notation for a playground url if (count) { command_runner_for_playground(\\ global_file_path, global_start, global_end, global_comment_word, global_url_word\\ ); } next; } # Code block operation # Notation: ```| ...``` /^```.+\\|(.+\\..+:.+:.+?){2,}```/ { split($0, code_block_for_operation, ""|""); language = code_block_for_operation[1]; targets = code_block_for_operation[2]; sub(""```"", """", language); split(targets, target_list, "" ""); print(sprintf(""```%s"", language)); for (i = 1; i <= length(target_list); i++) { sub(""```"", """", target_list[i]); split(target_list[i], target, "":""); file_path = target[1]; start = target[2]; end = target[3]; cmd = sprintf(""bash -c \\""if [[ -e %s ]]; then echo true; else echo false; fi;\\"""", file_path); if (cmd | getline line) { if (line == ""true"") { command_runner(file_path, start, end, data[language]); } else { print(""ERROR: File does not exist""); } } close(cmd); if (i != length(target_list)) { print(""""); } } print(""```""); next; } # Visuallization of directories by tree structure # Notation: ```tree:``` /^```tree:.+```/ { split($0, splited, "":""); path = gensub(""```"", """", ""g"", splited[2]); cmd = sprintf(""tree %s"", path); line_count = line_counter(cmd); print(""```""); while (cmd | getline line) { if (line_count > 2) { print(line); line_count -= 1; } } close(cmd); print(""```""); next; } # Execution of commands in base file /^!\\s.+/ { # TODO: use substr sub(""! "", """", $0); cmd = $0; while (cmd | getline line) { print(line); } close(cmd); } # Expanding data in a file # Notation: -||[|summary-word] /^\\-\\|.+\\|.+/ { split($0, arr, ""|""); arr_length = length(arr); if (arr_length == 3) { # If you put ""|"" at the end of a line, it is not enclosed in ""
"" command_runner_for_expanding_data(arr[2], arr[3], """"); } else if (arr_length == 4) { command_runner_for_expanding_data(arr[2], arr[3], arr[4]); } next; } # If the notation does not match { print $0; } ",16195,True,3189.7331509269693,median "# take jlcpcb smd parts list extract basic Components BEGIN { FPAT = ""([^ ]+)|(\\""[^\\""]+\\"")"" OFS = "" ""; ORS=""\\n"" # windows end of line FP_R = ""\\""Resistor_SMD:R_0805_2012Metric\\"""" //LCSC Part numbers R0805[""0""] = ""C17477"" R0805[""0.003""] = ""C87224"" R0805[""0.005""] = ""C92742"" R0805[""0.01""] = ""C50732"" R0805[""0.018""] = ""C247597"" R0805[""0.02""] = ""C32681"" R0805[""0.022""] = ""C247595"" R0805[""0.025""] = ""C270868"" R0805[""0.027""] = ""C158161"" R0805[""0.03""] = ""C247605"" R0805[""0.033""] = ""C127689"" R0805[""0.034""] = ""C270855"" R0805[""0.036""] = ""C247592"" R0805[""0.039""] = ""C270865"" R0805[""0.04""] = ""C270864"" R0805[""0.047""] = ""C247603"" R0805[""0.05""] = ""C42380"" R0805[""0.056""] = ""C127709"" R0805[""0.062""] = ""C247601"" R0805[""0.068""] = ""C247600"" R0805[""0.075""] = ""C247586"" R0805[""0.082""] = ""C247599"" R0805[""0.1""] = ""C22424"" R0805[""0.11""] = ""C53899"" R0805[""0.12""] = ""C36235"" R0805[""0.13""] = ""C247446"" R0805[""0.14""] = ""C247445"" R0805[""0.15""] = ""C36231"" R0805[""0.16""] = ""C34388"" R0805[""0.18""] = ""C78033"" R0805[""0.2""] = ""C44051"" R0805[""0.22""] = ""C36234"" R0805[""0.24""] = ""C247159"" R0805[""0.25""] = ""C46216"" R0805[""0.27""] = ""C47782"" R0805[""0.3""] = ""C24084"" R0805[""0.33""] = ""C52548"" R0805[""0.36""] = ""C247017"" R0805[""0.39""] = ""C78470"" R0805[""0.4""] = ""C247134"" R0805[""0.43""] = ""C24082"" R0805[""0.47""] = ""C25040"" R0805[""0.5""] = ""C28319"" R0805[""0.51""] = ""C55618"" R0805[""0.56""] = ""C25266"" R0805[""0.62""] = ""C34142"" R0805[""0.68""] = ""C47389"" R0805[""0.75""] = ""C63832"" R0805[""0.82""] = ""C25267"" R0805[""0.91""] = ""C17478"" R0805[""1""] = ""C25271"" R0805[""1.02M""] = ""C57821"" R0805[""1.02k""] = ""C17369"" R0805[""1.05""] = ""C247114"" R0805[""1.05k""] = ""C17370"" R0805[""1.07""] = ""C247113"" R0805[""1.07k""] = ""C17476"" R0805[""1.1""] = ""C17376"" R0805[""1.13M""] = ""C189663"" R0805[""1.13k""] = ""C17371"" R0805[""1.15""] = ""C17373"" R0805[""1.15k""] = ""C17372"" R0805[""1.18""] = ""C247112"" R0805[""1.18k""] = ""C17374"" R0805[""1.1M""] = ""C62137"" R0805[""1.1k""] = ""C17375"" R0805[""1.2""] = ""C17381"" R0805[""1.21M""] = ""C189661"" R0805[""1.21k""] = ""C17377"" R0805[""1.24""] = ""C247111"" R0805[""1.24k""] = ""C17378"" R0805[""1.27k""] = ""C40880"" R0805[""1.2M""] = ""C17380"" R0805[""1.2k""] = ""C17379"" R0805[""1.3""] = ""C17385"" R0805[""1.33k""] = ""C17382"" R0805[""1.37M""] = ""C189664"" R0805[""1.37k""] = ""C17383"" R0805[""1.3M""] = ""C26109"" R0805[""1.3k""] = ""C17384"" R0805[""1.4""] = ""C57643"" R0805[""1.43""] = ""C247110"" R0805[""1.43M""] = ""C189665"" R0805[""1.43k""] = ""C17386"" R0805[""1.47""] = ""C68930"" R0805[""1.47M""] = ""C189666"" R0805[""1.47k""] = ""C17387"" R0805[""1.4M""] = ""C367825"" R0805[""1.4k""] = ""C17388"" R0805[""1.5""] = ""C17392"" R0805[""1.54""] = ""C247109"" R0805[""1.54k""] = ""C17389"" R0805[""1.58""] = ""C247108"" R0805[""1.58k""] = ""C17390"" R0805[""1.5M""] = ""C26110"" R0805[""1.5k""] = ""C4310"" R0805[""1.6""] = ""C25272"" R0805[""1.62""] = ""C247107"" R0805[""1.62M""] = ""C189667"" R0805[""1.62k""] = ""C30040"" R0805[""1.65""] = ""C247106"" R0805[""1.65k""] = ""C17393"" R0805[""1.69k""] = ""C48183"" R0805[""1.6M""] = ""C26111"" R0805[""1.6k""] = ""C17394"" R0805[""1.74""] = ""C17396"" R0805[""1.74k""] = ""C17395"" R0805[""1.78k""] = ""C17397"" R0805[""1.8""] = ""C17400"" R0805[""1.82""] = ""C247105"" R0805[""1.82k""] = ""C56827"" R0805[""1.87k""] = ""C42161"" R0805[""1.8M""] = ""C17399"" R0805[""1.8k""] = ""C17398"" R0805[""1.91""] = ""C57644"" R0805[""1.91M""] = ""C189669"" R0805[""1.91k""] = ""C17401"" R0805[""1.96""] = ""C247104"" R0805[""1.96k""] = ""C17479"" R0805[""10""] = ""C17415"" R0805[""10.2""] = ""C17403"" R0805[""10.2k""] = ""C17402"" R0805[""10.5""] = ""C17404"" R0805[""10.5k""] = ""C40086"" R0805[""10.7""] = ""C17406"" R0805[""10.7k""] = ""C17405"" R0805[""100""] = ""C17408"" R0805[""100M""] = ""C169373"" R0805[""100k""] = ""C17407"" R0805[""102""] = ""C17409"" R0805[""102k""] = ""C40372"" R0805[""105""] = ""C17411"" R0805[""105k""] = ""C17410"" R0805[""107""] = ""C17413"" R0805[""107k""] = ""C17412"" R0805[""10M""] = ""C26108"" R0805[""10k""] = ""C17414"" R0805[""11""] = ""C17430"" R0805[""11.3""] = ""C17417"" R0805[""11.3k""] = ""C17416"" R0805[""11.5""] = ""C17419"" R0805[""11.5k""] = ""C17418"" R0805[""11.8""] = ""C17421"" R0805[""11.8k""] = ""C17420"" R0805[""110""] = ""C17423"" R0805[""110k""] = ""C17422"" R0805[""113""] = ""C17425"" R0805[""113k""] = ""C17424"" R0805[""115""] = ""C17426"" R0805[""118""] = ""C17428"" R0805[""118k""] = ""C17427"" R0805[""11k""] = ""C17429"" R0805[""12""] = ""C17445"" R0805[""12.1""] = ""C17432"" R0805[""12.1k""] = ""C17431"" R0805[""12.4""] = ""C17433"" R0805[""12.4k""] = ""C30908"" R0805[""12.7""] = ""C17435"" R0805[""12.7k""] = ""C17434"" R0805[""120""] = ""C17437"" R0805[""120k""] = ""C17436"" R0805[""121""] = ""C17439"" R0805[""121k""] = ""C17438"" R0805[""124""] = ""C17441"" R0805[""124k""] = ""C17440"" R0805[""127""] = ""C17443"" R0805[""127k""] = ""C17442"" R0805[""12M""] = ""C53725"" R0805[""12k""] = ""C17444"" R0805[""13""] = ""C25268"" R0805[""13.3""] = ""C17447"" R0805[""13.3k""] = ""C17446"" R0805[""13.7""] = ""C17449"" R0805[""13.7k""] = ""C17448"" R0805[""130""] = ""C17451"" R0805[""130k""] = ""C17450"" R0805[""133""] = ""C17453"" R0805[""133k""] = ""C17452"" R0805[""137""] = ""C17454"" R0805[""137k""] = ""C48674"" R0805[""13M""] = ""C41713"" R0805[""13k""] = ""C17455"" R0805[""14""] = ""C17465"" R0805[""14.3""] = ""C17457"" R0805[""14.3k""] = ""C17456"" R0805[""14.7""] = ""C17459"" R0805[""14.7k""] = ""C17458"" R0805[""140""] = ""C44385"" R0805[""140k""] = ""C17460"" R0805[""143""] = ""C17461"" R0805[""143k""] = ""C247044"" R0805[""147""] = ""C17463"" R0805[""147k""] = ""C17462"" R0805[""14k""] = ""C17464"" R0805[""15""] = ""C17480"" R0805[""15.4""] = ""C17467"" R0805[""15.4k""] = ""C17466"" R0805[""15.8""] = ""C17469"" R0805[""15.8k""] = ""C17468"" R0805[""150""] = ""C17471"" R0805[""150k""] = ""C17470"" R0805[""154""] = ""C17473"" R0805[""154k""] = ""C17472"" R0805[""158""] = ""C247043"" R0805[""158k""] = ""C17474"" R0805[""15M""] = ""C42861"" R0805[""15k""] = ""C17475"" R0805[""16""] = ""C17491"" R0805[""16.2""] = ""C17482"" R0805[""16.2k""] = ""C17481"" R0805[""16.5""] = ""C17483"" R0805[""16.5k""] = ""C35929"" R0805[""16.9""] = ""C189656"" R0805[""16.9k""] = ""C17484"" R0805[""160""] = ""C25269"" R0805[""160k""] = ""C17485"" R0805[""162""] = ""C35721"" R0805[""162k""] = ""C17486"" R0805[""165""] = ""C17487"" R0805[""165k""] = ""C65869"" R0805[""169""] = ""C17489"" R0805[""169k""] = ""C17488"" R0805[""16M""] = ""C41952"" R0805[""16k""] = ""C17490"" R0805[""17.4""] = ""C189657"" R0805[""17.4k""] = ""C19796"" R0805[""17.8""] = ""C17492"" R0805[""17.8k""] = ""C75250"" R0805[""174""] = ""C17494"" R0805[""174k""] = ""C17493"" R0805[""178""] = ""C17496"" R0805[""178k""] = ""C17495"" R0805[""18""] = ""C17507"" R0805[""18.2""] = ""C17498"" R0805[""18.2k""] = ""C17497"" R0805[""18.7""] = ""C17500"" R0805[""18.7k""] = ""C17499"" R0805[""180""] = ""C25270"" R0805[""180k""] = ""C17501"" R0805[""182""] = ""C17503"" R0805[""182k""] = ""C17502"" R0805[""187""] = ""C17505"" R0805[""187k""] = ""C17504"" R0805[""18M""] = ""C65241"" R0805[""18k""] = ""C17506"" R0805[""19.1""] = ""C17509"" R0805[""19.1k""] = ""C17508"" R0805[""19.6""] = ""C247042"" R0805[""19.6k""] = ""C17510"" R0805[""191""] = ""C247041"" R0805[""191k""] = ""C17511"" R0805[""196k""] = ""C17512"" R0805[""1M""] = ""C17514"" R0805[""1k""] = ""C17513"" R0805[""2""] = ""C17606"" R0805[""2.05""] = ""C247103"" R0805[""2.05k""] = ""C17515"" R0805[""2.15""] = ""C31608"" R0805[""2.15k""] = ""C17516"" R0805[""2.1k""] = ""C17517"" R0805[""2.2""] = ""C17521"" R0805[""2.21""] = ""C247101"" R0805[""2.21M""] = ""C247102"" R0805[""2.21k""] = ""C17518"" R0805[""2.26M""] = ""C189670"" R0805[""2.26k""] = ""C17519"" R0805[""2.2M""] = ""C26113"" R0805[""2.2k""] = ""C17520"" R0805[""2.32k""] = ""C17522"" R0805[""2.37k""] = ""C17523"" R0805[""2.4""] = ""C17528"" R0805[""2.43""] = ""C247100"" R0805[""2.43M""] = ""C189671"" R0805[""2.43k""] = ""C17524"" R0805[""2.49""] = ""C17525"" R0805[""2.49M""] = ""C83497"" R0805[""2.49k""] = ""C83387"" R0805[""2.4M""] = ""C17527"" R0805[""2.4k""] = ""C17526"" R0805[""2.55k""] = ""C32136"" R0805[""2.5M""] = ""C153398"" R0805[""2.61""] = ""C247099"" R0805[""2.61k""] = ""C17529"" R0805[""2.67k""] = ""C27571"" R0805[""2.7""] = ""C17532"" R0805[""2.74k""] = ""C26009"" R0805[""2.7M""] = ""C17531"" R0805[""2.7k""] = ""C17530"" R0805[""2.8""] = ""C17535"" R0805[""2.87""] = ""C247098"" R0805[""2.87M""] = ""C189672"" R0805[""2.87k""] = ""C17533"" R0805[""2.8k""] = ""C17534"" R0805[""2.94k""] = ""C17536"" R0805[""20""] = ""C17544"" R0805[""20.3k""] = ""C149984"" R0805[""20.5""] = ""C17538"" R0805[""20.5k""] = ""C17537"" R0805[""200""] = ""C17540"" R0805[""200k""] = ""C17539"" R0805[""205""] = ""C17542"" R0805[""205k""] = ""C17541"" R0805[""20M""] = ""C37801"" R0805[""20k""] = ""C4328"" R0805[""21""] = ""C17551"" R0805[""21.5""] = ""C17546"" R0805[""21.5k""] = ""C17545"" R0805[""210""] = ""C17548"" R0805[""210k""] = ""C17547"" R0805[""215""] = ""C17549"" R0805[""215k""] = ""C247040"" R0805[""21k""] = ""C17550"" R0805[""22""] = ""C17561"" R0805[""22.1""] = ""C17553"" R0805[""22.1k""] = ""C17552"" R0805[""22.6""] = ""C17555"" R0805[""22.6k""] = ""C12825"" R0805[""220""] = ""C17557"" R0805[""220k""] = ""C17556"" R0805[""221""] = ""C17558"" R0805[""221k""] = ""C75431"" R0805[""226""] = ""C17559"" R0805[""226k""] = ""C247039"" R0805[""22M""] = ""C34719"" R0805[""22k""] = ""C17560"" R0805[""23.2""] = ""C17563"" R0805[""23.2k""] = ""C17562"" R0805[""23.7""] = ""C17565"" R0805[""23.7k""] = ""C17564"" R0805[""232""] = ""C17567"" R0805[""232k""] = ""C17566"" R0805[""237""] = ""C247038"" R0805[""237k""] = ""C17568"" R0805[""24""] = ""C17576"" R0805[""24.3""] = ""C17570"" R0805[""24.3k""] = ""C17569"" R0805[""24.9""] = ""C66212"" R0805[""24.9k""] = ""C17571"" R0805[""240""] = ""C17572"" R0805[""240k""] = ""C25824"" R0805[""243""] = ""C67632"" R0805[""243k""] = ""C17573"" R0805[""249""] = ""C84373"" R0805[""249k""] = ""C25825"" R0805[""24k""] = ""C17575"" R0805[""25.5""] = ""C17577"" R0805[""25.5k""] = ""C46670"" R0805[""255""] = ""C17579"" R0805[""255k""] = ""C17578"" R0805[""25k""] = ""C63863"" R0805[""26.1""] = ""C17580"" R0805[""26.1k""] = ""C47183"" R0805[""26.7""] = ""C17582"" R0805[""26.7k""] = ""C17581"" R0805[""261""] = ""C17584"" R0805[""261k""] = ""C17583"" R0805[""267""] = ""C17586"" R0805[""267k""] = ""C17585"" R0805[""27""] = ""C17594"" R0805[""27.4""] = ""C17588"" R0805[""27.4k""] = ""C17587"" R0805[""270""] = ""C17590"" R0805[""270k""] = ""C17589"" R0805[""274""] = ""C17592"" R0805[""274k""] = ""C17591"" R0805[""27k""] = ""C17593"" R0805[""28""] = ""C17601"" R0805[""28.7""] = ""C17596"" R0805[""28.7k""] = ""C17595"" R0805[""280""] = ""C247037"" R0805[""280k""] = ""C17597"" R0805[""287""] = ""C17599"" R0805[""287k""] = ""C17598"" R0805[""28k""] = ""C17600"" R0805[""29.4""] = ""C17603"" R0805[""29.4k""] = ""C17602"" R0805[""294""] = ""C247036"" R0805[""294k""] = ""C17605"" R0805[""2M""] = ""C26112"" R0805[""2k""] = ""C17604"" R0805[""3""] = ""C17660"" R0805[""3.01""] = ""C247097"" R0805[""3.01k""] = ""C41006"" R0805[""3.09k""] = ""C17607"" R0805[""3.16""] = ""C247096"" R0805[""3.16k""] = ""C52603"" R0805[""3.24k""] = ""C17609"" R0805[""3.3""] = ""C16257"" R0805[""3.32""] = ""C247095"" R0805[""3.32k""] = ""C32391"" R0805[""3.3M""] = ""C34154"" R0805[""3.3k""] = ""C26010"" R0805[""3.4""] = ""C247093"" R0805[""3.48""] = ""C247094"" R0805[""3.48k""] = ""C72936"" R0805[""3.4k""] = ""C17608"" R0805[""3.57""] = ""C247092"" R0805[""3.57k""] = ""C17613"" R0805[""3.6""] = ""C17610"" R0805[""3.65k""] = ""C17611"" R0805[""3.6M""] = ""C35710"" R0805[""3.6k""] = ""C18359"" R0805[""3.74k""] = ""C65649"" R0805[""3.83""] = ""C247091"" R0805[""3.83k""] = ""C27536"" R0805[""3.9""] = ""C17615"" R0805[""3.92""] = ""C247090"" R0805[""3.92k""] = ""C17612"" R0805[""3.9M""] = ""C35709"" R0805[""3.9k""] = ""C17614"" R0805[""30""] = ""C17622"" R0805[""30.1""] = ""C247035"" R0805[""30.1k""] = ""C21841"" R0805[""30.9""] = ""C247034"" R0805[""30.9k""] = ""C16107"" R0805[""300""] = ""C17617"" R0805[""300k""] = ""C17616"" R0805[""301""] = ""C17618"" R0805[""301k""] = ""C17619"" R0805[""309""] = ""C17620"" R0805[""309k""] = ""C57148"" R0805[""30M""] = ""C407362"" R0805[""30k""] = ""C17621"" R0805[""31.6""] = ""C17624"" R0805[""31.6k""] = ""C17623"" R0805[""316""] = ""C105609"" R0805[""32.4""] = ""C17625"" R0805[""32.4k""] = ""C36938"" R0805[""324""] = ""C17627"" R0805[""324k""] = ""C17626"" R0805[""33""] = ""C17634"" R0805[""33.2""] = ""C17628"" R0805[""33.2k""] = ""C37252"" R0805[""330""] = ""C17630"" R0805[""330k""] = ""C17629"" R0805[""332""] = ""C17632"" R0805[""332k""] = ""C17631"" R0805[""33k""] = ""C17633"" R0805[""34""] = ""C17641"" R0805[""34.8""] = ""C17635"" R0805[""34.8k""] = ""C53718"" R0805[""340""] = ""C17637"" R0805[""340k""] = ""C17636"" R0805[""348""] = ""C17639"" R0805[""348k""] = ""C17638"" R0805[""34k""] = ""C17640"" R0805[""35.7""] = ""C17642"" R0805[""35.7k""] = ""C42792"" R0805[""357""] = ""C52534"" R0805[""357k""] = ""C17643"" R0805[""36""] = ""C36524"" R0805[""36.5""] = ""C17644"" R0805[""36.5k""] = ""C35928"" R0805[""360""] = ""C17646"" R0805[""360k""] = ""C17645"" R0805[""365""] = ""C63500"" R0805[""365k""] = ""C17647"" R0805[""36k""] = ""C4360"" R0805[""37.4""] = ""C79787"" R0805[""37.4k""] = ""C62728"" R0805[""374""] = ""C30515"" R0805[""374k""] = ""C17649"" R0805[""38.3""] = ""C17651"" R0805[""38.3k""] = ""C17650"" R0805[""383""] = ""C17653"" R0805[""383k""] = ""C17652"" R0805[""39""] = ""C17659"" R0805[""39.2""] = ""C17654"" R0805[""39.2k""] = ""C60005"" R0805[""390""] = ""C17655"" R0805[""390k""] = ""C17656"" R0805[""392""] = ""C17658"" R0805[""392k""] = ""C17657"" R0805[""39k""] = ""C25826"" R0805[""3M""] = ""C26117"" R0805[""3k""] = ""C17661"" R0805[""4.02M""] = ""C247089"" R0805[""4.02k""] = ""C17663"" R0805[""4.12""] = ""C247088"" R0805[""4.12k""] = ""C17664"" R0805[""4.22""] = ""C247087"" R0805[""4.22k""] = ""C17665"" R0805[""4.3""] = ""C17669"" R0805[""4.32""] = ""C247086"" R0805[""4.32k""] = ""C17666"" R0805[""4.3M""] = ""C17668"" R0805[""4.3k""] = ""C17667"" R0805[""4.42""] = ""C65847"" R0805[""4.42k""] = ""C71067"" R0805[""4.53""] = ""C247085"" R0805[""4.53k""] = ""C17670"" R0805[""4.64""] = ""C247084"" R0805[""4.64k""] = ""C17671"" R0805[""4.7""] = ""C17675"" R0805[""4.75""] = ""C247083"" R0805[""4.75k""] = ""C17672"" R0805[""4.7M""] = ""C17674"" R0805[""4.7k""] = ""C17673"" R0805[""4.87""] = ""C247082"" R0805[""4.87k""] = ""C17676"" R0805[""4.99""] = ""C25273"" R0805[""4.99M""] = ""C247081"" R0805[""4.99k""] = ""C17677"" R0805[""40.2""] = ""C17679"" R0805[""40.2k""] = ""C17678"" R0805[""402""] = ""C17681"" R0805[""402k""] = ""C17680"" R0805[""41.2""] = ""C17683"" R0805[""41.2k""] = ""C17682"" R0805[""412""] = ""C17685"" R0805[""412k""] = ""C17684"" R0805[""42.2""] = ""C17687"" R0805[""42.2k""] = ""C17686"" R0805[""422""] = ""C17689"" R0805[""422k""] = ""C17688"" R0805[""43""] = ""C4368"" R0805[""43.2""] = ""C17691"" R0805[""43.2k""] = ""C17690"" R0805[""430""] = ""C42000"" R0805[""430k""] = ""C17692"" R0805[""432""] = ""C17694"" R0805[""432k""] = ""C17693"" R0805[""43k""] = ""C17695"" R0805[""44.2""] = ""C17698"" R0805[""44.2k""] = ""C17697"" R0805[""442""] = ""C17700"" R0805[""442k""] = ""C17699"" R0805[""45.3""] = ""C62325"" R0805[""45.3k""] = ""C17701"" R0805[""453""] = ""C17703"" R0805[""453k""] = ""C17702"" R0805[""46.4""] = ""C17705"" R0805[""46.4k""] = ""C17704"" R0805[""464""] = ""C17707"" R0805[""464k""] = ""C17706"" R0805[""47""] = ""C17714"" R0805[""47.5""] = ""C17708"" R0805[""47.5k""] = ""C26011"" R0805[""470""] = ""C17710"" R0805[""470k""] = ""C17709"" R0805[""475""] = ""C17712"" R0805[""475k""] = ""C17711"" R0805[""47M""] = ""C407394"" R0805[""47k""] = ""C17713"" R0805[""48.7""] = ""C17716"" R0805[""48.7k""] = ""C17715"" R0805[""487""] = ""C17718"" R0805[""487k""] = ""C17717"" R0805[""49.9""] = ""C17720"" R0805[""49.9k""] = ""C17719"" R0805[""499""] = ""C17722"" R0805[""499k""] = ""C75783"" R0805[""5.1""] = ""C17724"" R0805[""5.11""] = ""C247080"" R0805[""5.11k""] = ""C46039"" R0805[""5.1M""] = ""C26114"" R0805[""5.1k""] = ""C27834"" R0805[""5.23k""] = ""C17739"" R0805[""5.36""] = ""C247079"" R0805[""5.36k""] = ""C17725"" R0805[""5.49k""] = ""C17726"" R0805[""5.6""] = ""C17729"" R0805[""5.62k""] = ""C21437"" R0805[""5.6M""] = ""C17728"" R0805[""5.6k""] = ""C4382"" R0805[""5.76""] = ""C247078"" R0805[""5.76k""] = ""C16108"" R0805[""5.9""] = ""C53726"" R0805[""5.9k""] = ""C17730"" R0805[""50k""] = ""C63865"" R0805[""51""] = ""C17738"" R0805[""51.1""] = ""C17732"" R0805[""51.1k""] = ""C17731"" R0805[""510""] = ""C17734"" R0805[""510k""] = ""C17733"" R0805[""511""] = ""C17736"" R0805[""511k""] = ""C17735"" R0805[""51k""] = ""C17737"" R0805[""52.3""] = ""C17741"" R0805[""52.3k""] = ""C17740"" R0805[""523""] = ""C17743"" R0805[""523k""] = ""C17742"" R0805[""53.6""] = ""C17744"" R0805[""53.6k""] = ""C21398"" R0805[""536""] = ""C17746"" R0805[""536k""] = ""C17745"" R0805[""54.9""] = ""C17748"" R0805[""54.9k""] = ""C17747"" R0805[""549""] = ""C17750"" R0805[""549k""] = ""C17749"" R0805[""56""] = ""C17757"" R0805[""56.2""] = ""C17752"" R0805[""56.2k""] = ""C17751"" R0805[""560""] = ""C28636"" R0805[""560k""] = ""C15785"" R0805[""562""] = ""C17755"" R0805[""562k""] = ""C17754"" R0805[""56k""] = ""C17756"" R0805[""57.6""] = ""C17759"" R0805[""57.6k""] = ""C17758"" R0805[""576""] = ""C17761"" R0805[""576k""] = ""C17760"" R0805[""59""] = ""C25274"" R0805[""590""] = ""C55566"" R0805[""590k""] = ""C17762"" R0805[""59k""] = ""C17763"" R0805[""5k""] = ""C78980"" R0805[""6.04k""] = ""C17765"" R0805[""6.19k""] = ""C17766"" R0805[""6.2""] = ""C17768"" R0805[""6.2M""] = ""C63172"" R0805[""6.2k""] = ""C17767"" R0805[""6.34k""] = ""C19797"" R0805[""6.49""] = ""C247077"" R0805[""6.49k""] = ""C17769"" R0805[""6.65k""] = ""C17770"" R0805[""6.8""] = ""C17774"" R0805[""6.81M""] = ""C43252"" R0805[""6.81k""] = ""C17771"" R0805[""6.8M""] = ""C17773"" R0805[""6.8k""] = ""C17772"" R0805[""6.98""] = ""C247076"" R0805[""6.98k""] = ""C17775"" R0805[""60.4""] = ""C72998"" R0805[""60.4k""] = ""C48806"" R0805[""604""] = ""C17777"" R0805[""604k""] = ""C17776"" R0805[""61.9""] = ""C17779"" R0805[""61.9k""] = ""C17778"" R0805[""619""] = ""C17781"" R0805[""619k""] = ""C17780"" R0805[""62""] = ""C17784"" R0805[""620""] = ""C17782"" R0805[""620k""] = ""C25827"" R0805[""62k""] = ""C17783"" R0805[""63.4""] = ""C17786"" R0805[""63.4k""] = ""C17785"" R0805[""634""] = ""C17787"" R0805[""634k""] = ""C247031"" R0805[""64.9""] = ""C17789"" R0805[""64.9k""] = ""C17788"" R0805[""649""] = ""C247030"" R0805[""649k""] = ""C17790"" R0805[""66.5""] = ""C17792"" R0805[""66.5k""] = ""C17791"" R0805[""665""] = ""C17794"" R0805[""665k""] = ""C17793"" R0805[""68""] = ""C17802"" R0805[""68.1""] = ""C17796"" R0805[""68.1k""] = ""C17795"" R0805[""680""] = ""C17798"" R0805[""680k""] = ""C17797"" R0805[""681""] = ""C17800"" R0805[""681k""] = ""C17799"" R0805[""68M""] = ""C407354"" R0805[""68k""] = ""C17801"" R0805[""69.8""] = ""C17804"" R0805[""69.8k""] = ""C17803"" R0805[""698""] = ""C27535"" R0805[""698k""] = ""C17805"" R0805[""7.15""] = ""C247075"" R0805[""7.15k""] = ""C17806"" R0805[""7.32k""] = ""C35729"" R0805[""7.5""] = ""C17809"" R0805[""7.5M""] = ""C17808"" R0805[""7.5k""] = ""C17807"" R0805[""7.68k""] = ""C30041"" R0805[""7.87k""] = ""C17810"" R0805[""71.5""] = ""C17812"" R0805[""71.5k""] = ""C17811"" R0805[""715""] = ""C17813"" R0805[""715k""] = ""C48770"" R0805[""73.2""] = ""C17815"" R0805[""73.2k""] = ""C17814"" R0805[""732""] = ""C37998"" R0805[""732k""] = ""C17816"" R0805[""75""] = ""C17820"" R0805[""750""] = ""C17818"" R0805[""750k""] = ""C17817"" R0805[""75k""] = ""C17819"" R0805[""76.8""] = ""C189660"" R0805[""76.8k""] = ""C17821"" R0805[""768""] = ""C17823"" R0805[""768k""] = ""C17822"" R0805[""78.7""] = ""C17824"" R0805[""78.7k""] = ""C26012"" R0805[""787""] = ""C17826"" R0805[""787k""] = ""C17825"" R0805[""8.06""] = ""C247074"" R0805[""8.06k""] = ""C19006"" R0805[""8.2""] = ""C17830"" R0805[""8.25M""] = ""C67619"" R0805[""8.25k""] = ""C17827"" R0805[""8.2M""] = ""C17829"" R0805[""8.2k""] = ""C17828"" R0805[""8.45k""] = ""C17831"" R0805[""8.66k""] = ""C17832"" R0805[""8.87k""] = ""C37551"" R0805[""80.6""] = ""C17833"" R0805[""80.6k""] = ""C41949"" R0805[""806""] = ""C17834"" R0805[""806k""] = ""C63494"" R0805[""82""] = ""C17841"" R0805[""82.5""] = ""C17836"" R0805[""82.5k""] = ""C17835"" R0805[""820""] = ""C17837"" R0805[""820k""] = ""C50136"" R0805[""825""] = ""C17839"" R0805[""825k""] = ""C17838"" R0805[""82k""] = ""C17840"" R0805[""84.5""] = ""C17843"" R0805[""84.5k""] = ""C17842"" R0805[""845""] = ""C17845"" R0805[""845k""] = ""C17844"" R0805[""86.6""] = ""C17847"" R0805[""86.6k""] = ""C17846"" R0805[""866""] = ""C17849"" R0805[""866k""] = ""C17848"" R0805[""88.7""] = ""C17851"" R0805[""88.7k""] = ""C17850"" R0805[""887""] = ""C17853"" R0805[""887k""] = ""C17852"" R0805[""9""] = ""C247071"" R0805[""9.09k""] = ""C17854"" R0805[""9.1""] = ""C17857"" R0805[""9.1M""] = ""C17856"" R0805[""9.1k""] = ""C17855"" R0805[""9.53""] = ""C247073"" R0805[""9.53k""] = ""C17858"" R0805[""9.76""] = ""C247072"" R0805[""9.76k""] = ""C17859"" R0805[""90""] = ""C247027"" R0805[""90.9""] = ""C17861"" R0805[""90.9k""] = ""C17860"" R0805[""900k""] = ""C247029"" R0805[""909""] = ""C17863"" R0805[""909k""] = ""C17862"" R0805[""90k""] = ""C247028"" R0805[""91""] = ""C4407"" R0805[""910""] = ""C17865"" R0805[""910k""] = ""C17864"" R0805[""91k""] = ""C17866"" R0805[""93.1""] = ""C17870"" R0805[""93.1k""] = ""C17869"" R0805[""931""] = ""C17872"" R0805[""931k""] = ""C17871"" R0805[""95.3""] = ""C17874"" R0805[""95.3k""] = ""C17873"" R0805[""953""] = ""C17876"" R0805[""953k""] = ""C17875"" R0805[""97.6""] = ""C17878"" R0805[""97.6k""] = ""C17877"" R0805[""976""] = ""C17880"" R0805[""976k""] = ""C17879"" R0805[""9k""] = ""C247026"" } function r_value_index( instring ) { val = match( instring, /[^""]+[^""]/) found = ""#error"" if (val) { instring = substr(instring, RSTART, RLENGTH) val = match( instring, /[MkKR][0-9]+/) if (val){ if (RLENGTH == 1){ found = substr(instring,1, RSTART-1) substr(instring,RSTART,1) } else { found = substr(instring,1, RSTART-1) ""."" substr(instring,RSTART+1) substr(instring,RSTART,1) } instring = found } val = match( instring, /R/) if (val){ instring = substr(instring,1, RSTART-1) } val = match( instring, /K/) if (val){ instring = tolower(instring) } } return instring } function JLCPCB_output( ) { if (add_lcsc ) { if ( fp ~ FP_R ){ value = r_value_index(value) lcsc = """" f_field += 1 if (value in R0805){ lcsc = R0805[value] } print ""F "" f_field "" \\"""" lcsc ""\\"" "" orientation "" "" posx "" "" posy "" "" size "" 0001 "" justify "" "" style "" \\""LCSC\\""""; fp ="""" } add_lcsc = 0 } ERROR_output() } function ERROR_output( ) { if (add_error ){ f_field += 1 print ""F "" f_field "" \\"""" error_msg ""\\"" "" orientation "" "" posx "" "" posy "" "" size "" 0000 "" justify "" "" style "" \\""ERROR\\""""; add_error = 0 } } $1 ~ /\\$Comp/ { Component = 1; print $0 ; next; } $1 ~ /\\$EndComp/ { # add a field JLCPCB_output() Component = 0 print $0; next; } { if (Component != 1 ){ print $0 ; next; } } $1 ~ /L/ { add_lcsc = 0 device = $2 # name reference # ($2 ~ /Device:C/) match capacitor # ($2 ~ /Device:R/) match R } $1 ~ /U/ { # time stamp } $1 ~ /P/ { # position posx = $2; posy = $3; } $1 ~ /F/ { f_field = $2 if ($2 ~ /0/) { # reference, orientation, posx, posy, size, flags, hor_justify, style, <“field_name”> ref = $3; orientation = $4; size = $7; flags = $8 ; justify = $9 ; style = $10 } if ($2 ~ /1/) { # value, orientation, posx, posy, size, flags, hor_justify, style value = $3 } if ($2 ~ /2/) { # footprint, orientation, posx, posy, size, flags, hor_justify, style fp = $3; if (device ~ /Device:R/){ if ( fp ~ ""\\""\\""""){ fp = FP_R $3 = FP_R $0 = $0 } add_lcsc = 1 } } if ($2 ~ /3/) { # datasheet, orientation, posx, posy, size, flags, hor_justify, style } if ( $11 ~ /LCSC/){ if ( fp ~ FP_R ){ rindex = r_value_index(value) if (rindex in R0805){ if ($3 !~ R0805[rindex] ){ add_error = 1 error_msg = ""expected "" R0805[rindex] } } } add_lcsc = 0 } } $1 !~ /F/ { JLCPCB_output( ) } { print $0; next; } ",16220,True,4931.498147413654,median "#!/usr/bin/awk -f # # $Id$ # ######################################################################## # # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed # with this work for additional information regarding copyright # ownership. The ASF licenses this file to you under the Apache # License, Version 2.0 (the ""License""); you may not use this file # except in compliance with the License. You may obtain a copy of # the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an ""AS IS"" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or # implied. See the License for the specific language governing # permissions and limitations under the License. # ######################################################################## # # SYNOPSIS # myname [bodyonly=0|1 logdir= version=] logs... # # VARIABLES: # bodyonly when non-zero, suppresses the tags # logdir # version stdcxx version (branch) to generate results for. # ######################################################################## BEGIN { # array of component counts for each section and component # compcnts [section, compname] # array of lists of component names for each section with # each list maintaining the same order as in the logs # sectcomponents [section] # map of [FILENAME,components] to component status # compstatuses [FILENAME, compcnts] sectnames [1] = ""locale"" sectnames [2] = ""test"" sectnames [3] = ""example"" # names of build stages buildstages [1] = ""config"" buildstages [2] = ""lib"" buildstages [3] = ""examples"" buildstages [4] = ""bin"" buildstages [5] = ""tests"" buildstages [6] = ""runall"" buildstages [7] = ""total"" # displayed and cout as failures states [""ASSERT""] = 1 states [""BUILD""] = 1 states [""COMP""] = 1 states [""DIFF""] = 1 states [""EXEC""] = 1 states [""FORMAT""] = 1 states [""EXIT""] = 1 states [""LINK""] = 1 states [""SIGNAL""] = 1 # displayed but don't cout as failures states [""OUTPUT""] = -1 states [""WARN""] = -1 # expected failures are displayed but not counted as failures states [""XASSERT""] = -1 states [""XBUILD""] = -1 states [""XCOMP""] = -1 states [""XDIFF""] = -1 states [""XEXEC""] = -1 states [""XFORMAT""] = -1 states [""XEXIT""] = -1 states [""XLINK""] = -1 states [""XPASS""] = -1 states [""XSIGNAL""] = -1 # not displayed and doesn't cout as a failure states [""MISS""] = 0 states [""OK""] = 0 # add all states/classes that count as failures to failclasses for (e in states) { if (1 == states [e]) failclasses [e] } # month numbers used to format dates monthnames [""Jan""] = 1 monthnames [""Feb""] = 2 monthnames [""Mar""] = 3 monthnames [""Apr""] = 4 monthnames [""May""] = 5 monthnames [""Jun""] = 6 monthnames [""Jul""] = 7 monthnames [""Aug""] = 8 monthnames [""Sep""] = 9 monthnames [""Oct""] = 10 monthnames [""Nov""] = 11 monthnames [""Dec""] = 12 # mapping from build type to the more descriptive build mode buildmodes [""8a""] = ""shared archive, optimized"" buildmodes [""8A""] = ""shared archive, optimized, wide"" buildmodes [""8d""] = ""shared, optimized"" buildmodes [""8D""] = ""shared, optimized, wide"" buildmodes [""8s""] = ""archive, optimized"" buildmodes [""8S""] = ""archive, optimized, wide"" buildmodes [""11a""] = ""shared archive, debug"" buildmodes [""11A""] = ""shared archive, debug, wide"" buildmodes [""11d""] = ""shared, debug"" buildmodes [""11D""] = ""shared, debug, wide"" buildmodes [""11s""] = ""archive, debug"" buildmodes [""11S""] = ""archive, debug, wide"" buildmodes [""12a""] = ""shared archive, optimized, reentrant"" buildmodes [""12A""] = ""shared archive, optimized, reentrant, wide"" buildmodes [""12d""] = ""shared, optimized, reentrant"" buildmodes [""12D""] = ""shared, optimized, reentrant, wide"" buildmodes [""12s""] = ""archive, optimized, reentrant"" buildmodes [""12S""] = ""archive, optimized, reentrant, wide"" buildmodes [""15a""] = ""shared archive, debug, reentrant"" buildmodes [""15A""] = ""shared archive, debug, reentrant, wide"" buildmodes [""15d""] = ""shared, debug, reentrant"" buildmodes [""15D""] = ""shared, debug, reentrant, wide"" buildmodes [""15s""] = ""archive, debug, reentrant"" buildmodes [""15S""] = ""archive, debug, reentrant, wide"" # regular expression to match a name (e.g., compiler or OS) re_name = ""[A-Za-z][A-Za-z_0-9]*"" # regular expression to match a version string (includes 0) re_version = ""[0-9]+(\\\\.[0-9]+)*"" # regular expression matching the buildtype string re_buildtype = ""(8|11|12|15)[aAdDsS](-(solaris|win32))?"" # regular expresssion matching a log file name re_logname = re_name ""-"" re_version \\ ""-"" re_name ""-"" re_name ""-"" re_version \\ ""-"" re_buildtype ""-"" ""[1-9][0-9]*-log"" # get today's date cmd = ""LC_ALL=C date"" cmd | getline todays_date close(cmd) # set the conversion format to two decimal places CONVFMT = ""%.3g"" # field separator character (not an awk variable) FSEP = ""|"" } # BEGIN ######################################################################## # detect the type of file 1 == FNR { if (svnpath == """") { # initialize svnpath using version (assume trunk by default) svnpath = ""http://svn.apache.org/viewvc/stdcxx"" if (version == """" || version == ""trunk"") svnpath = svnpath ""/trunk"" else svnpath = svnpath ""/branches/"" version } section = 0 if (0 == match(FILENAME, re_logname)) { # treat files whose names don't match the log file name pattern # as lists of expected failures expect_file = 1 } else { expect_file = 0 logsections [FILENAME] = 0 logcompcnts [1, FILENAME] = 0 logcompcnts [2, FILENAME] = 0 logcompcnts [3, FILENAME] = 0 ++logcount # append the current log file name to the list logfnames [logcount] = FILENAME } } # process file containing specification of expected failures 1 == expect_file && $1 ~ ""^[^#][^#]"" { if (1 == index($0, "" "")) { # component specification continued from previous line cont = 1 } else { compname = $1 cont = 0 } pattern = $(2 - cont) status = $(3 - cont) comment = $(4 - cont) # convert shell globbing pattern to a regular expression by # escaping periods and replacing astersisks with "".*"" and # question marks with ""."" gsub(""\\\\."", ""\\\\."", pattern) gsub(""\\\\*"", "".*"", pattern) gsub(""\\\\?"", ""."", pattern) # if patter contains an open brace expand it using the shell if (0 < index(pattern, ""{"")) { cmd = ""echo "" pattern cmd | getline pattern close(cmd) } # split the (potentially expanded) pattern into an array n = split(pattern, patlist, "" "") spec = """" sep = """" # concatenate the array of expanded patters, the status, # and the comment, to form a single specification for (i = 1; i <= n; ++i) { spec = spec sep patlist [i] "" "" status "" "" comment sep = "":"" } # insert the specification to the expected_statuses array if (compname in nexpected_statuses) spec = expected_statuses [compname] "":"" spec expected_statuses [compname] = spec # skip the actions below next } ######################################################################## # logfile only processing below # extract operating system name and its version, and hardware # architecture (if possible) /^ *#+ *uname / { getline uname_output = $0 osname = $1 osver = """" osdesc = uname_output arch = """" archdesc = """" if (osname == ""AIX"") { # AIX 2 5 00CBEEBE4C00 osver = $4 ""."" $3 arch = ""PowerPC"" } else if (osname ~ ""^CYGWIN"") { # CYGWIN_NT-5.1 1.5.24(0.156/4/2) 2007-01-31 10:57 i686 Cygwin osname = ""Cygwin"" osver = substr($3, 1, index($3, ""("") - 1) pos = match(uname_output, "" i[2-6]86 "") if (0 < pos) { arch = substr(uname_output, pos + 1, 4) } else if (uname_output ~ "" x86 "") { arch = ""x86"" } } else if (osname == ""FreeBSD"") { # osver = $3 } else if (osname == ""HP-UX"") { # HP-UX B.11.31 U ia64 3417177861 unlimited-user license # HP-UX B.11.23 U 9000/800 3952255646 unlimited-user license # HP-UX B.11.11 U 9000/800 1936254444 unlimited-user license osver = $3 arch = $5 } else if (osname == ""IRIX64"") { # IRIX64 6.5 04101930 IP27 osver = $3 arch = ""MIPS"" } else if (osname == ""Linux"") # Linux #1 SMP x86_64 x86_64 x86_64 GNU/Linux osver = """" else if (osname == ""SunOS"") { # SunOS Generic_118855-33 i86pc i386 i86pc # SunOS Generic_118833-33 sun4u sparc SUNW,Sun-Fire-V215 # SunOS Generic_117350-43 sun4u sparc SUNW,Sun-Fire-V240 osver = $3 if (0 < index($0, ""sparc"")) arch = ""SPARC"" else arch = ""x86"" } else if (osname == ""OSF1"") { # OSF1 V5.1 1885 alpha osver = $3 } logos [FILENAME] = osname "" "" osver FSEP osdesc FSEP arch FSEP archdesc } # extract Linux distro name and version /^ *#+ *cat *\\/etc\\/.*-release/ { getline if (1 == match($1, ""^LSB_VERSION"")) getline osname = """" osver = """" osdesc = $0 arch = """" archdesc = """" # Red Hat Enterprise Linux Server release 5 (Tikanga) # Red Hat Enterprise Linux AS release 4 (Nahant Update 4) # Red Hat Enterprise Linux AS release 4 (Nahant Update 2) # Red Hat Enterprise Linux AS release 3 (Taroon Update 8) # SUSE Linux Enterprise Server 10 (x86_64) # SUSE LINUX Enterprise Server 9 (x86_64) # remove the Red Hat code name including the release # and keep the distribution code name and update info: # RHEL 5: Tikanga (Update 1 through 2) # RHEL 4: Nahant (Update 1 through 6) # RHEL 3: Taroon (Update 1 through 9) # RHEL 2.1 AS: Pensacola # RHEL 2.1 ES: Panama if (""RedHat"" == $1 $2) { if (""EnterpriseLinux"" == $3 $4) { if (""AS"" == $5) osname = ""RHAS"" else if (""ES"" == $5) osname = ""RHES"" else if (""WS"" == $5) osname = ""RHWS"" else osname = ""RHEL"" } else osname = ""RHL"" match($0, ""release "" re_version) if (0 < RSTART) osver = substr($0, RSTART + 8, RLENGTH - 8) match($0, ""Update [1-9][0-9]*"") if (0 < RSTART) osver = osver ""."" substr($0, RSTART + 7, RLENGTH - 7) else osver = osver "".0"" } else if ($1 == ""SUSE"") { osname = ""SLES"" osver = $5 } logos [FILENAME] = osname "" "" osver FSEP osdesc FSEP arch FSEP archdesc } # extract x86 processor name and version /^ *#+ *cat *\\/proc\\/cpuinfo/ { arch = """" archdesc = """" # look for CPU manufacturer and other goodies in the contents # of /proc/cpuinfo do { getline if ($1 $2 $3 == ""modelname:"") { $1 = """" # model $2 = """" # name $3 = """" # : archdesc = $0 } if ($1 $2 == ""arch:"") { $1 = """" # arch $2 = """" # : arch = $0 } if ($1 $2 == ""family:"") { $1 = """" # family $2 = """" # : if (arch == """") arch = ""IA64"" archdesc = $0 } if (arch != """" && archdesc != """") break } while (0 < NF) # bail if no architecture could be determined if (arch == """" && archdesc == """") next # strip leading whitespace (result of assigning $N = """") archdesc = substr(archdesc, match(archdesc, ""[A-Za-z]"")) n = split(logos [FILENAME], platfields, FSEP) osname = platfields [1] osdesc = platfields [2] # arch = platfields [3] # archdesc = platfields [4] if (uname_output ~ "" x86_64 "") { if (archdesc ~ ""Intel\\\\(R\\\\)"") arch = ""EM64T"" else if (archdesc ~ ""AMD "") arch = ""AMD64"" else arch = ""x86_64"" } else if (uname_output ~ "" ia64 "") { if (arch == """") arch = ""IA64"" } else if (arch == """") { pos = match(uname_output, "" i[3456]86 "") if (0 < pos) arch = substr(uname_output, pos + 1, 4) else if (uname_output ~ "" x86 "") arch = ""x86"" } logos [FILENAME] = osname FSEP osdesc FSEP arch FSEP archdesc } # extract processor architecture info on Windows /^PROCESSOR_IDENTIFIER=/ { n = split(logos [FILENAME], platfields, FSEP) osname = platfields [1] osdesc = platfields [2] arch = platfields [3] archdesc = substr($0, index($0, ""="") + 1) if ("""" == arch) arch = substr(archdesc, 1, index(archdesc, "" "") - 1) logos [FILENAME] = osname FSEP osdesc FSEP arch FSEP archdesc } # extract the (POSIX) build date and time (date output) /^ *#+ *date *: *$/ { getline logdates [FILENAME] = $0 } # extract the Windows build date (date /T output) />date *\\/T *$/ { getline logdates [FILENAME] = $0 } # extract compiler name and version /^configuring stdcxx / { cxxdesc = $5 pos = index(cxxdesc, ""-"") if (0 < pos) { cxxname = substr(cxxdesc, 1, pos - 1) cxxver = substr(cxxdesc, pos + 1) } else cxxname = cxxdesc if (cxxname == ""aCC"") cxxname = ""HP aCC"" else if (cxxname == ""CC"" && uname_output ~ ""^IRIX64"") cxxname = ""SGI MIPSpro"" else if (cxxname == ""cxx"" && uname_output ~ ""^OSF1"") cxxname = ""HP C++"" else if (cxxname == ""eccp"") cxxname = ""EDG eccp"" else if (cxxname == ""icc"") cxxname = ""Intel C++"" else if (cxxname ~ ""^xlC"") cxxname = ""IBM XLC++"" logos [FILENAME] = logos [FILENAME] FSEP cxxname "" "" cxxver FSEP cxxdesc } # extract compiler name and version (Visual Studio build) /^Configuring for / { cxxdesc = $3 pos = index(cxxdesc, ""-"") if (0 < pos) { cxxname = substr(cxxdesc, 1, pos - 1) cxxver = substr(cxxdesc, pos + 1) } else cxxname = cxxdesc if (cxxname == ""msvc"") cxxname = ""MSVC"" else if (cxxname = ""icc"") cxxname = ""Intel C++"" logos [FILENAME] = logos [FILENAME] FSEP cxxname "" "" cxxver FSEP cxxdesc } # extract compiler name and version (Visual Studio build) /^Selected compiler: / { $1 = """" $2 = """" cxxdesc = $0 if (cxxdesc ~ ""Intel.*C++"") { cxxname = ""Intel C++"" cxxver = $5 } else { cxxname = $1 "" "" $2 cxxver = $3 } logos [FILENAME] = logos [FILENAME] FSEP cxxname "" "" cxxver FSEP cxxdesc } # see if the library failed to configure or build (UNIX) /^g?make: \\*\\*\\* \\[(config|lib)\\] Error/ { buildstatus [FILENAME] = ""LIB"" } # see if the library failed to configure or build (Windows) /.stdcxx - [1-9][0-9]* error(s), [1-9][0-9]* warning(s)/ { buildstatus [FILENAME] = ""LIB"" } # extract the real, user and system times for the children of the shell # that executed the commands from the log # the format of the output is: # # # with looking like: # [1-9][0-9]*m[1-9][0-9]s # and with being the output of the POSIX standard times # built-in utility, i.e., the first line giving the system and user times # for the shell and the second line giving the system and user times for # its children in the format: # ""%dm%fs %dm%fs"" # we don't care about the shell times, just the times for its children, # so we skip that line /^ *#+ real, user, system time \\(/ { stage = substr($6, 2, index($6, "")"") - 2); getline # real time times = $0 getline # ignore shell times getline # times for all children pos = index($0, "" "") times = times FSEP substr($0, 1, pos - 1) times = times FSEP substr($0, pos + 1) # times is: FSEP FSEP logstagetimes [FILENAME, stage] = times } # extract the size of the library /^ *#+ ls -l/ { while (0 < NF) { size = $5 getline } libsizes [FILENAME] = size } # extract the full build size or the size after the clean target /^ *#+ *du -sk / { getline if (FILENAME in buildsizes) cleansizes [FILENAME] = $1 else buildsizes [FILENAME] = $1 } # count the number of (make) errors /^g?make: \\*\\*\\* \\[.*\\] Error /{ ++logerrors [FILENAME] } # count the number of (Visual Studio) errors / - [1-9][0-9]* error\\(s\\), [1-9][0-9]* warning\\(s\\)/{ if (cxxname ~ ""^MSVC"") ++logerrors [FILENAME] } # count the number of warnings /[^A-Z_0-9](WARNING|[Ww]arning)[^A-Z_0-9]/ { # if the library hasn't been seen yet count this as a library warning if (!(FILENAME in libsizes)) ++libwarnings [FILENAME] else ++logwarnings [FILENAME] } # action at the beginning of component table /^NAME *STATUS WARN/ { start = 1 ++section ++logsections [FILENAME] logcompcnts [section, FILENAME] = 0 # skip this record next } # end of component table /^PROGRAM SUMMARY:$/ { start = 0 } 0 == start { # skip this record next } # component (locale, example, or test) section 1 == start { # store the name of the component compname = $1 # trim suffix from component name sub(""(\\\\.bat|\\\\.exe|\\\\.sh)$"", """", compname) # store the component status compstatus = $2 # the default expected status is empty (no record for it exists) expect = """" comment = """" # append the component name to the list of component names # for the current section if (0 == ((section, compname) in compcnts)) sectcomponents [section] = sectcomponents [section] "" "" compname # increment the number of times the current component occurs # in the current section across all logs ++compcnts [section, compname] # increment the number of components in the current section # and log ++logcompcnts [section, FILENAME] # if appropriate, increase the maximum number of components # across all logs if (sectmaxcompcnts [section] < logcompcnts [section, FILENAME]) sectmaxcompcnts [section] = logcompcnts [section, FILENAME] # look up the component's name in the array of components each # with a record of the platform(s) and the expecred status of # the component on the platform(s), something like # ""aix-.*-ppc-.*-.*-12{d,D} SEGV STDCXX-123"" # "":linux.*-.*-gcc ABRT STDCXX-345"" # ^ ^ ^ # | | | # | | +-- required comment (issue) # | +-- expected component status # +-- platform matching ERE pattern if (compname in expected_statuses) expspec = expected_statuses [compname] else expspec = """" # split the list of platforms/expected statuses into an array # with one element for each status and a pattern matching one # or more platforms n = split(expspec, slist, "":"") for (i = 1; i <= n; ++i) { # get the platform matching pattern, expected status, and # the required comment split(slist [i], fields, "" "") # try to match the log file name against the specified pattern if (match(FILENAME, fields [1])) { # extract the expected component status and the comment expect = fields [2] comment = fields [3] break } } # class (determins the color of the cell), value (the text displayed # in the cell), and the optional detail for the cell class = """" value = """" detail = """" # compstatus: # :[]:[] if (0 == compstatus) { # successful exit status: component built but may have failed # assertions or runtime warnings class = ""OK"" if (3 != section) { # locales and tests but not examples runwarns = $3 # number of runtime warnings asserts = $4 # number of assertions tried failed = $5 # number of failed assertions if (0 < failed) { # non-zero number of assertions class = ""ASSERT"" value = failed detail = asserts } else if (0 < runwarns) { # non-zero runtime warnings class = ""RUNWARN"" value = ""("" runwarns "")"" } } if (expect != """") { if (""OK"" == class && expect != class) { # unexpected success class = ""XPASS"" value = ""XPASS
(X"" expect "")"" detail = ""unexpected success"" } else if (""OK"" != class) { # expected status doesn't match ++xmatchcounts [section, FILENAME] value = value ""
"" expect } } } else if (0 < compstatus && compstatus < 256) { # non-zero exit status class = ""EXIT"" value = compstatus if (expect != """") { if (expect == value) { # actual exit status matches the expected status ++xfailcounts [section, FILENAME] class = ""X"" class } else { ++xmatchcounts [section, FILENAME] value = value ""
(X"" expect "")"" detail = ""expected failure doesn't match actual status"" } } } else if ( ""COMP"" == compstatus \\ || ""DIFF"" == compstatus \\ || ""FORMAT"" == compstatus \\ || ""LINK"" == compstatus \\ || ""NOUT"" == compstatus \\ || ""OUTPUT"" == compstatus) { # DIFF unexpected (example) output # FORMAT unexpected (test) output format # NOUT no (test) output # OUTPUT no (example) master output file class = compstatus if (expect != """") { if (expect == class) { # actual status matches expected status ++xfailcounts [section, FILENAME] class = ""X"" class } else { # actual status doesn't match expected status ++xmatchcounts [section, FILENAME] value = class ""
(X"" expect "")"" detail = ""expected failure doesn't match actual status"" } } } else { # signal class = ""SIGNAL"" value = compstatus if (expect != """") { if (expect == value) { # received signal matches the expected signal ++xfailcounts [section, FILENAME] # prepend ""X"" to the class/value to indicate that # the signal was expected class = ""X"" class value = ""X"" value } else { # received signal doesn't match expected status ++xmatchcounts [section, FILENAME] value = value ""
(X"" expect "")"" detail = ""expected failure doesn't match actual status"" } } } compstatus = class "":"" value "":"" detail compstatuses [section, FILENAME, compname] = compstatus } # locale section 1 == section && 1 == start { } # test section 2 == section && 1 == start { } # example section 3 == section && 1 == start { } ######################################################################## # functions function get_date(fulldate) { n = split(fulldate, fields) if (2 == n) { # assume Windows 'date /T' format (i.e., ""AbWeekDay MM/DD/YYYY"") date = fields [2] split(date, fields, ""/"") date = (0 + fields [1]) ""/"" (0 + fields [2]) } else if (2 < n) { # assume POSIX standard 'date' format in the ""C"" locale # i.e., ""AbWeekDay AbMon D HH:MM:SS $TZ YYYY"" month = fields [2] mday = fields [3] date = monthnames [month] ""/"" mday } else date = ""N/A"" return date } function get_time(fulldate) { split(fulldate, fields) return fields [4] } # extracts operating system name and version from the log file name function get_osname(fname) { # strip directory prefix from filename pos = match(fname, "".*/"") if (0 < pos) fname = substr(fname, RLENGTH + 1) # strip anything after the first dash pos = match(fname, ""-"") if (0 == pos) return """" osname = substr(fname, 1, pos - 1) # TO DO: extract version here return osname } # extracts the build type from the log file name function get_buildtype(fname) { # look for the beginning of the buildtype component followed # by the (Subversion) revision number pos = match(fname, ""-(8|11|12|15)[aAdDsS]-[1-9][0-9]*-log"") # is not found, try looking for the buildtype followed by # the name of the threads library and only then followed # by the (Subversion) revision number if (0 == pos) pos = match(fname, ""-(8|11|12|15)[aAdDsS]-[a-z][a-z_0-9]*-[1-9][0-9]*-log*"") buildtype = substr(fname, pos + 1) pos = index(buildtype, ""-"") buildtype = substr(buildtype, 1, pos - 1) return buildtype } function get_dispname(section, compname) { dir = """" if (1 == section) { # compose a URL pointing to the character set description # file and the locale defintion file in the repository pos = index(compname, ""."") if (0 < pos) { locale = substr(compname, 1, pos - 1) codeset = substr(compname, pos + 1); url = svnpath ""/etc/nls/src/"" locale ""?view=markup"" dispname = """" locale """" url = svnpath ""/etc/nls/charmaps/"" codeset ""?view=markup"" dispname = dispname ""."" codeset """" } else { dispname = compname } } else if (2 == section) { dir = ""tests"" if (match(compname, ""\\\\.stdcxx-"")) dir = dir ""/regress"" else if (match(compname, ""^0\\\\."")) dir = dir ""/self"" else if (match(compname, ""^17\\\\."")) dir = dir ""/intro"" else if (match(compname, ""^18\\\\."")) dir = dir ""/support"" else if (match(compname, ""^19\\\\."")) dir = dir ""/diagnostics"" else if (match(compname, ""^20\\\\."")) dir = dir ""/utilities"" else if (match(compname, ""^21\\\\."")) dir = dir ""/strings"" else if (match(compname, ""^22\\\\."")) dir = dir ""/localization"" else if (match(compname, ""^23\\\\."")) dir = dir ""/containers"" else if (match(compname, ""^24\\\\."")) dir = dir ""/iterators"" else if (match(compname, ""^25\\\\."")) dir = dir ""/algorithm"" else if (match(compname, ""^26\\\\."")) dir = dir ""/numerics"" else if (match(compname, ""^27\\\\."")) dir = dir ""/iostream"" else if (match(compname, ""^d_"")) ; # dir = dir ""/depr"" else dir = """" if (dir != """") { dispname = """" dispname = dispname compname """" } else { dispname = compname } } else { dispname = compname } return dispname } # prints a row of columns for the given section and component function print_component(section, compname) { # increment for each component, regardless of whether it gets # included in the output or not ++compinx row = """" # the number of failures and warning states of the current # component across all logs to decide whether to include # the component in the output or not nfailures = 0 nwarnings = 0 # maximum number of assertions exercised by the current # test across all logs maxasserts = 0 # the number of columns to span the same class/value repeat = 1 last_class = """" last_value = """" last_title = """" # iterate over all log files for (i = 1; i <= logcount; ++i) { # only process the specified section # if (section != substr(fi, 1, 1)) # continue # extract the name of the log file from the key # fname = substr(fi, 3) fname = logfnames [i] # check to see if the component was found in the current # log file being careful not to add a new entry to the # array if ((section, fname, compname) in compstatuses) { # component found status = compstatuses [section, fname, compname] n = split(status, triple, "":"") class = triple [1] value = """" == triple [2] ? class : triple [2] title = triple [3] if (""ASSERT"" == class) { if (0 < value) { title = ""failed "" value "" out of "" \\ triple [3] "" assertions"" } else title = """" if (maxasserts < triple [3]) maxasserts = triple [3] } } else { # component missing from log file class = ""MISS"" title = ""not tested"" value = ""N/A"" } if (class in failclasses) { ++nfailures ++logcompfails [fname] } else if (class != ""OK"" && class != ""MISS"") { ++nwarnings ++logcompwarns [fname] } if ("""" == last_class) { last_class = class last_title = title last_value = value } else if ( last_class == class \\ && last_value == value \\ && last_title == title) { ++repeat } else { row = row "" "" last_value ""\\n"" repeat = 1 last_class = class last_title = title last_value = value } ++statuscnts [fname, class] } row = row "" "" last_value """" repeat = 0 if (0 < nfailures || nwarnings) { # increment only for components included in the output ++rowinx dispname = get_dispname(section, compname) print "" "" print "" "" compinx """" print "" "" dispname """" if (2 == section) print "" "" maxasserts """" print row print "" "" return 1 } return 0 } # prints a table for each of the three sections (examples, locales, # and tests) function print_section(section) { # the name of this section (""example"", ""locale"", or ""test"") sectname = sectnames [section] if (0 == sectmaxcompcnts [section]) { print print "" "" print ""

No "" sectname ""s found in "" logcount "" logs

"" return } # create the table header roughly in the following format: # # | ### | component | 1 | 2 | 3 | 4 | 5 | 6 | ... | 16 | # | | name | 8d | 8D | 8s | 8S | 11d | 11D | ... | 15S | # | | | date | date | ... | date| thead = "" \\n"" thead = thead "" \\n"" thead = thead "" ###\\n"" thead = thead "" "" thead = thead sectname "" name\\n"" if (2 == section) { # for tests only, insert a column at offset 2 with the maximum # number of assertions found in the test on the given row across # all build logs thead = thead "" "" thead = thead ""max
asserts\\n"" } row0 = """" row1 = "" \\n"" row2 = "" \\n"" colnos = """" lastdate = """" # date (M/d) of the last log lastfull = """" # full date and time of the last log datespan = 0 # number of same consecutive dates # iterate over the array of section counts for each log file # and compose the column headers for each log for (i = 1; i <= logcount; ++i) { logname = logfnames [i] # strip directory prefix from file name loghref = get_gzlogfname(logname) colnos = colnos "" "" colnos = colnos """" i """" buildtype = get_buildtype(logname) buildmode = buildmodes [buildtype] row1 = row1 "" "" buildtype ""\\n"" if (logname in logdates) { # parse the date and time from the date extracted # from the log fulldate = logdates [logname] date = get_date(fulldate) time = get_time(fulldate) } else { # date not available fulldate = ""unknown date"" date = ""N/A"" } if (0 == datespan) { # first iteration lastdate = date lastfull = fulldate datespan = 1 } else if (date == lastdate) { # increment the span of the last seen date ++datespan } else { row2 = row2 "" "" lastdate ""\\n"" else row2 = row2 "" title=\\"""" lastfull ""\\"">"" lastdate ""\\n"" lastdate = date lastfull = fulldate datespan = 1 } } # append the date of last set of logs row2 = row2 "" "" lastdate ""\\n"" else row2 = row2 "" title=\\"""" lastfull ""\\"">"" lastdate ""\\n"" row0 = row0 colnos ""\\n \\n"" row1 = row1 "" \\n"" row2 = row2 "" \\n"" thead = thead row0 row1 row2 "" "" print "" "" print ""

Results of "" sectmaxcompcnts [section] "" "" \\ sectname ""s from "" logcount "" logs

"" print "" "" print thead print "" "" # reset the arrays split("""", logcompwarns) split("""", logcompfails) split("""", statuscnts) # iterate over elements of the compcnts array using the section # number and the name of the comoponent as the key (index) if (2 == section) colspan = "" colspan=2"" else colspan = """" # one-based component index (of all found) # not every component makes it into the table compinx = 0 # one-based row index (of all rows printed) rowinx = 1 # split the list of components in the current section into an array # (the list of component names is in the same order as in the log) compcount = split(sectcomponents [section], components, "" "") # iterate over the array for (ci = 1; ci <= compcount; ++ci) { compname = components [ci] # determine whether the current component should be included # in output or not and if so, print it out printed = print_component(section, compname) if (printed && (rowinx % 20) == 0) { print "" "" print "" "" print "" "" print colnos print "" "" } } print "" "" # print totals in the table footer print "" "" ################################################################## ### print column headers again print "" "" print "" "" print "" "" print colnos print "" "" ################################################################## ### print totals for each interesting status (class) print "" "" print "" "" print "" status"" print "" "" print "" "" for (si in states) { row = "" \\n"" row = row "" \\n"" row = row "" \\n"" nfails = 0 # the number of times the same value consecutively repeats repeat = 1 last_value = ""?"" for (i = 1; i <= logcount; ++i) { fname = logfnames [i] if ((fname, si) in statuscnts) { ++nfails value = statuscnts [fname, si] } else value = """" if (""?"" == last_value) last_value = value else if (value == last_value) ++repeat else { row = row "" \\n"" last_value = value repeat = 1 } } if (0 < nfails) { row = row "" \\n"" print row "" "" } } ################################################################## # print number of expected failures row = """" nfails = 0 # the number of times the same value consecutively repeats repeat = 1 last_value = ""?"" for (i = 1; i <= logcount; ++i) { fname = logfnames [i] if ((section, fname) in xfailcounts) { ++nfails value = xfailcounts [section, fname] } else value = """" if (""?"" == last_value) last_value = value else if (value == last_value) ++repeat else { row = row "" \\n"" last_value = value repeat = 1 } } if (0 < nfails) { row = row "" \\n"" print "" "" print "" "" print "" "" print row "" "" } ################################################################## # print expected/unexpected mismatches row = """" nfails = 0 # the number of times the same value consecutively repeats repeat = 1 last_value = ""?"" for (i = 1; i <= logcount; ++i) { fname = logfnames [i] if ((section, fname) in xmatchcounts) { ++nfails value = xmatchcounts [section, fname] } else value = """" if (""?"" == last_value) last_value = value else if (value == last_value) ++repeat else { row = row "" \\n"" last_value = value repeat = 1 } } if (0 < nfails) { row = row "" \\n"" print "" "" print "" "" print "" "" print row "" "" } ################################################################## # print total number of failures row = """" nfails = 0 # the number of times the same value consecutively repeats repeat = 1 last_value = ""?"" for (i = 1; i <= logcount; ++i) { fname = logfnames [i] if (fname in logcompfails) { ++nfails value = logcompfails [fname] } else value = """" if (""?"" == last_value) last_value = value else if (value == last_value) ++repeat else { row = row "" \\n"" last_value = value repeat = 1 } } if (0 < nfails) { row = row "" \\n"" print "" "" print "" "" print "" "" print row "" "" } ################################################################## # print total number of components exercised row = """" nfails = 0 # the number of times the same value consecutively repeats repeat = 1 last_value = ""?"" for (i = 1; i <= logcount; ++i) { fname = logfnames [i] if ((section, fname) in logcompcnts) { ++nfails value = logcompcnts [section, fname] } else value = """" if (""?"" == last_value) last_value = value else if (value == last_value) ++repeat else { row = row "" \\n"" last_value = value repeat = 1 } } if (0 < nfails) { row = row "" \\n"" print "" "" print "" "" print "" "" print row "" "" } ################################################################## print "" "" print ""
column number and log
column number and log
totals for status
"" si """" last_value """" last_value ""
"" last_value """" last_value ""
expected failures
"" last_value """" last_value ""
expected/actual mismatches
"" last_value """" last_value ""
failures
"" last_value """" last_value ""
total
"" } function format_size(size) { if (1000000000 <= size) return size / 1073741824.0 "" GB"" if (1000000 <= size) return size / 1048576.0 "" MB "" if (1000 <= size) return size / 1024 "" kB"" if (0 < size) return size "" B"" return size } function get_gzlogfname(fname) { # strip directory prefix from file name pos = match(fname, "".*/"") if (0 < pos) fref = substr(fname, RLENGTH + 1) else fref = fname # replace the temporary PID suffix with "".gz"" pos = match(fref, ""\\\\.[1-9][0-9]*$"") if (0 < pos) fref = substr(fref, 1, pos - 1) # replace the trailing .txt suffix with .gz.txt sub(""\\\\.txt$"", "".gz.txt"", fref) return ""logs/"" fref } function print_logtable() { thead = \\ "" \\n"" \\ "" \\n"" \\ "" "" \\ ""log\\n"" \\ "" operating
system\\n"" \\ "" "" \\ ""arch\\n"" \\ "" compiler\\n"" \\ "" build
type\\n"" \\ "" start date and time\\n"" \\ "" "" \\ ""age\\n"" \\ "" revision\\n"" \\ "" sizes\\n"" \\ "" diagnostics\\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" "" \\ ""library\\n"" \\ "" log\\n"" \\ "" build\\n"" \\ "" "" \\ ""errors\\n"" \\ "" "" \\ ""warnings\\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" gzip\\n"" \\ "" text\\n"" \\ "" full\\n"" \\ "" clean\\n"" \\ "" lib\\n"" \\ "" other\\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" "" print ""

Logs and Columns

"" print "" "" print thead print "" "" for (i = 1; i <= logcount; ++i) { fname = logfnames [i] n = split(logos [fname], platfields, FSEP) osname = platfields [1] osdesc = platfields [2] arch = platfields [3] archdesc = platfields [4] cxxname = platfields [5] cxxdesc = platfields [6] if (fname in buildstatus) print "" "" else print "" "" # strip directory prefix from file name loghref = get_gzlogfname(fname) print "" "" ################################################################ # extract and format the operating system name and version oscell = """" osname"""" ################################################################ # extract and format the hardware architecture archcell = """" arch """" ################################################################ # extract and format the compiler and version cxxcell = """" cxxname """" print "" "" oscell print "" "" archcell print "" "" cxxcell ################################################################ # extract build type from log file name buildtype = get_buildtype(fname) buildmode = buildmodes [buildtype] print "" "" print "" "" # compute and format the age of the build duration = ""duration -f \\"""" logdates [fname] \\ ""\\"" \\"""" todays_date ""\\"""" duration | getline fullage close(duration) pos = index(fullage, "", "") buildage = substr(fullage, 1, pos - 1) print "" "" pos = match(fname, ""-[1-9][0-9]*-log"") buildrev = substr(fname, pos + 1, RLENGTH - 5) ################################################################ # format a ViewVC URL to the revision number/log revurl = ""http://svn.apache.org/viewvc?view=rev&rev="" buildrev print "" "" ################################################################ # library size fullsize = fname in libsizes ? libsizes [fname] : """" size = format_size(libsizes [fname]) print "" "" print "" "" ################################################################ # format the size of the expanded log file cmd = ""du -k "" fname cmd | getline close(cmd) fullsize = $1 size = format_size(fullsize * 1024) print "" "" ################################################################ # compute the full build size fullsize = fname in buildsizes ? buildsizes [fname] : """" size = format_size(fullsize * 1024) print "" "" ################################################################ # format the build size after the clean target has been run fullsize = fname in cleansizes ? cleansizes [fname] : """" size = format_size(fullsize * 1024) print "" "" print "" "" print "" "" print "" "" print "" "" } print "" "" print "" "" print "" "" print ""
"" i """" buildtype """" logdates [fname] """" buildage """" buildrev """" size """" gzlogsize """" size """" size """" size """" logerrors [fname] """" libwarnings [fname] """" logwarnings [fname] ""
"" } # reformat time string argument in the original format of ""NmN.NNNs"" # (i.e., as produced by the times shell utility), as ""M:SS"" rounding # fractional seconds as necessary function format_time(timestr) { pos = index(timestr, ""m"") mins = substr(timestr, 1, pos - 1) secs = substr(timestr, pos + 1) secs = substr(secs, 1, length(secs) - 1) timestr = mins "":"" if (int(secs) < 10) timestr = timestr ""0"" timestr = timestr int(secs) return timestr } function print_timingstable() { thead = \\ ""\\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" \\ "" \\n"" print ""

Timings

"" print ""
"" \\ ""logbuild
type
build and run times (M:SS)
"" \\ ""config"" \\ ""library"" \\ ""examples"" \\ ""utilities"" \\ ""tests"" \\ ""run times"" \\ ""total
realusersysrealusersysrealusersysrealusersysrealusersysrealusersysrealusersys
"" print thead print "" "" for (i = 1; i <= logcount; ++i) { fname = logfnames [i] if (fname in buildstatus) print "" "" else print "" "" # strip directory prefix from file name loghref = get_gzlogfname(fname) print "" "" buildtype = get_buildtype(fname) print "" "" timecells = """" for (j = 1; j in buildstages; ++j) { stage = buildstages [j]; if ((fname, stage) in logstagetimes) { # format real, user, and system times for the stage timestr = logstagetimes [fname, stage] split(timestr, atimes, FSEP) realtim = format_time(atimes [1]) usrtim = format_time(atimes [2]) systim = format_time(atimes [3]) # highlight total times in bold if (""total"" == stage) { pfx = """" sfx = """" } else { pfx = """" sfx = """" } timecells = timecells """" timecells = timecells """" timecells = timecells """" } else { timecells = timecells """" } } print timecells """" } print "" "" print "" "" print "" "" print ""
"" i """" buildtype """" pfx realtim sfx """" pfx usrtim sfx """" pfx systim sfx ""
"" } END { if (0 == bodyonly) { print """" print "" "" print "" "" print "" "" print "" "" } print_logtable() print_timingstable() for (section = 1; section <= 3; ++section) print_section(section) if (0 == bodyonly) { print "" "" print """" } } ",16288,True,2537.4218187075107,median "############################################################################################### # This awk program is processing a file containing a list of HXX header file names. # In the header files it looks for the following 'special' names: # # AWK_DECLARE_ENUM(enum type, [prefix], [guid]) # # should be inside DECLARE_ENUM # AWK_ENUM(C++ name, user name, [value]) # # AWK_DECLARE_CLASS(class, base class) # # should be inside DECLARE_CLASS or DECLARE_INTERFACE # AWK_PROPERTY(property name(automation type, dispid, [attribute:value], [automation attribute], [get], [set], [bag] | [spf] | [scf] )) # where # [attribute:value] defines attributes for the internal property description # type: the internal type of a member variable # member: the name of the member variable used to store the property # method: the name of a pair get/set helper methods prefixed by Get/Set getting and setting the value # help: the help id for the typelib # szattribute: when set, uses this as the html string instead of the automation name # dwExtra: 32 bits of extra information # [automation attribute] # any automation attribute which should go to the type library # [get] # if the property is readable # [set] # if the property writable # [bag] # if the property is in our special attribute bag # # AWK_DECLARE_INTERFACE(interface, base interface) # # should be inside DECLARE_INTERFACE # AWK_REF_PROPERTY(class:property) # ############################################################################################### #function CheckFile(s) { # print ""// "" s > s # close(s) # if (getline < s <= 0 || $2 != s) { # print ""*** AWK *** Couldn't write into \\"""" s ""\\"""" # } # close(s) #} function CalculateMask(enum, i, m) { m = 0 for (i = et[enum] - 1; i >= 0; i--) { if (ev[enum, i] < 0 || ev[enum, i] > 31) { return 0 } m += 2 ^ ev[enum, i] } return m } function GeneratePropertyDesc(class, file, i, j, s, m, b) { print ""In class: "" class > fileLog for (i = 0; i < ct[class]; i++) { if (pt[class, i, ""func""]) continue print ""Property: "" pt[class, i, ""name""] > fileLog for (j = pt[class, i] - 1; j > 0; j--) { print ""\\t"" pa[class, i, j] "" : "" pt[class, i, pa[class, i, j]] > fileLog } s = pt[class, i, ""type""] if (s in et) { m = CalculateMask(s) b = ""ENUM"" s = ""Enum"" } else { b = bt[s] s = dt[s] } print class "", "" pt[class, i, ""name""] "", "" pt[class, i, ""dispid""] "", "" pt[class, i, ""dwflags""] > fileLog print """" >> file propdescstruct = ""PROPDESC"" toupper(class) toupper(pt[class, i, ""name""]) if (pt[class, i, ""szattribute""]) { htmldesc = pt[class, i, ""szattribute""] } else { htmldesc = pt[class, i, ""name""] } if (pt[class, i, ""abstract""]) { propertydesc = ""s_propdesc"" class pt[class, i, ""name""] "" =\\n{\\n\\tNULL, _T(\\"""" htmldesc ""\\""), (ULONG)"" pt[class, i, ""default""] "",\\n\\t{"" } else { propertydesc = ""s_propdesc"" class pt[class, i, ""name""] "" =\\n{\\n\\tPROPERTYDESC::Handle"" s ""Property, _T(\\"""" htmldesc ""\\""), (ULONG)"" pt[class, i, ""default""] "",\\n\\t{"" } if (pt[class, i, ""method""]) { memberdesc = """" } else if (pt[class, i, ""bag""]) { memberdesc = class ""::CLAttrBag, "" pt[class, i, ""member""] } else if (pt[class, i, ""spf""]) { memberdesc = ""CParaFormat, "" pt[class, i, ""member""] } else if (pt[class, i, ""scf""]) { memberdesc = ""CCharFormat, "" pt[class, i, ""member""] } else if (pt[class, i, ""indirect""]) { memberdesc = class pt[class, i, ""indirect""] "", "" pt[class, i, ""member""] } else { memberdesc = class "", "" pt[class, i, ""member""] } propparamdesc = (pt[class, i, ""method""] ? ""PROPPARAM_GET | PROPPARAM_SET"" : ""PROPPARAM_MEMBER"") if (pt[class, i, ""ppflags""]) { propparamdesc = propparamdesc "" | "" pt[class, i, ""ppflags""] } if (pt[class, i, ""bag""]) { propparamdesc = propparamdesc "" | PROPPARAM_BAG | PROPPARAM_INDIRECT"" } else if (pt[class, i, ""spf""]) { propparamdesc = propparamdesc "" | PROPPARAM_INDIRECT | PROPPARAM_STYLE_PF"" } else if (pt[class, i, ""scf""]) { propparamdesc = propparamdesc "" | PROPPARAM_INDIRECT | PROPPARAM_STYLE_CF"" } else if (pt[class, i, ""indirect""]) { propparamdesc = propparamdesc "" | PROPPARAM_INDIRECT"" } if (pt[class, i, ""inherit""]) { propparamdesc = propparamdesc "" | PROPPARAM_INHERITED"" } if (s == ""Num"" || s == ""Enum"" || s == ""UnitValue"" ) { if (pt[class, i, ""method""]) { print ""EXTERN_C const struct "" propdescstruct "" { PROPERTYDESC a; NUMPROPPARAMS b; PFN_NUMPROPGET c; PFN_NUMPROPSET d; }"" >> file } else if (pt[class, i, ""abstract""]) { print ""EXTERN_C const struct "" propdescstruct "" { PROPERTYDESC a; NUMPROPPARAMS b; }"" >> file } else if (pt[class, i, ""dwextra""]) { print ""EXTERN_C const struct "" propdescstruct "" { PROPERTYDESC a; NUMPROPPARAMS b; DWORD c; DWORD d; }"" >> file } else { print ""EXTERN_C const struct "" propdescstruct "" { PROPERTYDESC a; NUMPROPPARAMS b; DWORD c; }"" >> file } print propertydesc ""\\n\\t{"" >> file if (s == ""Enum"") { propparamdesc = propparamdesc "" | PROPPARAM_ENUM"" } if (pt[class, i, ""dispid""]) { print ""\\t\\t"" propparamdesc "", "" pt[class, i, ""dispid""] "", "" pt[class, i, ""dwflags""] "" \\n\\t},"" >> file } else { print ""\\t\\t"" propparamdesc "", 0, "" pt[class, i, ""dwflags""] "" \\n\\t},"" >> file } if (pt[class, i, ""abstract""]) { printf(""\\t\\t0, 0"") >> file } else { if (pt[class, i, ""vt""] == """") { pt[class, i, ""vt""] = (pt[class, i, ""atype""] == ""short"") ? ""VT_I2"" : ""VT_I4"" } if (pt[class, i, ""method""]) { printf(""\\t\\t%s, 0"", pt[class, i, ""vt""]) >> file } else { printf(""\\t\\t%s, SIZE_OF(%s)"", pt[class, i, ""vt""], memberdesc) >> file } } if (s == ""Enum"") { if (pt[class, i, ""abstract""]) { printf("", 0, 0,\\n"") >> file } else { printf("", %d, (long)&s_enumdesc%s,\\n"", m, pt[class, i, ""type""]) >> file } } else { if (pt[class, i, ""min""] == """") { pt[class, i, ""min""] = ""LONG_MIN"" } if (pt[class, i, ""max""] == """") { pt[class, i, ""max""] = ""LONG_MAX"" } printf("", %s, %s,\\n"", pt[class, i, ""min""], pt[class, i, ""max""]) >> file } print ""\\t},"" >> file if (pt[class, i, ""method""]) { print ""\\tPFN_NUMPROPGET(PFNB_NUMPROPGET("" class"" ::Get"" pt[class, i, ""method""] "")),"" >> file print ""\\tPFN_NUMPROPSET(PFNB_NUMPROPSET("" class"" ::Set"" pt[class, i, ""method""] ""))"" >> file } else if (pt[class, i, ""abstract""]) { } else { print ""\\toffsetof("" memberdesc "")"" >> file } } else { if (pt[class, i, ""method""]) { print ""EXTERN_C const struct "" propdescstruct "" { PROPERTYDESC a; BASICPROPPARAMS b; PFN_"" b ""PROPGET c; PFN_"" b ""PROPSET d; }"" >> file } else if (pt[class, i, ""abstract""]) { print ""EXTERN_C const struct "" propdescstruct "" { PROPERTYDESC a; BASICPROPPARAMS b; }"" >> file } else if (pt[class, i, ""dwextra""]) { print ""EXTERN_C const struct "" propdescstruct "" { PROPERTYDESC a; BASICPROPPARAMS b; DWORD c; DWORD d; }"" >> file } else { print ""EXTERN_C const struct "" propdescstruct "" { PROPERTYDESC a; BASICPROPPARAMS b; DWORD c; }"" >> file } print propertydesc >> file if (pt[class, i, ""dispid""]) { print ""\\t\\t"" propparamdesc "", "" pt[class, i, ""dispid""] "", "" pt[class, i, ""dwflags""] "" \\n\\t},"" >> file } else { print ""\\t\\t"" propparamdesc "", 0, "" pt[class, i, ""dwflags""] "" \\n\\t},"" >> file } if (pt[class, i, ""method""]) { print ""\\tPFN_"" b ""PROPGET(PFNB_"" b ""PROPGET("" class"" ::Get"" pt[class, i, ""method""] "")),"" >> file print ""\\tPFN_"" b ""PROPSET(PFNB_"" b ""PROPSET("" class"" ::Set"" pt[class, i, ""method""] ""))"" >> file } else if (pt[class, i, ""abstract""]) { } else { print ""\\toffsetof("" memberdesc "")"" >> file } } if (pt[class, i, ""dwextra""]) { print ""\\t, "" pt[class, i, ""dwextra""] ""\\n"" >> file } print ""};\\n"" >> file } } function GenerateExternProp(class, file, i) { if (ca[class, ""super""] != """") { GenerateExternProp(ca[class, ""super""], file) } print ""In class: "" class > fileLog for (i = 0; i < ct[class]; i++) { if (pt[class, i, ""func""]) continue print ""Extern property: "" pt[class, i, ""name""] > fileLog # print ""\\nEXTERN_C struct PROPDESC"" toupper(class) toupper(pt[class, i, ""name""]) "" s_propdesc"" class pt[class, i, ""name""] "";\\n"" >> file print ""\\nEXTERN_C struct PROPERTYDESC s_propdesc"" class pt[class, i, ""name""] "";\\n"" >> file } } function GenerateReferProp(class, file, i) { if (ca[class, ""super""] != """") { GenerateReferProp(ca[class, ""super""], file) } print ""In class: "" class > fileLog for (i = 0; i < ct[class]; i++) { if (pt[class, i, ""func""]) continue print ""Property: "" pt[class, i, ""name""] > fileLog if (!ca[class, ""imported""]) { print ""\\t&s_propdesc"" class pt[class, i, ""name""] "".a,"" >> file } else { print ""\\t&s_propdesc"" class pt[class, i, ""name""] "","" >> file } } } function GenerateTearOffMethods(interface, file, i, j, a, ps, class) { if (ia[interface, ""super""] != """") { GenerateTearOffMethods(ia[interface, ""super""], file) } for (o = 0; o < it[interface]; o++) { class = ic[interface, o] i = pi[class, im[interface, o]] if (pt[class, i, ""func""]) { print ""\\t(HRESULT (__stdcall CVoid::*)(void))"" >> file printf(""\\t\\t(%s (__stdcall CVoid::*)("", pt[class, i, ""return""]) >> file a = 0 for (j = 0; j < pt[class, i, ""func""]; j++) { if (a) { printf("", "") >> file } a++ printf(""%s"", pt[class, i, j, ""type""]) >> file } print ""))"" pt[class, i, ""name""] "","" >> file } else { if (pt[class, i, ""index""]) { ps = pt[class, i, ""indextype""] "", "" } else { ps = """" } if (pt[class, i, ""index1""]) { ps = ps pt[class, i, ""indextype1""] "", "" } if (pt[class, i, ""set""]) { print ""\\t(HRESULT (__stdcall CVoid::*)(void))"" >> file print ""\\t\\t(HRESULT (__stdcall CVoid::*)("" ps pt[class, i, ""atype""] ""))Set"" pt[class, i, ""name""] "","" >> file if (pt[class, i, ""object""]) { print ""\\t(HRESULT (__stdcall CVoid::*)(void))"" >> file print ""\\t\\t(HRESULT (__stdcall CVoid::*)("" ps pt[class, i, ""atype""] ""))Set"" pt[class, i, ""name""] ""ByRef,"" >> file } } if (pt[class, i, ""get""]) { print ""\\t(HRESULT (__stdcall CVoid::*)(void))"" >> file print ""\\t\\t(HRESULT (__stdcall CVoid::*)("" ps pt[class, i, ""atype""] ""*))Get"" pt[class, i, ""name""] "","" >> file } } } } function GeneratePropMethodDecl(class, file, i, j, a, aa, ps) { print ""In class: "" class > fileLog print ""// Property get/set method declarations for class "" class >> file for (i = 0; i < ct[class]; i++) { if (pt[class, i, ""func""]) { print ""Method: "" pt[class, i, ""name""] > fileLog printf(""\\tvirtual %s STDMETHODCALLTYPE %s("", pt[class, i, ""return""], pt[class, i, ""name""]) >> file a = 0 for (j = 0; j < pt[class, i, ""func""]; j++) { if (a) { printf("", "") >> file } a++ printf(""%s %s"", pt[class, i, j, ""type""], pt[class, i, j, ""arg""]) >> file } print "");"" >> file } else { print ""Property: "" pt[class, i, ""name""] > fileLog if (pt[class, i, ""index""]) { ps = pt[class, i, ""indextype""] "" "" pt[class, i, ""index""] "", "" } else { ps = """" } if (pt[class, i, ""index1""]) { ps = ps pt[class, i, ""indextype1""] "" "" pt[class, i, ""index1""] "", "" } if (pt[class, i, ""set""]) { print ""\\tvirtual HRESULT STDMETHODCALLTYPE Set"" pt[class, i, ""name""] ""("" ps pt[class, i, ""atype""] "" "" pt[class, i, ""name""] "");"" >> file if (pt[class, i, ""object""]) { print ""\\tvirtual HRESULT STDMETHODCALLTYPE Set"" pt[class, i, ""name""] ""ByRef("" ps pt[class, i, ""atype""] "" "" pt[class, i, ""name""] "");"" >> file } } if (pt[class, i, ""get""]) { print ""\\tvirtual HRESULT STDMETHODCALLTYPE Get"" pt[class, i, ""name""] ""("" ps pt[class, i, ""atype""] "" * p"" pt[class, i, ""name""] "");"" >> file } } } } function GenerateEventFireDecl(interface, file, i, j, a, s, ts) { print ""In events: "" interface > fileLog print ""\\n// Event fire method declarations for events "" interface >> file for (i = 0; i < ct[interface]; i++) { if (pt[interface, i, ""func""]) { print ""Method: "" pt[interface, i, ""name""] > fileLog printf(""\\tvoid Fire%s_%s("", interface, pt[interface, i, ""name""]) >> file a = 0 for (j = 0; j < pt[interface, i, ""func""]; j++) { if (a) { printf("", "") >> file } a++ ts = pt[interface, i, j, ""atype""] if (!ts) { ts = pt[interface, i, j, ""type""] } printf(""%s %s"", ts, pt[interface, i, j, ""arg""]) >> file } printf("")\\n\\t{\\n\\t\\tFireEvent(%s, (BYTE *) "", pt[interface, i, ""dispid""]) >> file a = 0 if (pt[interface, i, ""func""] > 0) { for (j = 0; j < pt[interface, i, ""func""]; j++) { s = vt[pt[interface, i, j, ""type""]] if (a) { printf("" "") >> file } a++ printf(""%s"", s) >> file } } else { printf(""VTS_NONE"") >> file } for (j = 0; j < pt[interface, i, ""func""]; j++) { printf("", %s"", pt[interface, i, j, ""arg""]) >> file } print "");\\n\\t}"" >> file } else { print ""*** AWK *** Property in event: "" interface "":"" pt[interface, i, ""name""] } } print """" >> file } function GenerateDISPIDs(class, file, i) { print ""In class: "" class > fileLog print ""// DISPIDs for class"" class ""\\n"" >> file for (i = 0; i < ct[class]; i++) { print ""Property: "" pt[class, i, ""name""] > fileLog if (pt[class, i, ""dispid""]) { print ""#define DISPID_"" class ""_"" pt[class, i, ""name""] ""\\t"" pt[class, i, ""dispid""] >> file } } print """" >> file } function GeneratePropMethodImpl(class, file, i, s, b, o, ps, ps) { print ""In class: "" class > fileLog print ""// Property get/set method implementation for class "" class >> file for (i = 0; i < ct[class]; i++) { if (pt[class, i, ""func""] || pt[class, i, ""abstract""]) continue print ""Property: "" pt[class, i, ""name""] > fileLog s = pt[class, i, ""type""] if (s in et) { b = ""ENUM"" s = ""Enum"" } else { b = bt[s] s = dt[s] } if (pt[class, i, ""bag""]) { o = ""GetAttrBag()"" } else if (pt[class, i, ""spf""]) { o = ""GetPF()"" } else if (pt[class, i, ""scf""]) { o = ""GetCF()"" } else if (pt[class, i, ""indirect""]) { o = pt[class, i, ""indirect""] } else { o = ""this"" } if (pt[class, i, ""set""]) { print ""STDMETHODIMP "" class ""::Set"" pt[class, i, ""name""] ""("" pt[class, i, ""atype""] "" v)\\n{"" >> file if (pt[class, i, ""atype""] == ""VARIANT"" ) { print ""\\treturn s_propdesc"" class pt[class, i, ""name""] "".a.Handle"" s ""Property( HANDLEPROP_SET | HANDLEPROP_XERROR | (PROPTYPE_VARIANT << 16), &v, this, (CVoid *)(void *)"" o "");\\n}"" >> file } else if (s == ""Num"" || s == ""Enum"") { print ""\\treturn s_propdesc"" class pt[class, i, ""name""] "".b.SetNumberProperty( v, this, (CVoid *)(void *)"" o "", 0, 0);\\n}"" >> file } else { print ""\\treturn s_propdesc"" class pt[class, i, ""name""] "".b.Set"" s ""Property( v, this, (CVoid *)(void *)"" o "");\\n}"" >> file } if (pt[class, i, ""object""]) { print ""STDMETHODIMP "" class ""::Set"" pt[class, i, ""name""] ""ByRef("" pt[class, i, ""atype""] "" v)\\n{"" >> file print ""\\treturn Set"" pt[class, i, ""name""] ""(v);\\n}"" >> file } } if (pt[class, i, ""get""]) { print ""STDMETHODIMP "" class ""::Get"" pt[class, i, ""name""] ""("" pt[class, i, ""atype""] "" * p)\\n{"" >> file if (pt[class, i, ""subobject""]) { print ""\\t return s_"" pt[class, i, ""subobject""] ""_CreateSubObject ( this, (IUnknown **)p, (const PROPERTYDESC *)&s_propdesc"" class pt[class, i, ""name""] "" );\\n}"" >> file } else if (pt[class, i, ""atype""] == ""VARIANT"" ) { print ""\\treturn s_propdesc"" class pt[class, i, ""name""] "".a.Handle"" s ""Property( HANDLEPROP_XERROR | (PROPTYPE_VARIANT << 16), p, this, (CVoid *)(void *)"" o "");\\n}"" >> file } else if (s == ""Num"" || s == ""Enum"") { print ""\\treturn s_propdesc"" class pt[class, i, ""name""] "".b.GetNumberProperty( p, this, (CVoid *)(void *)"" o "");\\n}"" >> file } else { print ""\\treturn s_propdesc"" class pt[class, i, ""name""] "".b.Get"" s ""Property( p, this, (CVoid *)(void *)"" o "");\\n}"" >> file } } } if (ca[class, ""interface""] && ca[class, ""tearoff""]) { print ""// Tear-off table for class "" class >> file print ""BEGIN_TEAROFF_TABLE("" class "", "" ca[class, ""interface""] "")"" >> file print ""\\t(HRESULT (__stdcall CVoid::*)(void))"" >> file print ""\\t\\t(HRESULT (__stdcall CVoid::*)(unsigned int *))GetTypeInfoCount,"" >> file print ""\\t(HRESULT (__stdcall CVoid::*)(void))"" >> file print ""\\t\\t(HRESULT (__stdcall CVoid::*)(unsigned int, unsigned long, ITypeInfo **))GetTypeInfo,"" >> file print ""\\t(HRESULT (__stdcall CVoid::*)(void))"" >> file print ""\\t\\t(HRESULT (__stdcall CVoid::*)(REFIID, LPOLESTR *, unsigned int, LCID, DISPID *))GetIDsOfNames,"" >> file print ""\\t(HRESULT (__stdcall CVoid::*)(void))"" >> file print ""\\t\\t(HRESULT (__stdcall CVoid::*)(DISPID, REFIID, LCID, WORD, DISPPARAMS *, VARIANT *, EXCEPINFO *, unsigned int *))Invoke,"" >> file GenerateTearOffMethods(ca[class, ""interface""], file) print ""END_TEAROFF_TABLE()"" >> file } } function GenerateInterfaceDecl(interface, file, class, o, i, j, k, s, m, a, aa, ps) { if (ia[interface, ""abstract""]) { return } print ""In interface: "" interface > fileLog print ""\\n#ifdef __MKTYPLIB__\\n"" >> file if (!ia[interface, ""midl""]) { if (ia[interface, ""event""]) { print ""[\\n\\thidden,"" >> file print ""\\tuuid("" ia[interface, ""guid""] "")\\n]\\ndispinterface "" interface ""\\n{"" >> file print ""properties:\\nmethods:\\n"" >> file } else { print ""[\\n\\todl,\\n\\toleautomation,\\n\\tdual,"" >> file print ""\\tuuid("" ia[interface, ""guid""] "")\\n]\\ninterface "" interface "" : "" ia[interface, ""super""] ""\\n{"" >> file } for (o = 0; o < it[interface]; o++) { class = ic[interface, o] i = pi[class, im[interface, o]] if (pt[class, i, ""func""]) { print o "". From class "" class "" func "" i > fileLog for (j = pt[class, i] - 1; j > 0; j--) { print ""\\t"" pa[class, i, j] "" : "" pt[class, i, pa[class, i, j]] > fileLog } print ""\\tArguments: "" pt[class, i, ""func""] > fileLog for (j = 0; j < pt[class, i, ""func""]; j++) { for (k = pt[class, i, j] - 1; k >= 0; k--) { print ""\\t"" pa[class, i, j, k] "" : "" pt[class, i, j, pa[class, i, j, k]] > fileLog } } if (pt[class, i, ""dispid""]) { printf(""\\t[id(%s)"", pt[class, i, ""dispid""]) >> file } else { printf(""\\t["") >> file } for (j = pt[class, i] - 1; j > 0; j--) { if (at[pa[class, i, j]] == 0) { printf("", %s"", pa[class, i, j]) >> file } } printf(""] %s %s("", pt[class, i, ""return""], pt[class, i, ""name""]) >> file a = 0 for (j = 0; j < pt[class, i, ""func""]; j++) { if (a) { printf("", "") >> file } a++ printf(""["") >> file aa = 0 for (k = pt[class, i, j] - 1; k >= 0; k--) { if (at[pa[class, i, j, k]] == 0) { if (aa) { printf("", "") >> file } aa++ printf(""%s"", pa[class, i, j, k]) >> file } else if (pa[class, i, j, k] == ""defaultvalue"") { if (aa) { printf("", "") >> file } printf(""%s(%s)"", pa[class, i, j, k], pt[class, i, j, pa[class, i, j, k]]) >> file aa++ } } printf(""] %s %s"", pt[class, i, j, ""type""], pt[class, i, j, ""arg""]) >> file } print "");"" >> file } else { print o "". From class "" class "" prop "" i > fileLog for (j = pt[class, i] - 1; j > 0; j--) { print ""\\t"" pa[class, i, j] "" : "" pt[class, i, pa[class, i, j]] > fileLog } if (pt[class, i, ""index""]) { ps = ""[in] "" pt[class, i, ""indextype""] "" "" pt[class, i, ""index""] "", "" } else { ps = """" } if (pt[class, i, ""index1""]) { ps = ps ""[in] "" pt[class, i, ""indextype1""] "" "" pt[class, i, ""index1""] "", "" } ts = pt[class, i, ""atype""] if ( ts == ""IDispatch*"" && pt[class,i,""type""] ) { ts = pt[class,i,""type""] } else if (pt[class, i, ""object""]) { ts = pt[class, i, ""object""] } if (pt[class, i, ""set""]) { if (pt[class, i, ""dispid""]) { printf(""\\t[propput, id(%s)"", pt[class, i, ""dispid""]) >> file } else { printf(""\\t[propput"") >> file } for (j = pt[class, i] - 1; j > 0; j--) { if (at[pa[class, i, j]] == 0) { printf("", %s"", pa[class, i, j]) >> file } } printf(""] HRESULT %s(%s[in] %s %s);\\n"", pt[class, i, ""name""], ps, ts, pt[class, i, ""name""]) >> file if (pt[class, i, ""object""]) { if (pt[class, i, ""dispid""]) { printf(""\\t[propputref, id(%s)"", pt[class, i, ""dispid""]) >> file } else { printf(""\\t[propputref"") >> file } for (j = pt[class, i] - 1; j > 0; j--) { if (at[pa[class, i, j]] == 0) { printf("", %s"", pa[class, i, j]) >> file } } printf(""] HRESULT %s(%s[in] %s %s);\\n"", pt[class, i, ""name""], ps, ts, pt[class, i, ""name""]) >> file } } if (pt[class, i, ""get""]) { if (pt[class, i, ""dispid""]) { printf(""\\t[propget, id(%s)"", pt[class, i, ""dispid""]) >> file } else { printf(""\\t[propget"") >> file } for (j = pt[class, i] - 1; j > 0; j--) { if (at[pa[class, i, j]] == 0) { printf("", %s"", pa[class, i, j]) >> file } } printf(""] HRESULT %s(%s[out, retval] %s * p%s);\\n"", pt[class, i, ""name""], ps, ts, pt[class, i, ""name""]) >> file } } } print ""}"" >> file } print ""\\n#else // __MKTYPLIB__\\n"" >> file if (!ia[interface, ""typelib""] && !ia[interface, ""event"" ]) { # if (!ia[interface, ""typelib""] ) { print ""[\\n\\tlocal,\\n\\tobject,\\n\\tpointer_default(unique),"" >> file print ""\\tuuid("" ia[interface, ""guid""] "")\\n]\\ninterface "" interface "" : "" ia[interface, ""super""] ""\\n{"" >> file for (o = 0; o < it[interface]; o++) { class = ic[interface, o] i = pi[class, im[interface, o]] if (pt[class, i, ""func""]) { print o "". From class "" class "" func "" i > fileLog for (j = pt[class, i] - 1; j > 0; j--) { print ""\\t"" pa[class, i, j] "" : "" pt[class, i, pa[class, i, j]] > fileLog } print ""\\tArguments: "" pt[class, i, ""func""] > fileLog for (j = 0; j < pt[class, i, ""func""]; j++) { for (k = pt[class, i, j] - 1; k >= 0; k--) { print ""\\t"" pa[class, i, j, k] "" : "" pt[class, i, j, pa[class, i, j, k]] > fileLog } } printf(""\\t%s %s("", pt[class, i, ""return""], pt[class, i, ""name""]) >> file a = 0 for (j = 0; j < pt[class, i, ""func""]; j++) { if (a) { printf("", "") >> file } a++ printf(""["") >> file aa = 0 for (k = pt[class, i, j] - 1; k >= 0; k--) { s = pa[class, i, j, k] if (at[s] == 0 && s != ""optional"" && s != ""retval"") { if (aa) { printf("", "") >> file } aa++ printf(""%s"", s) >> file } } printf(""] %s %s"", pt[class, i, j, ""type""], pt[class, i, j, ""arg""]) >> file } print "");"" >> file } else { print o "". From class "" class "" prop "" i > fileLog for (j = pt[class, i] - 1; j > 0; j--) { print ""\\t"" pa[class, i, j] "" : "" pt[class, i, pa[class, i, j]] > fileLog } if (pt[class, i, ""index""]) { ps = ""[in] "" pt[class, i, ""indextype""] "" "" pt[class, i, ""index""] "", "" } else { ps = """" } if (pt[class, i, ""index1""]) { ps = ps ""[in] "" pt[class, i, ""indextype1""] "" "" pt[class, i, ""index1""] "", "" } if (pt[class, i, ""set""]) { printf(""\\tHRESULT Set%s(%s[in] %s %s);\\n"", pt[class, i, ""name""], ps, pt[class, i, ""atype""], pt[class, i, ""name""]) >> file if (pt[class, i, ""object""]) { printf(""\\tHRESULT Set%sByRef(%s[in] %s %s);\\n"", pt[class, i, ""name""], ps, pt[class, i, ""atype""], pt[class, i, ""name""]) >> file } } if (pt[class, i, ""get""]) { printf(""\\tHRESULT Get%s(%s[out] %s * p%s);\\n"", pt[class, i, ""name""], ps, pt[class, i, ""atype""], pt[class, i, ""name""]) >> file } } } print ""}"" >> file } print ""\\n#endif // __MKTYPLIB__\\n"" >> file } function GenerateCoClassDecl(class, file) { if (ca[class, ""guid""] && ca[class, ""interface""]) { print ""#ifdef __MKTYPLIB__\\n"" >> file print ""[uuid("" ca[class, ""guid""] "")]"" >> file print ""coclass "" ca[class, ""name""] ""\\n{"" >> file print ""[default]\\t\\tinterface "" ca[class, ""interface""] "";"" >> file if (ca[class, ""events""]) { print ""[source, default]\\tdispinterface "" ca[class, ""events""] "";"" >> file } print ""};"" >> file print ""#endif // __MKTYPLIB__\\n"" >> file } } function GenerateEnumDescHXX(enum, file, i) { print ""In enum: "" enum > fileLog if (!ea[enum, ""guid""] && !ea[enum, ""abstract""]) { print ""enum "" enum ""\\n{"" >> file for (i = 0; i < et[enum]; i++) { print ""\\t"" ea[enum, ""prefix""] ""_"" en[enum, i] "" = "" ev[enum, i] "","" >> file } print ""};"" >> file } print ""EXTERN_C const ENUMDESC s_enumdesc"" enum "";\\n"" >> file } function GenerateEnumDescCXX(enum, file, i) { print ""In enum: "" enum > fileLog print ""\\nEXTERN_C const ENUMDESC s_enumdesc"" enum "" = { "" et[enum] "", {"" >> file for (i = 0; i < et[enum]; i++) { print ""\\t{ _T(\\"""" es[enum, i] ""\\""), "" ev[enum, i] ""},"" >> file } print ""} };\\n"" >> file } function GenerateEnumDescIDL(enum, file, i) { print ""In enum: "" enum > fileLog if (ea[enum, ""guid""] && !ea[enum, ""abstract""]) { print ""#ifdef __MKTYPLIB__\\n"" >> file print ""typedef [uuid("" ea[enum, ""guid""] "")] enum _"" enum "" {"" >> file for (i = 0; i < et[enum]; i++) { print ""\\t[helpstring(\\"""" es[enum, i] ""\\"")] "" enum en[enum, i] "" = "" ev[enum, i] "","" >> file } print ""} "" enum "";\\n"" >> file print ""#else // __MKTYPLIB__\\n"" >> file print ""typedef enum _"" enum ""\\n{"" >> file for (i = 0; i < et[enum]; i++) { print ""\\t"" enum en[enum, i] "" = "" ev[enum, i] "","" >> file } print ""\\t"" enum ""_Max = 2147483647L,\\n} "" enum "";\\n"" >> file print ""#endif // __MKTYPLIB__\\n"" >> file } } BEGIN { # dt[] # index is property type # value is internal type (property descriptor type) dt[""void*""]=""Num"" dt[""DWORD""]=""Num"" dt[""DISPID""]=""Num"" dt[""SIZEL*""]=""Num"" dt[""CStr""] = ""String"" dt[""BSTR""] = ""String"" dt[""long""] = ""Num"" dt[""int""] = ""Num"" dt[""short""] = ""Num"" dt[""char""] = ""Num"" dt[""enum""] = ""Enum"" dt[""ULONG""] = ""Num"" dt[""CStyleUrl""] = ""StyleUrl"" dt[""CStyle""] = ""Style"" dt[""CColorValue""] = ""Color"" dt[""CUnitValue""] = ""UnitValue"" dt[""VARIANT_BOOL""] = ""Num"" dt[""OLE_XPOS_PIXELS""] = ""Num"" dt[""OLE_YPOS_PIXELS""] = ""Num"" dt[""OLE_XSIZE_PIXELS""] = ""Num"" dt[""OLE_YSIZE_PIXELS""] = ""Num"" dt[""OLE_XPOS_HIMETRIC""] = ""Num"" dt[""OLE_YPOS_HIMETRIC""] = ""Num"" dt[""OLE_XSIZE_HIMETRIC""] = ""Num"" dt[""OLE_YSIZE_HIMETRIC""] = ""Num"" dt[""OLE_XPOS_CONTAINER""] = ""Float"" dt[""OLE_YPOS_CONTAINER""] = ""Float"" dt[""OLE_XSIZE_CONTAINER""] = ""Float"" dt[""OLE_YSIZE_CONTAINER""] = ""Float"" dt[""OLE_CANCELBOOL""] = ""Num"" dt[""OLE_ENABLEDEFAULTBOOL""] = ""Num"" dt[""IDispatch*""] = ""Object"" dt[""VARIANT""] = ""Variant"" dt[""BYTE""] = ""Num"" dt[""BOOL""] = ""Boolean"" # bt[] # index is property type # value is our abbriviation for the type bt[""void*""]=""NUM"" bt[""DWORD""]=""NUM"" bt[""DISPID""]=""NUM"" bt[""SIZEL*""]=""NUM"" bt[""CStr""] = ""STR"" bt[""BSTR""] = ""BSTR"" bt[""long""] = ""NUM"" bt[""int""] = ""NUM"" bt[""short""] = ""NUM"" bt[""char""] = ""NUM"" bt[""enum""] = ""ENUM"" bt[""ULONG""] = ""NUM"" bt[""CStyleUrl""] = ""STR"" bt[""CStyle""] = ""BSTR"" bt[""CColorValue""] = ""COLOR"" bt[""CUnitValue""] = ""UNITVALUE"" bt[""VARIANT_BOOL""] = ""NUM"" bt[""OLE_XPOS_PIXELS""] = ""NUM"" bt[""OLE_YPOS_PIXELS""] = ""NUM"" bt[""OLE_XSIZE_PIXELS""] = ""NUM"" bt[""OLE_YSIZE_PIXELS""] = ""NUM"" bt[""OLE_XPOS_HIMETRIC""] = ""NUM"" bt[""OLE_YPOS_HIMETRIC""] = ""NUM"" bt[""OLE_XSIZE_HIMETRIC""] = ""NUM"" bt[""OLE_YSIZE_HIMETRIC""] = ""NUM"" bt[""OLE_XPOS_CONTAINER""] = ""FLOAT"" bt[""OLE_YPOS_CONTAINER""] = ""FLOAT"" bt[""OLE_XSIZE_CONTAINER""] = ""FLOAT"" bt[""OLE_YSIZE_CONTAINER""] = ""FLOAT"" bt[""OLE_CANCELBOOL""] = ""NUM"" bt[""OLE_ENABLEDEFAULTBOOL""] = ""NUM"" bt[""IDispatch*""] = ""OBJECT"" bt[""VARIANT""] = ""VARIANT"" bt[""BYTE""] = ""NUM"" bt[""BOOL""] = ""BOOLEAN"" # at[] # index is our internal attributes # value is ordinal at[""name""] = -1 at[""dwflags""] = -1 at[""default""] = -1 at[""object""] = -1 at[""get""] = 1 at[""set""] = 2 at[""bag""] = 3 at[""inherit""] = 4 at[""abstract""] = 5 at[""midl""] = 6 at[""typelib""] = 7 at[""defaultvalue""] = 8 at[""scf""] = 9 at[""spf""] = 10 # vt[] # index is argument type # value is VTS type # BUBUG rgardner not sure of void* this check with istvanc vt[""void*""]=""VTS_PI4"" vt[""DWORD""]=""VTS_I4"" vt[""DISPID""] = ""VTS_I4"" # BUBUG rgardner not sure of SIZEL* this check with istvanc vt[""SIZEL*""] = ""VTS_PI4"" vt[""short""] = ""VTS_I2"" vt[""long""] = ""VTS_I4"" vt[""ULONG""]=""VTS_I4"" vt[""ULONG*""] = ""VTS_PI4"" vt[""int""] = ""VTS_I4"" vt[""float""] = ""VTS_R4"" vt[""double""] = ""VTS_R8"" vt[""CY*""] = ""VTS_CY"" vt[""DATE""] = ""VTS_DATE"" vt[""BSTR""] = ""VTS_BSTR"" vt[""LPCTSTR""] = ""VTS_BSTR"" vt[""IDispatch*""] = ""VTS_DISPATCH"" vt[""SCODE""] = ""VTS_ERROR"" vt[""VARIANT_BOOL""] = ""VTS_BOOL"" vt[""boolean""] = ""VTS_BOOL"" vt[""ERROR""] = ""VTS_ERROR"" vt[""BOOL""] = ""VTS_BOOL"" vt[""VARIANT""] = ""VTS_VARIANT"" vt[""IUnknown*""] = ""VTS_UNKNOWN"" vt[""unsigned char""] = ""VTS_UI1"" vt[""short*""] = ""VTS_PI2"" vt[""long*""] = ""VTS_PI4"" vt[""int*""] = ""VTS_PI4"" vt[""float*""] = ""VTS_PR4"" vt[""double*""] = ""VTS_PR8"" vt[""CY*""] = ""VTS_PCY"" vt[""DATE*""] = ""VTS_PDATE"" vt[""BSTR*""] = ""VTS_PBSTR"" vt[""IDispatch**""] = ""VTS_PDISPATCH"" vt[""SCODE*""] = ""VTS_PERROR"" vt[""VARIANT_BOOL*""] = ""VTS_PBOOL"" vt[""boolean*""] = ""VTS_PBOOL"" vt[""VARIANT*""] = ""VTS_PVARIANT"" vt[""IUnknown**""] = ""VTS_PUNKNOWN"" vt[""unsigned char *""] = ""VTS_PUI1"" vt[""""] = ""VTS_NONE"" vt[""OLE_COLOR""] = ""VTS_COLOR"" vt[""OLE_XPOS_PIXELS""] = ""VTS_XPOS_PIXELS"" vt[""OLE_YPOS_PIXELS""] = ""VTS_YPOS_PIXELS"" vt[""OLE_XSIZE_PIXELS""] = ""VTS_XSIZE_PIXELS"" vt[""OLE_YSIZE_PIXELS""] = ""VTS_YSIZE_PIXELS"" vt[""OLE_XPOS_HIMETRIC""] = ""VTS_XPOS_HIMETRIC"" vt[""OLE_YPOS_HIMETRIC""] = ""VTS_YPOS_HIMETRIC"" vt[""OLE_XSIZE_HIMETRIC""] = ""VTS_XSIZE_HIMETRIC"" vt[""OLE_YSIZE_HIMETRIC""] = ""VTS_YSIZE_HIMETRIC"" vt[""OLE_XPOS_CONTAINER""] = ""VTS_R4"" vt[""OLE_YPOS_CONTAINER""] = ""VTS_R4"" vt[""OLE_XSIZE_CONTAINER""] = ""VTS_R4"" vt[""OLE_YSIZE_CONTAINER""] = ""VTS_R4"" vt[""OLE_TRISTATE""] = ""VTS_TRISTATE"" vt[""OLE_OPTEXCLUSIVE""] = ""VTS_OPTEXCLUSIVE"" vt[""OLE_COLOR*""] = ""VTS_PCOLOR"" vt[""OLE_XPOS_PIXELS*""] = ""VTS_PXPOS_PIXELS"" vt[""OLE_YPOS_PIXELS*""] = ""VTS_PYPOS_PIXELS"" vt[""OLE_XSIZE_PIXELS*""] = ""VTS_PXSIZE_PIXELS"" vt[""OLE_YSIZE_PIXELS*""] = ""VTS_PYSIZE_PIXELS"" vt[""OLE_XPOS_HIMETRIC*""] = ""VTS_PXPOS_HIMETRIC"" vt[""OLE_YPOS_HIMETRIC*""] = ""VTS_PYPOS_HIMETRIC"" vt[""OLE_XSIZE_HIMETRIC*""] = ""VTS_PXSIZE_HIMETRIC"" vt[""OLE_YSIZE_HIMETRIC*""] = ""VTS_PYSIZE_HIMETRIC"" vt[""OLE_TRISTATE*""] = ""VTS_PTRISTATE"" vt[""OLE_OPTEXCLUSIVE*""] = ""VTS_POPTEXCLUSIVE"" vt[""IFontDispatch*""] = ""VTS_FONT"" vt[""IPictureDispatch*""] = ""VTS_PICTURE"" vt[""OLE_HANDLE""] = ""VTS_HANDLE"" vt[""OLE_HANDLE*""] = ""VTS_PHANDLE"" vt[""BYTE""] = ""VTS_BOOL"" # internal types vt[""CStr""] = ""VTS_BSTR"" vt[""CUnitValue""] = ""VTS_I4"" vt[""CStyleUrl""] = ""VTS_BSTR"" vt[""CStyle""] = ""VTS_BSTR"" vt[""CColorValue""] = ""VTS_BSTR"" } { # # the input file contains the file name of the files to process and the output files # fileInput = $1 fileOutput = $2 fileSource = $3 fileLog = $4 ""log"" # fileOutput = fileOutput "".hdl"" files[fileOutput] = 1 print ""Processing file: "" fileInput "" > "" fileOutput "" < "" fileSource > fileLog line = 0 file = """" cfile[fileOutput] = 0 efile[fileOutput] = 0 ifile[fileOutput] = 0 lfile[fileOutput] = 0 while(getline < fileInput > 0) { line++ # strip separators out # gsub(""[\\(\\),;]"", "" "", $0) s = tolower($1) if (s == ""file"") { file = $2 print ""From file: "" file > fileLog } else if (s == ""enum"") { print ""Found enum: "" $2 > fileLog enumLast = $2 # et[] # index is the enum type name # value is the number of enums in ev[] et[$2] = 0 vt[$2] = ""VTS_I4"" vt[$2 ""*""] = ""VTS_PI4"" # ea[] # first index is enum name # second index is enum attribute # value is the attribute value for (i = 3; i <= NF; i++) { split($i, t, ""\\:"") s = tolower(t[1]) ea[$2, s] = t[2] print ""Enum attribute "" s "":"" ea[$2, s] > fileLog } # efile[] # index is the enum type name # value is file the enum should be defined if (fileSource == file) { efile[fileOutput, efile[fileOutput]] = $2 efile[fileOutput]++ print ""eFile: "" fileOutput "" "" efile[fileOutput] "" "" $2 > fileLog } valueLast = 0 } else if (s == ""eval"") { print ""Enum value: "" $2 > fileLog o = et[enumLast]++ # en[] # first index is the enum type name # second is the enum ord # value is enum name en[enumLast, o] = $2 # es[] # first index is the enum type name # second is the enum ord # value is enum string es[enumLast, o] = $2 # ev[] # first index is the enum type name # second is the enum ord # value is enum value for (i = 3; i <= NF; i++) { split($i, t, ""\\:"") s = tolower(t[1]) if (s == ""string"") { es[enumLast, o] = t[2] } else if (s == ""value"") { valueLast = 0 + t[2] } } ev[enumLast, o] = valueLast++ } else if (s == ""class"") { print ""Found class: "" $2 > fileLog classLast = $2 # ct[] # index is class name # value is the number of properties in pt[] ct[$2] = 0 # Automaticaly create vt's for any class pointers encounter # e.g. IDispath* and IDispatch** vt[$2 ""*""] = ""VTS_DISPATCH"" vt[$2 ""**""] = ""VTS_DISPATCH"" # ca[] # first index is class name # second index is class attribute # value is the attribute value for (i = 3; i <= NF; i++) { if (split($i, t, ""\\:"") == 2) { s = tolower(t[1]) ca[$2, s] = t[2] print ""class attr "" s "":"" ca[$2, s] >> fileLog } else { ca[$2, tolower($i)] = 1 print ""class attr "" $i "":"" 1 >> fileLog } } cp[$2] = ca[$2, ""super""] # cfile[] # index is file name # second index is ord # value is class name if (fileSource == file) { cfile[fileOutput, cfile[fileOutput]] = $2 cfile[fileOutput]++ print ""cFile: "" fileOutput "" "" cfile[fileOutput] "" "" $2 > fileLog } else { ca[$2, ""imported""] = 1 } } else if (s == ""property"") { print ""Property: "" $0 > fileLog o = ct[classLast]++ if (classLast == interfaceLast) { print ""Interface property: "" $0 > fileLog # inside an interface declaration, set interface info it[interfaceLast]++ ic[interfaceLast, o] = interfaceLast im[interfaceLast, o] = $2 } # pt[] # first index is class name # second index is property ord # third index is property attribute name # value is property attribute value # pa[] # first index is class name # second index is property ord # third index is property attribute ord # value is property attribute name # pi[] # first index is class name # second index is property name # value is index of property a = 0 pt[classLast, o, ""name""] = $2 pt[classLast, o, ""dwflags""] = ""0"" pt[classLast, o, ""default""] = ""0"" pi[classLast, $2] = o print NF - 2 "" attributes"" > fileLog for (i = 3; i <= NF; i++) { if (split($i, t, ""\\:"") == 2) { s = tolower(t[1]) pt[classLast, o, s] = t[2] pa[classLast, o, a++] = s print s "" : "" t[2] > fileLog at[s] = -1 } else { pt[classLast, o, $i] = at[$i] pa[classLast, o, a++] = $i print $i "" : "" at[$i] > fileLog } } pt[classLast, o] = a s = pt[classLast, o, ""type""] if (!(s in et) && !(s in dt) && !pt[classLast, o, ""abstract""] || !(s in vt)) { print ""*** AWK *** Unknown type: "" s "" in file "" fileInput "" line "" line print $0 print s "" "" dt[s] } # BUGBUG (cthrash) we have a problem here if you really want # the default color to be black. if (s == ""CColorValue"" && pt[classLast, o, ""default""] == 0) { pt[classLast, o, ""default""] = -1 } if (vt[s] == ""VTS_DISPATCH"" && !pt[classLast, o, ""object""]) { pt[classLast, o, ""object""] = s } } else if (s == ""method"") { print ""method: "" $0 > fileLog o = ct[classLast]++ if (classLast == interfaceLast) { print ""Interface method: "" $0 > fileLog # inside an interface declaration, set interface info it[interfaceLast]++ ic[interfaceLast, o] = interfaceLast im[interfaceLast, o] = $3 } # here we are reusing the property arrays but add an other # dimension for the arguments... # pt[] # first index is class name # second index is method ord # third index is method attribute name # value is method attribute value # pa[] # first index is class name # second index is method ord # third index is method attribute ord # value is method attribute name # pi[] # first index is class name # second index is method name # value is index of method a = 0 aa = 0 pt[classLast, o, ""return""] = $2 pt[classLast, o, ""name""] = $3 pi[classLast, $3] = o print NF - 3 "" attributes and args"" > fileLog args = 0 paren = 0 for (i = 3; i <= NF; i++) { s = $i if (split(s, t, ""\\("") == 2) { paren++ if (paren == 1) { s = t[2] } } p = paren if (split(s, t, ""\\)"") == 2) { paren-- if (paren == 0) { s = t[1] } } if (p) { # inside parentheses, processing arguments if (split(s, t, ""\\:"") == 2) { s = tolower(t[1]) pt[classLast, o, args, s] = t[2] pa[classLast, o, args, aa++] = s print ""Argument "" args "" attribute "" s "" : "" t[2] > fileLog if (s != ""defaultvalue"") { at[s] = -1 } if (s == ""arg"") { pt[classLast, o, args] = aa args++ aa = 0 } else if (s == ""type"") { s = t[2] if (!(s in vt)) { print ""*** AWK *** Unknown type: "" s "" in file "" fileInput "" line "" line print $0 print s "" "" vt[s] } } } else { pt[classLast, o, args, s] = at[s] pa[classLast, o, args, aa++] = s print ""Argument "" args "" attribute "" s "" : "" at[s] > fileLog } } else { # outside parentheses, processing method attributes if (split(s, t, ""\\:"") == 2) { s = tolower(t[1]) pt[classLast, o, s] = t[2] pa[classLast, o, a++] = s print s "" : "" t[2] > fileLog at[s] = -1 } else { pt[classLast, o, s] = at[s] pa[classLast, o, a++] = s print s "" : "" at[s] > fileLog } } } pt[classLast, o] = a if (args) { pt[classLast, o, ""func""] = args } else { pt[classLast, o, ""func""] = -1 } print args "" argument in "" $3 > fileLog } else if (s == ""interface"" || s == ""event"") { print ""Found interface: "" $2 > fileLog interfaceLast = $2 classLast = $2 if (s == ""event"") { ia[intefaceLast, ""typelib""] = 1 } if ((interfaceLast in it) && !ia[interfaceLast, ""abstract""]) { print ""*** AWK *** interface "" interfaceLast "" is redefined"" print $0 } # it[] # index is interface name # value is the number of properties/methods in it[] it[$2] = 0 # Automaticaly create vt's for any class pointers encounter # e.g. IDispath* and IDispatch** vt[$2 ""*""] = ""VTS_DISPATCH"" vt[$2 ""**""] = ""VTS_DISPATCH"" # ia[] # first index is interface name # second index is interface attribute # value of the interface attribute ia[$2, s] = 1 for (i = 3; i <= NF; i++) { if (split($i, t, ""\\:"") == 2) { s = tolower(t[1]) ia[$2, s] = t[2] print ""interface attr "" s "":"" ia[$2, s] >> fileLog } else { ia[$2, tolower($i)] = 1 print ""interface attr "" $i "":"" 1 >> fileLog } } ip[$2] = ia[$2, ""super""] # ifile[] # index is the interface name # value is file the interface should be declared if (fileSource == file) { ifile[fileOutput, ifile[fileOutput]] = $2 ifile[fileOutput]++ print ""iFile: "" fileOutput "" "" ifile[fileOutput] "" "" $2 > fileLog } } else if (s == ""refprop"") { print ""Interface ref property: "" $0 > fileLog o = it[interfaceLast]++ split($2, t, ""\\:"") # ic[] # first index is interface name # second index is property/method ord # value is class name the property/method is implemented ic[interfaceLast, o] = t[1] # im[] # first index is interface name # second index is property/method ord # value is the name of the property/method im[interfaceLast, o] = t[2] print ""Ref property "" o "" ("" ic[interfaceLast, o] "":"" im[interfaceLast, o] > fileLog } else if (s == ""refmethod"") { print ""Interface ref method: "" $0 > fileLog o = it[interfaceLast]++ split($2, t, ""\\:"") # ic[] # first index is interface name # second index is property/method ord # value is class name the property/method is implemented ic[interfaceLast, o] = t[1] # im[] # first index is interface name # second index is property/method ord # value is the name of the property/method im[interfaceLast, o] = t[2] print ""Ref method "" o "" ("" ic[interfaceLast, o] "":"" im[interfaceLast, o] > fileLog } else if (s == ""import"") { print ""Import file: "" $2 "" "" fileSource "" "" fileOutput "" "" file > fileLog # lfile[] # index is import file name # value is fileOutput if (fileSource == file) { lfile[fileOutput, lfile[fileOutput]] = tolower($2) lfile[fileOutput]++ print ""lFile: "" fileOutput "" "" lfile[fileOutput] "" "" tolower($2) > fileLog } } } close(fileInput) if (line == 0) { print ""*** AWK *** Couldn't open \\"""" fileInput ""\\"" for input"" } # CheckFile(fileOutput "".hdl"") # CheckFile(fileOutput "".idl"") } END { print ""Generating results"" > fileLog for (file in files) { fileRoot = file file = fileRoot "".idl"" # idl part hfile = 0 print ""\\n// "" file ""\\n"" > file # print ""#ifdef _idl_\\n"" >> file print ""#if !defined(__MKTYPLIB__) && !defined(TYPE_PHASE2)\\n"" >> file for (iimport = 0; iimport < lfile[fileRoot]; iimport++) { f = lfile[fileRoot, iimport] # # generate import statements for parent files # sub("".pdl"", "".idl"", f) # print ""#define _idl_"" >> file print ""import \\"""" f ""\\"";\\n"" >> file } print ""#endif // !__MKTYPLIB__ && !TYPE_PHASE2"" >> file for (ienum = 0; ienum < efile[fileRoot]; ienum++) { enum = efile[fileRoot, ienum] # # generate IDL enum declarations o be included # in the IDL file # if (ea[enum, ""guid""]) { print ""Generate IDL for enum:"" enum > fileLog GenerateEnumDescIDL(enum, file) hfile++ } } for (iinterface = 0; iinterface < ifile[fileRoot]; iinterface++) { interface = ifile[fileRoot, iinterface] # # generate IDL interface declarations to be included # in the IDL file # print ""Generate IDL for interface:"" interface > fileLog GenerateInterfaceDecl(interface, file) hfile++ } for (iclass = 0; iclass < cfile[fileRoot]; iclass++) { class = cfile[fileRoot, iclass] # # generate coclass declaration # print ""Generate ODL coclass for class:"" class > fileLog GenerateCoClassDecl(class, file) print ""cpp_quote(\\""EXTERN_C const GUID CLSID_"" ca[class, ""name""] "";\\"")\\n\\n"" >> file } # print ""#endif _idl_\\n"" >> file # print ""#undef _idl_\\n"" >> file close(file) file = fileRoot "".hdl"" print ""\\n// "" file ""\\n"" > file # hxx part print ""#ifdef _hxx_\\n"" >> file if (hfile) { print ""#include \\"""" fileRoot "".h\\""\\n"" >> file } for (ienum = 0; ienum < efile[fileRoot]; ienum++) { enum = efile[fileRoot, ienum] # # generate HXX enum declaration to be included # in the HXX file # print ""Generate HXX for enum:"" enum > fileLog GenerateEnumDescHXX(enum, file) } for (iclass = 0; iclass < cfile[fileRoot]; iclass++) { class = cfile[fileRoot, iclass] # # generate DISPIDs to be included # in the HXX file # print ""Generate HXX for class:"" class > fileLog GenerateDISPIDs(class, file) print ""EXTERN_C const GUID CLSID_"" ca[class, ""name""] "";\\n\\n"" >> file } for (iinterface = 0; iinterface < ifile[fileRoot]; iinterface++) { interface = ifile[fileRoot, iinterface] # # generate DISPIDs to be included # in the HXX file # print ""Generate HXX for interface:"" interface > fileLog GenerateDISPIDs(interface, file) if (ia[interface, ""event"" ]) print ""EXTERN_C const GUID DIID_"" interface "";"" >> file; } print ""#endif _hxx_\\n"" >> file print ""#undef _hxx_\\n"" >> file # cxx part print ""#ifdef _cxx_\\n"" >> file for (ienum = 0; ienum < efile[fileRoot]; ienum++) { enum = efile[fileRoot, ienum] # # generate CXX enum description structures to be included # in the CXX file # print ""Generate CXX for enum:"" enum > fileLog GenerateEnumDescCXX(enum, file) } for (iclass = 0; iclass < cfile[fileRoot]; iclass++) { class = cfile[fileRoot, iclass] # # generate CXX property description structures and array of pointers # to them to be included in the CXX file # print ""Generate CXX for class:"" class > fileLog GeneratePropertyDesc(class, file) if (ca[class, ""super""] != """") { GenerateExternProp(ca[class, ""super""], file) } if (ct[class]) { print ""\\nconst PROPERTYDESC * const "" class ""::s_appropdescs [] = {"" >> file GenerateReferProp(class, file) print ""NULL };\\n"" >> file } GeneratePropMethodImpl(class, file) } print ""#endif _cxx_\\n"" >> file print ""#undef _cxx_\\n"" >> file # class part for (iclass = 0; iclass < cfile[fileRoot]; iclass++) { class = cfile[fileRoot, iclass] # # generate HXX property get/set methods for the header file to be included # in the HXX file into the class declaration # print ""#ifdef _"" class ""_\\n"" >> file print ""Generate HXX for class:"" class > fileLog if (ca[class, ""interface""] && ca[class, ""tearoff""]) { print ""static HRESULT (__stdcall CVoid::*s_apfn"" ca[class, ""interface""] ""[])(void);"" >> file } GeneratePropMethodDecl(class, file) if (ca[class, ""events""]) { GenerateEventFireDecl(ca[class, ""events""], file) } print ""#endif _"" class ""_\\n"" >> file print ""#undef _"" class ""_\\n"" >> file } close(file) } }",16269,True,2678.4789338343844,median "#!/usr/bin/awk -f # generated by smpg.awk 1.0 # function DESCRIPT() { return \\ ""included files:\\n""\\ ""_smpg_doc.awk\\n""\\ ""_smpg_generate.awk\\n""\\ ""awklib_fsm.awk\\n""\\ ""awklib_array.awk\\n""\\ ""awklib_vect.awk\\n""\\ ""awklib_prep.awk\\n""\\ ""awklib_tabs.awk\\n""\\ ""awklib_prog.awk\\n""\\ ""awklib_read.awk\\n""\\ ""\\n""\\ ""fsm rules:\\n""\\ ""begin -> include\\n""\\ ""include -> fsm\\n""\\ ""fsm -> handler\\n""\\ ""handler -> handler | template\\n""\\ ""template -> template | other\\n""\\ ""other -> generate\\n""\\ ""generate -> begin\\n""\\ ""\\n""\\ ""'->' is read as 'must be followed by'\\n""\\ ""'|' is read as 'or'"" } # # # smpg.awk # Vladimir Dinev # vld.dinev@gmail.com # 2021-10-02 # BEGIN {enter()} END {leave()} /^;|^[[:space:]]*$/ {next} /^%/ {transition(remove_perc($1)); next} {equit(""line not source or a comment"")} # # function SCRIPT_NAME() {return ""smpg.awk""} function SCRIPT_VERSION() {return ""1.0""} function main() { # called in the 'generate' state generate_all() out_print() } # # function enter() { set_program_name(SCRIPT_NAME()) if (Help || Version || Doc || Template || ExampleInput || ExampleData) { if (Help) print_help() else if (Version) print_version() else if (Doc) print_doc() else if (Template) print_template_code() else if (ExampleInput) print_example_input() else if (ExampleData) print_example_data() skip_end_set() exit_success() } if (ARGC != 2) { pstderr(get_use_str()) pstderr(sprintf(""Try: %s -vHelp=1"", get_program_name())) skip_end_set() exit_failure() } } function leave( _st) { if (!did_error_happen() && !should_skip_end()) { if ((_st = get_state()) != STM_GENERATE()) err_expect(STM_GENERATE(), _st, ""end-of-file"") } } function get_state() {return stm_get_state(B_the_fsm)} function transition(st) {stm_next(B_the_fsm, st)} function remove_perc(str) { sub(""^%"", """", str) return str } function str_cat(a, b, sep) { return (a ? (a (sep ? sep : SUBSEP) b) : b) } function equit(msg, line_no) { if (!line_no) line_no = FNR error_quit(sprintf(""file '%s' line %s: %s"", FILENAME, line_no, msg)) } function err_expect(expect, got, line_no) { equit(sprintf(""expected '%s', got '%s' instead"", expect, got), line_no) } function init() { fsm_init() include_init() handler_init() template_init() other_init() } function BLOCK_END() {return ""^%end""} function BLOCK_COMMENT() {return ""^[[:space:]]*;""} function get_src( _arr, _len) { _len = read_lines(_arr, BLOCK_END(), BLOCK_COMMENT()) return arr_to_str(_arr, _len, ""\\n"") } function get_block(arr_out, _len) { _len = read_lines(arr_out, BLOCK_END()) arr_gsub(arr_out, _len, ""^[[:space:]]+|[[:space:]]+$"", """") arr_sub(arr_out, _len, ""^[[:space:]]*;.*$"", """") return _len } function out_print() { arr_print(B_vect_output, vect_len(B_vect_output), ""\\n"") } function out_append_str(str) { vect_push(B_vect_output, str) } function out_append_arr(arr, len) { vect_push_arr(B_vect_output, arr, len) } # # # # 'fsm' function fsm_init() { vect_init(B_vect_fsm) vect_init(B_vect_fsm_line_no) } function fsm_save_line(line, line_no) { vect_push(B_vect_fsm, line) vect_push(B_vect_fsm_line_no, line_no) } function fsm_save_name(str) {B_fsm_name = str} function fsm_get_fsm_src(arr_out) { return arr_copy(arr_out, B_vect_fsm, vect_len(B_vect_fsm)) } function fsm_get_line_no(n) {return B_vect_fsm_line_no[n]} function fsm_get_name() {return B_fsm_name} function fsm_syntax_error() { equit(sprintf(""syntax should be '%%%s '"", STM_FSM())) } # 'include' function include_init() { vect_init(B_vect_include) vect_init(B_vect_include_line_no) } function include_save_line(line, line_no) { vect_push(B_vect_include, line) vect_push(B_vect_include_line_no, line_no) } function include_get_num() {return vect_len(B_vect_include)} function include_get_line_no(n) {return B_vect_include_line_no[n]} function include_get_fname(n) {return B_vect_include[n]} function include_get_file_names(arr_out) { return arr_copy(arr_out, B_vect_include, vect_len(B_vect_include)) } # 'handler' function handler_init() { B_map_handler[""""] delete B_map_handler } function handler_map_rx_args(rx, arg_str, _arr, _len, _args) { # str is assumed to be '%handler [args]' _len = split(arg_str, _arr) _arr[1] = _arr[2] = "" "" _args = arr_to_str(_arr, _len, "" "") sub(""^[[:space:]]+"", """", _args) B_map_handler[rx, ""args""] = _args } function handler_save_rx(rx) { B_handler_rx_list = str_cat(B_handler_rx_list, rx) } function handler_map_rx_src(rx, str) {B_map_handler[rx, ""src""] = str} function handler_get_rx_src(rx) {return B_map_handler[rx, ""src""]} function handler_get_rx_args(rx) {return B_map_handler[rx, ""args""]} function handler_get_rx_all(arr_out) { return split(B_handler_rx_list, arr_out, SUBSEP) } function handler_syntax_error() { equit(sprintf(""syntax should be '%%%s [args]'"", STM_HANDLER())) } # 'template' function template_init() { B_map_template[""""] delete B_map_template } function template_save_rx(rx) { B_template_rx_list = str_cat(B_template_rx_list, rx) } function template_map_rx_src(rx, str) {B_map_template[rx, ""src""] = str} function template_get_rx_src(rx) {return B_map_template[rx, ""src""]} function template_get_rx_all(arr_out) { return split(B_template_rx_list, arr_out, SUBSEP) } function template_syntax_error() { equit(sprintf(""syntax should be '%%%s '"", STM_TEMPLATE())) } # 'other' function other_init() {B_other_src = """"} function other_save_src(str) {B_other_src = str} function other_get_src() {return B_other_src} # # # function stm_on_begin() { init() } function stm_on_include( _arr, _len, _fnr, _i, _line) { _fnr = FNR _len = get_block(_arr) for (_i = 1; _i <= _len; ++_i) { _line = _arr[_i] if (_line) include_save_line(_arr[_i], _fnr+_i) } } function stm_on_fsm( _arr, _len, _fnr, _i, _line) { if (NF > 1) { fsm_save_name($2) _fnr = FNR _len = get_block(_arr) if (!_len) equit(""'fsm' block empty"") for (_i = 1; _i <= _len; ++_i) { _line = _arr[_i] if (_line) fsm_save_line(_arr[_i], _fnr+_i) } } else { fsm_syntax_error() } } function stm_on_handler() { if (NF > 1) { handler_save_rx($2) handler_map_rx_args($2, $0) handler_map_rx_src($2, get_src()) } else { handler_syntax_error() } } function stm_on_template() { if (NF > 1) { template_save_rx($2) template_map_rx_src($2, get_src()) } else { template_syntax_error() } } function stm_on_other() { other_save_src(get_src()) } function stm_on_generate() { main() } function stm_on_error(curr_st, expected, got) { err_expect(expected, got) } # # function STM_BEGIN() {return ""begin""} function STM_INCLUDE() {return ""include""} function STM_FSM() {return ""fsm""} function STM_HANDLER() {return ""handler""} function STM_TEMPLATE() {return ""template""} function STM_OTHER() {return ""other""} function STM_GENERATE() {return ""generate""} function _STM_STATE() {return ""state""} # # function stm_get_state(stm) {return stm[_STM_STATE()]} function _stm_set_state(stm, next_st) {stm[_STM_STATE()] = next_st} function stm_next(stm, next_st, _st) { _st = stm_get_state(stm) if ("""" == _st) { if (STM_BEGIN() == next_st) {stm_on_begin(); _stm_set_state(stm, next_st)} else {stm_on_error(_st, STM_BEGIN(), next_st)} } else if (STM_BEGIN() == _st) { if (STM_INCLUDE() == next_st) {stm_on_include(); _stm_set_state(stm, next_st)} else {stm_on_error(_st, STM_INCLUDE(), next_st)} } else if (STM_INCLUDE() == _st) { if (STM_FSM() == next_st) {stm_on_fsm(); _stm_set_state(stm, next_st)} else {stm_on_error(_st, STM_FSM(), next_st)} } else if (STM_FSM() == _st) { if (STM_HANDLER() == next_st) {stm_on_handler(); _stm_set_state(stm, next_st)} else {stm_on_error(_st, STM_HANDLER(), next_st)} } else if (STM_HANDLER() == _st) { if (STM_HANDLER() == next_st) {stm_on_handler(); _stm_set_state(stm, next_st)} else if (STM_TEMPLATE() == next_st) {stm_on_template(); _stm_set_state(stm, next_st)} else {stm_on_error(_st, STM_HANDLER()""|""STM_TEMPLATE(), next_st)} } else if (STM_TEMPLATE() == _st) { if (STM_TEMPLATE() == next_st) {stm_on_template(); _stm_set_state(stm, next_st)} else if (STM_OTHER() == next_st) {stm_on_other(); _stm_set_state(stm, next_st)} else {stm_on_error(_st, STM_TEMPLATE()""|""STM_OTHER(), next_st)} } else if (STM_OTHER() == _st) { if (STM_GENERATE() == next_st) {stm_on_generate(); _stm_set_state(stm, next_st)} else {stm_on_error(_st, STM_GENERATE(), next_st)} } else if (STM_GENERATE() == _st) { if (STM_BEGIN() == next_st) {stm_on_begin(); _stm_set_state(stm, next_st)} else {stm_on_error(_st, STM_BEGIN(), next_st)} } } # # # # ./src/_smpg_doc.awk # function print_help() { print SCRIPT_NAME() "" -- a finite state machine parser generator"" print get_use_str() print_nl() print ""All options are supplied in the typical '-v' awk fashion."" print_nl() print ""Options:"" print ""-v Doc=1"" print ""Print a description of the fsm parser idea and documentation for "" SCRIPT_NAME() print ""If you unsure where to start, start here."" print_nl() print ""-v Template=1"" print ""Print only the boilerplate code from the Doc option."" print_nl() print ""-v ExampleInput=1"" print ""Print an example parser description."" print_nl() print ""-v ExampleData=1"" print ""Print example data for the parser which can be generated from ExampleInput."" print_nl() print ""-v Help=1"" print ""Print this screen."" print_nl() print ""-v Version=1"" print ""Print version info."" print_nl() print ""To run the example:"" print ""# get the parser description"" print ""awk -f "" SCRIPT_NAME() "" -v ExampleInput=1 > example.smpg"" print ""# generate the parser from the description"" print ""awk -f "" SCRIPT_NAME() "" example.smpg > example.smpg.awk"" print ""# get example data for the generated parser"" print ""awk -f "" SCRIPT_NAME() "" -v ExampleData=1 > example.data.txt"" print ""# give the data to the parser to generate a runnable test program"" print ""awk -f example.smpg.awk example.data.txt > example.test.awk"" print ""# finally, run the test program"" print ""awk -f example.test.awk"" print ""# clean up"" print ""rm example.smpg example.smpg.awk example.data.txt example.test.awk"" } function print_version() { print sprintf(""%s %s"", SCRIPT_NAME(), SCRIPT_VERSION()) } function get_use_str() { return sprintf(""Use: %s [options] "", SCRIPT_NAME()) } function print_doc() { print ""1. Idea:"" print ""A finite state machine parser recognizes a declarative language and is able"" print ""to call user defined callbacks when each rule of that language is encountered."" print ""When this is combined with awk's abilities for text processing, it becomes"" print ""trivial to ensure correctness of input. The parser is line oriented and the"" print ""first field of each line is the next state machine state. E.g. if the fsm was"" print ""defined as:"" print_nl() print ""foo -> bar"" print ""bar -> foo"" print_nl() print ""i.e. a 'foo' has to be followed by a 'bar', and a 'bar' has to be followed"" print ""by a 'foo', then the parser will recognize files which look like:"" print_nl() print ""foo "" print ""bar "" print ""foo "" print ""bar "" print ""..."" print_nl() print ""That is, the first line must begin with 'foo', the one after that with 'bar',"" print ""the one after that with 'foo' again and so on. Anything else than this"" print ""constitutes an error and parsing stops. Each time 'foo' is read, a on_foo()"" print ""function is called. This function is user defined and inside it is very"" print ""easy to check if you have the , what that actually is,"" print ""save it for later processing, etc. Respectively, a on_bar() function is called"" print ""when a 'bar' is read. It is also very easy to make the parser read whole blocks"" print ""instead of single lines by calling 'getline' from inside the handlers until"" print ""some delimiter is read, e.g. 'end':"" print_nl() print ""foo"" print """" print """" print ""..."" print ""end"" print ""bar"" print """" print """" print ""..."" print ""end"" print_nl() print ""2. "" SCRIPT_NAME() print SCRIPT_NAME() "" is a fsm parser as described above which uses its input to"" print ""generate another fsm parser. I.e. "" SCRIPT_NAME() "" is a fsm parser which"" print ""takes a description of an fsm parser as input and outputs the fsm parser"" print ""defined by that description. In practice, it's a lot simpler than it sounds."" print SCRIPT_NAME() "" has the ability to include text, external files, and generate"" print ""source code by regex text substitution. This gives it the ability to also"" print ""generate itself. The description of "" SCRIPT_NAME() "" is:"" print_nl() print DESCRIPT() print_nl() print ""The included files are libraries and other functionality. The fsm rules"" print ""are prepended by a '%', so they are distinguishable from their data. Lines"" print ""which begin with a ';' are comments. Comments are only single line and take"" print ""the whole line. The 'begin' and 'generate' state must appear alone on a line."" print ""All other states are block oriented and delimited by '%end'. The full syntax"" print ""is described below:"" print_nl() print_template_code() print_nl() } function print_template_code() { print ""; any line which begins with a ';' is a comment"" print ""; the '%begin' states tells the parser to initialize its data structures"" print_begin() print_nl() print_include() print ""; this block must exist even if empty"" print ""; any file names which appear here will be appended verbatim to"" print ""; the final script"" print ""; this is one way to get libraries and other code in your parser"" print_end() print_nl() print_fsm("""") print ""; the syntax for the '%fsm' state is '%fsm '"" print ""; the is prepended to all generated fsm functions"" print ""; the rest of the text in this block is the fsm specification for the"" print ""; parser which is to be generated"" print ""; each fsm state gets its own handler function with the name:"" print ""; '_on_()'"" print ""; an implicit error handler with the name and arguments:"" print ""; '_on_error(curr_st, expected, got)' is also generated"" print ""; for details on the fsm description syntax see examples, or awklib_fsm.awk"" print_end() print_nl() print_handler("" [args]"") print ""; is matched against the state names specified in the '%fsm' state"" print ""; the non-comment text in this block then appears in the body of the handlers"" print ""; for the state names which matched"" print ""; any appearance of '{&}' in this text is replaced by the state name which"" print ""; matched once for each match"" print ""; [args], if given, are pasted verbatim in each handler's argument list"" print ""; e.g., given:"" print ""; '%handler a|b _foo, _bar"" print ""; \\t{&}_save($0)"" print ""; %end"" print ""; function m_on_a( _foo, _bar) {"" print ""; \\ta_save($0)"" print ""; }"" print ""; function m_on_b( _foo, _bar) {"" print ""; \\tb_save($0)"" print ""; }"" print ""; is generated, assuming 'm' is the name given in '%fsm' and 'a' and 'b' are"" print ""; state names which appear in the specification for 'm'"" print ""; an arbitrary number of '%handler' blocks can appear after each other,"" print ""; however, once a state name is matched, it is not consider in subsequent"" print ""; '%handler' blocks"" print_end() print_nl() print_template("""") print ""; the '%template' block works much like the '%handler' block, except that"" print ""; the '%template' block is used to generate functions, rather than source"" print ""; for a specific function, e.g."" print ""; %template a|b"" print ""; \\tfunction {&}_save(str) {_{&}_arr[++_{&}_arr_len] = str}"" print ""; %end"" print ""; will generate"" print ""; function a_save(str) {_a_arr[++_a_arr_len] = str}"" print ""; function b_save(str) {_b_arr[++_b_arr_len] = str}"" print ""; again, assuming 'a' and 'b' are states of 'm' as above"" print ""; like '%handler', an arbitrary number of '%template' blocks can appear after"" print ""; each other and once a state has matched it is not considered in any further"" print ""; matching"" print_end() print_nl() print_other() print ""; any non-comment text which appears in this block is pasted verbatim in"" print ""; the final script"" print_end() print_nl() print ""; source generation begins when the '%generate' state is reached"" print ""; since the parser is a fsm, '%generate' is reached only if all input"" print ""; is correct"" print_generate() } function print_nl() {print """"} function print_begin() {print ""%begin""} function print_generate() {print ""%generate""} function print_include() {print ""%include""} function print_fsm(str) {print (""%fsm "" str)} function print_handler(str) {print (""%handler "" str)} function print_template(str) {print (""%template "" str)} function print_other() {print ""%other""} function print_end() {print ""%end""} function print_example_input() { print ""; this is example "" SCRIPT_NAME() "" input"" print ""; it generates an awk finite state machine parser which generates an awk"" print ""; test program for a few trivial math functions along with these functions"" print ""; the generated state machine parser will accept files with the format:"" print "";"" print ""; begin"" print ""; func_name "" print ""; input "" print ""; output "" print ""; generate"" print "";"" print ""; each 'func_name' can have one or more inputs and outputs, however, each"" print ""; input must have an output after a 'generate', another 'begin' can follow"" print_nl() print_begin() print_nl() print_include() tabs_inc() tabs_print(""; this block must exist even if empty any file whose name appears here"") tabs_print(""; will be appended to the final script verbatim"") tabs_dec() print_end() print_nl() print ""; the syntax for the fsm block is '%fsm '"" print ""; prefixes the generated fsm functions"" print_fsm(""stm"") tabs_inc() tabs_print(""begin -> func_name"") tabs_print(""func_name -> input"") tabs_print(""input -> output"") tabs_print(""output -> input | generate"") tabs_print(""generate -> begin"") tabs_dec() print_end() print_nl() print ""; the syntax for the handler block is '%handler [args]'"" print ""; is a regular expression which gets matched against all"" print ""; state machine states in order"" print ""; if [args] appear, they are pasted literally in the"" print ""; handler's argument list"" print_handler(""begin"") tabs_inc() tabs_print(""; any code here will appear in the stm_on_begin() function"") tabs_print(""init()"") tabs_dec() print_end() print_nl() print ""; the '{&}' will be replaced by each handler's name"" print_handler(""func_name|input|output"") tabs_inc() tabs_print(""; this is going to generate the same type of code for the three handlers"") tabs_print(""; specified by the regex"") tabs_print(""check_for_data()"") tabs_print(""{&}_save($2)"") tabs_dec() print_end() print_nl() print_handler(""generate"") tabs_inc() tabs_print(""{&}()"") tabs_dec() print_end() print_nl() print_handler(""error"") tabs_inc() tabs_print(""; the error handler has these implicit arguments as per awklib_fsm"") tabs_print(""error(\\""line \\"" FNR \\"": expected \\"" expected \\"", got \\"" got)"") tabs_dec() print_end() print_nl() print ""; the template block works much like the handler blocks, except that a"" print ""; template blocks generates general awk source code, while the handler"" print ""; block generates the source for a specific handler function"" print ""; the syntax for a template block is '%template '"" print_template(""func_name|input|output"") print ""function {&}_save(str) {_{&}_data[++_{&}_num] = str}"" print ""function {&}_count() {return _{&}_num}"" print ""function {&}_get(n) {return _{&}_data[n]}"" print ""function {&}_clear() {delete _{&}_data; _{&}_num = 0}"" print_end() print_nl() print ""; everything in the '%other' block gets pasted as is in the final script"" print ""; except any ';' line comments"" print ""; here's where all the plumbing can get defined"" print_other() print ""function error(msg) {print \\""error: \\"" msg; exit(1)}"" print ""function check_for_data() {"" tabs_inc() tabs_print(""if (NF < 2)"") tabs_inc() tabs_print(""error(sprintf(\\""line %d: data expected\\"", FNR))"") tabs_dec() tabs_dec() tabs_print(""}"") print ""function init() {"" tabs_inc() tabs_print(""func_name_clear()"") tabs_print(""input_clear()"") tabs_print(""output_clear()"") tabs_dec() print ""}"" print ""BEGIN { "" print ""\\tprint \\""function error(msg) {print \\\\\\""error: \\\\\\"" msg; exit(1)}\\"""" print ""\\tprint \\""function abs(n) {return (n < 0) ? -n : n}\\"""" print ""\\tprint \\""function square(n) {return n*n}\\"""" print ""\\tprint \\""BEGIN {\\"""" print ""}"" print ""function generate( _func_name, _i, _end, _str) {"" tabs_inc() tabs_print(""_func_name = func_name_get(1)"") tabs_print(""_end = input_count()"") tabs_print(""for (_i = 1; _i <= _end; ++_i) {"") tabs_inc() tabs_print(""_str = sprintf(\\""%s(%s) != %s\\"","") tabs_print(""_func_name, input_get(_i), output_get(_i))"") tabs_print(""print sprintf(\\""\\\\tif (%s)\\"", _str)"") tabs_print(""print \\""\\\\t\\\\terror(\\\\\\""\\"" _str \\""\\\\\\"")\\"""") tabs_dec() tabs_print(""}"") tabs_dec() print ""}"" print ""END { print \\""}\\""}"" print ""/^[[:space:]]*#|^[[:space:]]*$/ {next}"" print ""{stm_next(the_stm, $1)}"" print_end() print_nl() print_generate() } function print_example_data() { print ""begin"" print ""func_name abs"" print ""input -5"" print ""output 5"" print ""input 10"" print ""output 10"" print ""generate"" print """" print ""begin"" print ""func_name square"" print ""input 5"" print ""output 25"" print ""input 6"" print ""output 36"" print """" print ""# intentional error"" print ""input 7"" print ""output 94"" print ""generate"" } # # ./src/_smpg_generate.awk # function generate_all() { generate_head() nl() generate_descr() nl() generate_other() nl() generate_templates_and_fsm() nl() generate_includes() } function nl() {out_append_str("""")} function generate_head() { out_append_str(""#!/usr/bin/awk -f"") nl() out_append_str(sprintf(""# generated by %s %s"", SCRIPT_NAME(), SCRIPT_VERSION())) } function generate_descr( _arr, _len) { out_append_str(""# "") out_append_str(""function DESCRIPT() {"") out_append_str(""return \\\\"") out_append_str(""\\""included files:\\\\n\\""\\\\"") _len = include_get_file_names(_arr) arr_sub(_arr, _len, ""^.*/"", ""\\"""") arr_sub(_arr, _len, ""$"", ""\\\\n\\""\\\\"") out_append_arr(_arr, _len) out_append_str(""\\""\\\\n\\""\\\\"") out_append_str(""\\""fsm rules:\\\\n\\""\\\\"") _len = fsm_get_fsm_src(_arr) arr_sub(_arr, _len, ""^"", ""\\"""") arr_sub(_arr, _len, ""$"", ""\\\\n\\""\\\\"") out_append_arr(_arr, _len) out_append_str(""\\""\\\\n\\""\\\\"") out_append_str(""\\""'->' is read as 'must be followed by'\\\\n\\""\\\\"") out_append_str(""\\""'|' is read as 'or'\\"""") out_append_str(""}"") out_append_str(""# "") } function generate_other() { out_append_str(""# "") out_append_str(other_get_src()) out_append_str(""# "") } function generate_templates_and_fsm( _arr_fsm_src, _arr, _len) { _len = fsm_get_fsm_src(_arr_fsm_src) _len = fsm_make(_arr, _arr_fsm_src, _len, fsm_get_name(), FSM_EVENT()) if (!_len) equit(sprintf(""fsm: %s"", _arr[2]), fsm_get_line_no(_arr[1])) enrich_templates_and_handlers(_arr, _len) out_append_arr(_arr, _len) } function enrich_templates_and_handlers(arr, len, _arr_hndl_ind, _arr_nm, _arr_nm_cpy, _len_nm, _i, _end, _j, _name, _rx, _prep_map, _args, _hind, _tmplt, _arr_rxs) { _end = get_handler_start(_arr_hndl_ind, arr, len) _len_nm = get_handler_names(_arr_nm, arr, _arr_hndl_ind, _end) arr_copy(_arr_nm_cpy, _arr_nm, _len_nm) _end = template_get_rx_all(_arr_rxs) if (_end) { _tmplt = ""# "" for (_i = 1; _i <= _end; ++_i) { _rx = _arr_rxs[_i] _tmplt = (_tmplt ""\\n"" sprintf(""# '%s'"", _rx)) for (_j = 1; _j <= _len_nm; ++_j) { _name = _arr_nm_cpy[_j] if (_name && match(_name, _rx)) { _arr_nm_cpy[_j] = """" _hind = _arr_hndl_ind[_j] _prep_map[""&""] = _name _tmplt = (_tmplt ""\\n""\\ prep_str(template_get_rx_src(_rx), _prep_map) \\ ""\\n"") } } } _tmplt = (_tmplt ""# \\n"") arr[1] = (_tmplt ""\\n"" arr[1]) } _end = handler_get_rx_all(_arr_rxs) if (_end) { for (_i = 1; _i <= _end; ++_i) { _rx = _arr_rxs[_i] _args = handler_get_rx_args(_rx) for (_j = 1; _j <= _len_nm; ++_j) { _name = _arr_nm[_j] if (_name && match(_name, _rx)) { _arr_nm[_j] = """" _hind = _arr_hndl_ind[_j] if (_args) { sub(""\\\\)"", sprintf("" %s)"", _args), arr[_hind]) } _prep_map[""&""] = _name arr[_hind+1] = prep_str(handler_get_rx_src(_rx), _prep_map) } } } } } function get_handler_start(arr_out, arr, len) { return arr_match_ind_all(arr_out, arr, len, ""function .*on_"") } function get_handler_names(arr_out, arr_src, arr_ind, ind_len) { arr_gather(arr_out, arr_src, arr_ind, ind_len) arr_gsub(arr_out, ind_len, ""function .*on_|\\\\(.*$"", """") return ind_len } function generate_includes( _i, _end, _arr, _len, _fname) { out_append_str(""# "") _end = include_get_num() for(_i = 1; _i <= _end; ++_i) { _fname = include_get_fname(_i) out_append_str(sprintf(""# %s"", _fname)) _len = read_file(_fname, _arr) if (_len < 0) { equit(sprintf(""reading '%s': %s"", _fname, ERRNO), include_get_line_no(_i)) } out_append_arr(_arr, _len) } out_append_str(""# "") } # # ../awklib/src/awklib_fsm.awk #@ #@ Library: fsm #@ Description: Generates awk source code for finite state machines. #@ Takes input in the form of: #@ 'x -> y' or 'x -> y | z | ...' #@ where 'x', 'y', and 'z' are states. '->' is read as 'is followed by'. #@ '|' is read as 'or'. A state must be followed by one or more states. #@ #@ Two kinds of state machines can be generated - an event fsm and a #@ loop fsm. The event fsm generates events on each state transition. #@ E.g. given #@ #@ a -> b | c #@ b -> c #@ c -> a #@ #@ an event fsm will start in the implicit empty state. From there the #@ user requests state changes by calling the 'next()' function with the #@ desired next state as an argument. From the empty state, the fsm will #@ be able to go only to state 'a' and the 'on_a()' handler will be #@ called before the state switch. From state 'a', the fsm will be able #@ to go only to state 'b', or 'c', calling 'on_b()', or 'on_c()', #@ respectively, etc. If an invalid state is requested, e.g. trying to #@ switch to any other state than 'c' while in state 'b', the error #@ handler will be called. All handlers are user defined. Note that #@ there cannot be a state which does not lead to another state. The #@ pattern for an event machine is usually circular, i.e. the last state #@ goes to the first. This is awkward when not needed but keeps the #@ implementation simple. Usually initialization is done in the first #@ state and all processing in the last. There is an advantage - the #@ user can check if the final state was reached in the END {} awk rule. #@ #@ The loop fsm is different. No internal logic for state switching #@ is provided. Instead, the states are displayed as a series of ifs #@ inside a loop. The conditions on which the states change, i.e. the if #@ conditions, are left to the user to define. #@ #@ While the event fsm is more convenient when you can use the state #@ names directly, e.g. to recognize some declarative, line oriented #@ syntax in a file by looking at the first field, the loop fsm is more #@ convenient when some arbitrary, unrelated to the state names logic is #@ required, e.g. to recognize valid quote enclosed strings character by #@ character, like ""ab\\""c"". #@ #@ Note that the user is expected and encouraged to edit the generated #@ fsm code to fit their specific needs. The purpose of this library is #@ to spare most of the tedium. #@ #@ Version: 1.0 ## ## Vladimir Dinev ## vld.dinev@gmail.com ## 2021-08-27 #@ # #@ Description: When passed to 'fsm_make()' as the 'type' argument, #@ an event fsm is generated. #@ Returns: A string constant for the event type of fsm. # function FSM_EVENT() {return ""event""} # #@ Description: When passed to 'fsm_make()' as the 'type' argument, #@ a loop fsm is generated. #@ Returns: A string constant for the loop type of fsm. # function FSM_LOOP() {return ""loop""} # #@ Description: Clears 'arr_out', generates a fsm with a name 'name' of #@ type 'type'. 'type' can be either FSM_EVENT(), or FSM_LOOP(). If #@ neither, FSM_EVENT() is used. 'name' is used in the fsm function's #@ names. If not given, ""_"" is used. 'arr_in' is an array of strings #@ which describe a fsm as per this library documentation. 'len' is the #@ length of 'arr_in'. #@ Returns: The length of 'arr_out' on success. If a syntax, or a #@ logical error in the input is encountered, 0 is returned. In the #@ event of such an error, 'arr_out[1]' will contain the index of the #@ offending line in 'arr_in' and 'arr_out[2]' will contain an error #@ message string. # function fsm_make(arr_out, arr_in, len, name, type, _arr_set, _str, _fget_st, _fset_st, _st_static, _tabs, _i, _j, _arr_splt, _tmp, _head, _tail, _bk0, _has0, _err_exp) { delete arr_out if ((FSM_EVENT() != type) && (FSM_LOOP() != type)) type = FSM_EVENT() if (!name) name = ""_"" _tmp = _fsm_check_syntax(arr_out, arr_in, len, name, _arr_set) if (!_tmp) return 0 _fsm_add_line(arr_out, sprintf(""# <%s>"", name)) if (FSM_EVENT() == type) { _fsm_add_line(arr_out, ""# "") _fsm_gen_handlers(arr_out, _arr_set, _tmp, name) _fsm_add_line(arr_out, ""# "") _fsm_add_line(arr_out, """") } _fsm_add_line(arr_out, ""# "") _fsm_gen_const(arr_out, _arr_set, _tmp, name) _st_static = sprintf(""_%s_STATE"", toupper(name)) _fsm_add_line(arr_out, sprintf(""function %s() {return \\""state\\""}"", _st_static)) _fsm_add_line(arr_out, ""# "") _fsm_add_line(arr_out, """") _fget_st = (name ""_get_state"") _fset_st = (name ""_set_state"") _fsm_add_line(arr_out, ""# "") _fsm_add_line(arr_out, sprintf(""function %s(%s) {return %s[%s()]}"", _fget_st, name, name, _st_static)) if (_has0 = (0 in arr_in)) _bk0 = arr_in[0] if (FSM_LOOP() == type) { _fsm_add_line(arr_out, sprintf(""function %s(%s, next_st) {%s[%s()] = next_st}"", _fset_st, name, name, _st_static)) _fsm_add_line(arr_out, """") _fsm_add_line(arr_out, sprintf(""function %s_loop( _st, _i, _end) {"", name)) _fsm_add_line(arr_out, """") _tabs = ""\\t"" _fsm_add_line(arr_out, sprintf(""%sfor (_i = 1; _i <= _end; ++_i) {"", _tabs)) _fsm_add_line(arr_out, """") _tabs = ""\\t\\t"" _fsm_add_line(arr_out, sprintf(""%s_st = %s(%s)"", _tabs, _fget_st, name)) split(arr_in[1], _arr_splt, _FSM_HEAD()) _head = _arr_splt[1] arr_in[0] = (_FSM_HEAD() _head) for (_i = 0; _i <= len; ++_i) { split(arr_in[_i], _arr_splt, _FSM_HEAD()) _head = _arr_splt[1] _tail = _arr_splt[2] _fsm_add_line(arr_out, sprintf(""%s%s (%s == _st) {"", _tabs, (0 == _i) ? ""if"" : ""else if"", (0 == _i) ? ""\\""\\"""" : (_fsm_to_const(name, _head) ""()""))) _tabs = ""\\t\\t\\t"" _tmp = split(_tail, _arr_splt, _FSM_TAIL()) for (_j = 1; _j <= _tmp; ++_j) { _str = _arr_splt[_j] _fsm_add_line(arr_out, sprintf(""%s%s (1) {"", _tabs, (1 == _j) ? ""if"" : ""else if"", _fsm_to_const(name, _str))) _fsm_add_line(arr_out, """") _tabs = ""\\t\\t\\t\\t"" _fsm_add_line(arr_out, sprintf(""%s%s(%s, %s())"", _tabs, _fset_st, name, _fsm_to_const(name, _str))) _tabs = ""\\t\\t\\t"" _fsm_add_line(arr_out, sprintf(""%s}"", _tabs)) } _tabs = ""\\t\\t"" _fsm_add_line(arr_out, sprintf(""%s}"", _tabs)) } _tabs = ""\\t"" _fsm_add_line(arr_out, sprintf(""%s}"", _tabs)) _fsm_add_line(arr_out, ""}"") } else if (FSM_EVENT() == type) { _tabs = ""\\t"" _fsm_add_line(arr_out, sprintf(""function _%s(%s, next_st) {%s[%s()] = next_st}"", _fset_st, name, name, _st_static)) _fsm_add_line(arr_out, sprintf(""function %s_next(%s, next_st, _st) {"", name, name)) _fsm_add_line(arr_out, """") _fsm_add_line(arr_out, sprintf(""%s_st = %s(%s)"", _tabs, _fget_st, name)) split(arr_in[1], _arr_splt, _FSM_HEAD()) _head = _arr_splt[1] arr_in[0] = (_FSM_HEAD() _head) for (_i = 0; _i <= len; ++_i) { split(arr_in[_i], _arr_splt, _FSM_HEAD()) _head = _arr_splt[1] _tail = _arr_splt[2] _fsm_add_line(arr_out, sprintf(""%s%s (%s == _st) {"", _tabs, (0 == _i) ? ""if"" : ""else if"", (0 == _i) ? ""\\""\\"""" : (_fsm_to_const(name, _head) ""()""))) _tabs = ""\\t\\t"" _tmp = split(_tail, _arr_splt, _FSM_TAIL()) for (_j = 1; _j <= _tmp; ++_j) { _str = _arr_splt[_j] _fsm_add_line(arr_out, sprintf(""%s%s (%s() == next_st)"", _tabs, (1 == _j) ? ""if"" : ""else if"", _fsm_to_const(name, _str))) _fsm_add_line(arr_out, sprintf(""%s{%s_on_%s(); _%s(%s, next_st)}"", _tabs, name, _str, _fset_st, name)) if (1 == _j) { _err_exp = sprintf(""%s()"", _fsm_to_const(name, _str)) } else { _err_exp = (_err_exp sprintf(""\\""|\\""%s()"", _fsm_to_const(name, _str))) } _tabs = ""\\t\\t"" } _fsm_add_line(arr_out, sprintf(""%selse"", _tabs)) _fsm_add_line(arr_out, sprintf(""%s{%s_on_error(_st, %s, next_st)}"", _tabs, name, _err_exp)) _tabs = ""\\t"" _fsm_add_line(arr_out, sprintf(""%s}"", _tabs)) } _fsm_add_line(arr_out, ""}"") } _fsm_add_line(arr_out, ""# "") _fsm_add_line(arr_out, sprintf(""# "", name)) if (_has0) arr_in[0] = _bk0 else delete arr_in[0] _tmp = _fsm_get_num_lines(arr_out) _fsm_clean_arr(arr_out) return _tmp } # function _fsm_gen_handlers(arr_out, arr_in, len, name, _i, _str) { for (_i = 1; _i <= len; ++_i) { _str = arr_in[_i] _fsm_add_line(arr_out, sprintf(""function %s_on_%s() {"", name, _str)) _fsm_add_line(arr_out, """") _fsm_add_line(arr_out, ""}"") } _fsm_add_line(arr_out, sprintf(""function %s_on_error(curr_st, expected, got) {"", name)) _fsm_add_line(arr_out, """") _fsm_add_line(arr_out, ""}"") } function _fsm_gen_const(arr_out, arr_in, len, name, _i, _str) { for (_i = 1; _i <= len; ++_i) { _str = arr_in[_i] _fsm_add_line(arr_out, sprintf(""function %s() {return \\""%s\\""}"", _fsm_to_const(name, _str), _str)) } } function _fsm_clean_arr(arr) { if (_FSM_HEAD() in arr) delete arr[_FSM_HEAD()] } function _fsm_get_num_lines(arr) {return arr[_FSM_HEAD()]} function _fsm_add_line(arr, str) { # reuse some constant for the line count arr[++arr[_FSM_HEAD()]] = str } function _fsm_to_const(name, str) { return sprintf(""%s_%s"", toupper(name), toupper(str)) } function _fsm_check_syntax(arr_out, arr_in, len, name, arr_set, _i, _set, _arr_splt, _str, _tmp, _head, _tail, _j, _nout) { if (!len) return _fsm_noin(arr_out, 0) if (!match(name, _FSM_ID())) return _fsm_enoid(arr_out, 0, name) _nout = 0 for (_i = 1; _i <= len; ++_i) { _str = arr_in[_i] gsub(""[[:space:]]+"", """", _str) arr_in[_i] = _str _tmp = split(_str, _arr_splt, _FSM_HEAD()) if (_tmp != 2 || !_arr_splt[_tmp]) return _fsm_ebad_sep(arr_out, _i) _head = _arr_splt[1] _tail = _arr_splt[2] if (!match(_head, _FSM_ID())) return _fsm_enoid(arr_out, _i, _head) if (_head in _set) return _fsm_eredfn(arr_out, _i, _head) ++_set[_head] arr_set[++_nout] = _head _tmp = split(_tail, _arr_splt, _FSM_TAIL()) if (!_arr_splt[_tmp]) return _fsm_ebad_sep(arr_out, _i) } for (_i = 1; _i <= len; ++_i) { split(arr_in[_i], _arr_splt, _FSM_HEAD()) _tail = _arr_splt[2] _tmp = split(_tail, _arr_splt, _FSM_TAIL()) for (_j = 1; _j <= _tmp; ++_j) { _str = _arr_splt[_j] if (!(_str in _set)) return _fsm_enodfn(arr_out, _i, _str) else ++_set[_str] } } for (_i = 1; _i <= len; ++_i) { split(arr_in[_i], _arr_splt, _FSM_HEAD()) _head = _arr_splt[1] if (1 == _set[_head]) return _fsm_enoreach(arr_out, _i, _head) } return _nout } function _fsm_enoreach(arr_out, ind, str) { return _fsm_err(arr_out, ind, sprintf(""state '%s' unreachable"", str)) } function _fsm_enoid(arr_out, ind, str) { return _fsm_err(arr_out, ind, sprintf(""'%s' does not match '%s'"", str, _FSM_ID())) } function _fsm_enodfn(arr_out, ind, str) { return _fsm_err(arr_out, ind, sprintf(""state '%s' not defined"", str)) } function _fsm_eredfn(arr_out, ind, str) { return _fsm_err(arr_out, ind, sprintf(""state '%s' redefined"", str)) } function _fsm_ebad_sep(arr_out, ind) { return _fsm_err(arr_out, ind, ""bad separator"") } function _fsm_noin(arr_out, ind) { return _fsm_err(arr_out, ind, ""no input"") } function _fsm_err(arr_out, ind, str) { arr_out[1] = ind arr_out[2] = str return 0 } function _FSM_ID() {return ""^[_[:alpha:]][_[:alnum:]]*$""} function _FSM_HEAD() {return ""->""} function _FSM_TAIL() {return ""\\\\|""} #@ # ../awklib/src/awklib_array.awk #@ #@ Library: arr #@ Description: Array functionality. #@ Version: 1.0 ## ## Vladimir Dinev ## vld.dinev@gmail.com ## 2021-08-20 #@ # #@ Description: Clears 'arr'. #@ Returns: Nothing. #@ Complexity: O(1) # function arr_init(arr) { arr[""""] delete arr } # #@ Description: Clears 'arr_dest', puts all keys of 'map' in 'arr_dest'. #@ Returns: Nothing. #@ Complexity: O(n) # function arr_from_map_keys(arr_dest, map, _i, _n) { delete arr_dest _i = 0 for (_n in map) arr_dest[++_i] = _n return _i } # #@ Description: Clears 'arr_dest', puts all values of 'map' in #@ 'arr_dest'. #@ Returns: Nothing. #@ Complexity: O(n) # function arr_from_map_vals(arr_dest, map, _i, _n) { delete arr_dest _i = 0 for (_n in map) arr_dest[++_i] = map[_n] return _i } # #@ Description: Clears 'arr_dest' and copies the range defined by #@ 'src_begin' and 'src_end' from 'arr_src' to 'arr_dest'. The range is #@ inclusive. If 'src_begin' is larger than 'src_end', nothing is #@ copied. #@ Returns: The length of 'arr_dest'. #@ Complexity: O(n) # function arr_range(arr_dest, arr_src, src_begin, src_end, _i, _n) { delete arr_dest _n = 0 for (_i = src_begin; _i <= src_end; ++_i) arr_dest[++_n] = arr_src[_i] return _n } # #@ Description: Clears 'arr_dest' and copies 'arr_src' into 'arr_dest'. #@ Returns: The length of 'arr_dest'. #@ Complexity: O(n) # function arr_copy(arr_dest, arr_src, src_len) { return arr_range(arr_dest, arr_src, 1, src_len) } # #@ Description: Appends 'arr_src' to the end of 'arr_dest'. #@ Returns: The length of 'arr_dest' after appending. #@ Complexity: O(n) # function arr_append(arr_dest, dest_len, arr_src, src_len, _i) { for (_i = 1; _i <= src_len; ++_i) arr_dest[++dest_len] = arr_src[_i] return dest_len } # #@ Description: Clears 'arr_dest', places all elements from 'arr_src' #@ which are at indexes contained in 'arr_ind' in 'arr_dest'. E.g. given #@ 'arr_ind[1] = 5; arr_ind[2] = 6', 'arr_dest' will get #@ 'arr_dest[1] = arr_src[5]; arr_dest[2] = arr_src[6]' #@ Returns: The length of 'arr_dest'. #@ Complexity: O(n) # function arr_gather(arr_dest, arr_src, arr_ind, ind_len, _i, _n) { delete arr_dest _n = 0 for (_i = 1; _i <= ind_len; ++_i) arr_dest[++_n] = arr_src[arr_ind[_i]] return _n } # #@ Description: Finds the index of the first match for 'regex' in 'arr'. #@ Returns: The index of the first match, 0 if not match is found. #@ Complexity: O(n) # function arr_match_ind_first(arr, len, regex, _i) { for (_i = 1; _i <= len; ++_i) { if (match(arr[_i], regex)) return _i } return 0 } # #@ Description: Clears 'arr_dest', places the indexes for all matches #@ for 'regex' in 'arr_src' in 'arr_dest'. #@ Returns: The length of 'arr_dest'. #@ Complexity: O(n) # function arr_match_ind_all(arr_dest, arr_src, src_len, regex, _i, _n) { delete arr_dest _n = 0 for (_i = 1; _i <= src_len; ++_i) { if (match(arr_src[_i], regex)) arr_dest[++_n] = _i } return _n } # #@ Description: Clears 'arr_dest' and copies all elements which match #@ 'regex' from 'arr_src' to 'arr_dest'. #@ Returns: The length of 'arr_dest'. #@ Complexity: O(n) # function arr_match(arr_dest, arr_src, src_len, regex, _i, _n) { delete arr_dest _n = 0 for (_i = 1; _i <= src_len; ++_i) { if (match(arr_src[_i], regex)) arr_dest[++_n] = arr_src[_i] } return _n } # #@ Description: Finds the index of the first non-match for 'regex' in #@ 'arr'. #@ Returns: The index of the first non-match, 0 if all match. #@ Complexity: O(n) # function arr_dont_match_ind_first(arr, len, regex, _i) { for (_i = 1; _i <= len; ++_i) { if (!match(arr[_i], regex)) return _i } return 0 } # #@ Description: Clears 'arr_dest', places the indexes for all #@ non-matches for 'regex' in 'arr_src' in 'arr_dest'. #@ Returns: The length of 'arr_dest'. #@ Complexity: O(n) # function arr_dont_match_ind_all(arr_dest, arr_src, src_len, regex, _i, _n) { delete arr_dest _n = 0 for (_i = 1; _i <= src_len; ++_i) { if (!match(arr_src[_i], regex)) arr_dest[++_n] = _i } return _n } # #@ Description: Clears 'arr_dest' and copies all elements which do not #@ match 'regex' from 'arr_src' to 'arr_dest'. #@ Returns: The length of 'arr_dest'. #@ Complexity: O(n) # function arr_dont_match(arr_dest, arr_src, src_len, regex, _i, _n) { delete arr_dest _n = 0 for (_i = 1; _i <= src_len; ++_i) { if (!match(arr_src[_i], regex)) arr_dest[++_n] = arr_src[_i] } return _n } # #@ Description: Calls 'sub()' for every element of 'arr' like #@ 'sub(regex, subst, arr[i])' #@ Returns: The number of substitutions made. #@ Complexity: O(n) # function arr_sub(arr, len, regex, subst, _i, _n) { _n = 0 for (_i = 1; _i <= len; ++_i) _n += sub(regex, subst, arr[_i]) return _n } # #@ Description: Calls gsub() for every element of 'arr' like #@ 'gsub(regex, subst, arr[i])' #@ Returns: The number of substitutions made. #@ Complexity: O(n) # function arr_gsub(arr, len, regex, subst, _i, _n) { _n = 0 for (_i = 1; _i <= len; ++_i) _n += gsub(regex, subst, arr[_i]) return _n } # #@ Description: Checks if 'arr_a' and 'arr_b' have the same elements. #@ Returns: 1 if the arrays are equal, 0 otherwise. #@ Complexity: O(n) # function arr_is_eq(arr_a, len_a, arr_b, len_b, _i) { if (len_a != len_b) return 0 for (_i = 1; _i <= len_a; ++_i) { if (arr_a[_i] != arr_b[_i]) return 0 } return 1 } # #@ Description: Finds 'val' in 'arr'. #@ Returns: The index of 'val' if it's found, 0 otherwise. #@ Complexity: O(n) # function arr_find(arr, len, val, _i) { for (_i = 1; _i <= len; ++_i) { if (arr[_i] == val) return _i } return 0 } # #@ Description: Concatenates all elements of 'arr' into a single string. #@ The elements are separated by 'sep'. It 'sep' is not given, "" "" is #@ used. 'sep' does not appear after the last element. #@ Returns: The string representation of 'arr'. #@ Complexity: O(n) # function arr_to_str(arr, len, sep, _i, _str) { if (len < 1) return """" if (!sep) sep = "" "" _str = arr[1] for (_i = 2; _i <= len; ++_i) _str = (_str sep arr[_i]) return _str } # #@ Description: Prints 'arr' to stdout. #@ Returns: Nothing. #@ Complexity: O(n) # function arr_print(arr, len, sep) { print arr_to_str(arr, len, sep) } #@ # ../awklib/src/awklib_vect.awk #@ #@ Library: vect #@ Description: Vector functionality. A vector is as array which is #@ aware of its own size. #@ Dependencies: awklib_array.awk #@ Version: 1.0 ## ## Vladimir Dinev ## vld.dinev@gmail.com ## 2021-08-20 #@ # #@ Description: Clears 'vect', initializes it with length 0. #@ Returns: Nothing. #@ Complexity: O(1) # function vect_init(vect) { vect[""""] delete vect vect[_VECT_LEN()] = 0 } # #@ Description: Initializes 'vect' to a copy of 'arr'. #@ Returns: Nothing. #@ Complexity: O(n) # function vect_init_arr(vect, arr, len, _i) { vect_init(vect) for (_i = 1; _i <= len; ++_i) vect[++vect[_VECT_LEN()]] = arr[_i] } # #@ Description: Appends 'val' to 'vect'. #@ Returns: Nothing. #@ Complexity: O(1) # function vect_push(vect, val) { vect[++vect[_VECT_LEN()]] = val } # #@ Description: Appends 'arr' to 'vect'. #@ Returns: Nothing. #@ Complexity: O(n) # function vect_push_arr(vect, arr, len, _i) { for (_i = 1; _i <= len; ++_i) vect[++vect[_VECT_LEN()]] = arr[_i] } # #@ Description: Retrieves the last value from 'vect'. #@ Returns: The last element. #@ Complexity: O(1) # function vect_peek(vect) { return vect[vect[_VECT_LEN()]] } # #@ Description: Removes the last element of 'vect'. #@ Returns: Nothing. #@ Complexity: O(1) # function vect_pop(vect) { vect[--vect[_VECT_LEN()]] } # #@ Description: Provides the length. #@ Returns: The length of 'vect'. #@ Complexity: O(1) # function vect_len(vect) { return vect[_VECT_LEN()] } # #@ Description: Indicates if 'vect' is empty or not. #@ Returns: 1 if 'vect' is empty, 0 otherwise. #@ Complexity: O(1) # function vect_is_empty(vect) { return (!vect[_VECT_LEN()]) } # #@ Description: Removes the element in 'vect' at index 'ind' by moving #@ all further elements one to the left. #@ Returns: Nothing. #@ Complexity: O(n) # function vect_del_ind(vect, ind, _i, _len) { _len = vect[_VECT_LEN()] for (_i = ind; _i < _len; ++_i) vect[_i] = vect[_i+1] --vect[_VECT_LEN()] } # #@ Description: Removes 'val' from 'vect' by if (arr_find()) #@ vect_del_ind(). #@ Returns: Nothing. #@ Complexity: O(n) # function vect_del_val(vect, val, _ind) { if (_ind = arr_find(vect, vect[_VECT_LEN()], val)) vect_del_ind(vect, _ind) } # #@ Description: Removes the element at 'ind' from 'vect' by replacing it #@ with the last element. #@ Returns: Nothing #@ Complexity: O(1) # function vect_swap_pop_ind(vect, ind) { vect[ind] = vect[vect[_VECT_LEN()]] --vect[_VECT_LEN()] } # #@ Description: Removes the first instance of 'val' from 'vect' by #@ if (arr_find()) vect_swap_pop_ind(). #@ Returns: Nothing. #@ Complexity: O(1) # function vect_swap_pop_val(vect, val, _ind) { if (_ind = arr_find(vect, vect[_VECT_LEN()], val)) vect_swap_pop_ind(vect, _ind) } function _VECT_LEN() {return ""len""} #@ # ../awklib/src/awklib_prep.awk #@ #@ Library: prep #@ Description: Prepares strings by replacing named arguments. #@ By default, the argument needs to appear between '{}' and can be any #@ string. The argument name is matched as a regular expression. I.e. #@ the default format for the named arguments is the printf string #@ ""[{]%s[}]"" which, after being processed by 'sprintf()', is matched as #@ a regular expression. The '[]' are needed to make sure the '{}' are #@ matched literally, and the '%s' is the argument name. The '%s' is #@ replaced by each argument name and the whole expression is replaced, #@ if matched in the target string, by the argument value. #@ E.g.: #@ #@ Given the string: #@ #@ ""{1} quick {color} {ANIMAL} jumps over {1} lazy dog"" #@ #@ and the map: #@ #@ m[""1""] = ""the"" #@ m[""color""] = ""brown"" #@ m[""[A-Z]+""] = ""fox"" #@ #@ the result is: #@ #@ ""the quick brown fox jumps over the lazy dog"" #@ #@ Note that only the '%s' part of the argument name needs to appear as #@ an index in the map. #@ Version: 1.0 ## ## Vladimir Dinev ## vld.dinev@gmail.com ## 2021-08-29 #@ # #@ Description: The argument format as a printf string. #@ Returns: The default value for the argument format. # function PREP_ARG() {return ""[{]%s[}]""} # #@ Description: Replaces the named arguments in 'str' according to #@ 'map'. E.g. if 'str' is ""{1} {arg}"" and 'map' is 'map[1] = ""foo""' #@ 'map[""arg""] = ""bar""', the result is ""foo bar"". If 'fmt' is not given, #@ 'PREP_ARG()' is used. If it is given, it must contain a single '%s', #@ which shall be replaced by the argument name. The '%s' can be #@ surrounded by non printf string specifier. #@ Returns: 'str' after all arguments found in 'map' have been replaced. # function prep_str(str, map, fmt) { if (!fmt) fmt = PREP_ARG() return _prep_str(str, map, fmt) } # #@ Description: Indicates how many substitutions were made in the last #@ call to 'prep_str()' #@ Returns: The number of substitutions made. # function prep_num_of_subs() {return __LB_prep_number_of_substitutions__} # function _prep_str(str, map, fmt, _n, _subs) { _subs = 0 for (_n in map) _subs += gsub(sprintf(fmt, _n), map[_n], str) _prep_set_subs(_subs) return str } function _prep_set_subs(n) {__LB_prep_number_of_substitutions__ = n} #@ # ../awklib/src/awklib_tabs.awk #@ #@ Library: tabs #@ Description: String indentation. #@ Version: 1.0 ## ## Vladimir Dinev ## vld.dinev@gmail.com ## 2021-08-16 #@ # #@ Description: Adds a tab to the indentation string. #@ Returns: Nothing. # function tabs_inc() { ++__LB_tabs_tabs_num__ __LB_tabs_tabs_str__ = (__LB_tabs_tabs_str__ ""\\t"") } # #@ Description: Removes a tab from the indentation string. #@ Returns: Nothing. # function tabs_dec() { if (__LB_tabs_tabs_num__) { --__LB_tabs_tabs_num__ __LB_tabs_tabs_str__ = substr(__LB_tabs_tabs_str__, 1, __LB_tabs_tabs_num__) } } # #@ Description: Indicates the tab level. #@ Returns: The number of tabs used for indentation. # function tabs_num() { return __LB_tabs_tabs_num__ } # #@ Description: Provides all indentation tabs as a string. #@ Returns: The indentation string. # function tabs_get() { return (__LB_tabs_tabs_str__ """") } # #@ Description: Adds indentation to 'str'. #@ Returns: 'str' prepended with the current number of tabs. # function tabs_indent(str) { return (__LB_tabs_tabs_str__ str) } # #@ Description: Prints the indented 'str' to stdout without a new line #@ at the end. #@ Returns: Nothing. # function tabs_print_str(str) { printf(""%s"", tabs_indent(str)) } # #@ Description: Prints the indented 'str' to stdout with a new line at #@ the end. #@ Returns: Nothing. # function tabs_print(str) { print tabs_indent(str) } #@ # ../awklib/src/awklib_prog.awk #@ #@ Library: prog #@ Description: Provides program name, error, and exit handling. Unlike #@ other libraries, the function names for this library are not #@ prepended. #@ Version 1.0 ## ## Vladimir Dinev ## vld.dinev@gmail.com ## 2021-08-15 #@ # #@ Description: Sets the program name to 'str'. This name can later be #@ retrieved by get_program_name(). #@ Returns: Nothing. # function set_program_name(str) { __LB_prog_program_name__ = str } # #@ Description: Provides the program name. #@ Returns: The name as set by set_program_name(). # function get_program_name() { return __LB_prog_program_name__ } # #@ Description: Prints 'msg' to stderr. #@ Returns: Nothing. # function pstderr(msg) { print msg > ""/dev/stderr"" } # #@ Description: Sets a static flag which can later be checked by #@ should_skip_end(). #@ Returns: Nothing. # function skip_end_set() { __LB_prog_skip_end_flag__ = 1 } # #@ Description: Clears the flag set by skip_end_set(). #@ Returns: Nothing. # function skip_end_clear() { __LB_prog_skip_end_flag__ = 0 } # #@ Description: Checks the static flag set by skip_end_set(). #@ Returns: 1 if the flag is set, 0 otherwise. # function should_skip_end() { return (__LB_prog_skip_end_flag__+0) } # #@ Description: Sets a static flag which can later be checked by #@ did_error_happen(). #@ Returns: Nothing # function error_flag_set() { __LB_prog_error_flag__ = 1 } # #@ Description: Clears the flag set by error_flag_set(). #@ Returns: Nothing # function error_flag_clear() { __LB_prog_error_flag__ = 0 } # #@ Description: Checks the static flag set by error_flag_set(). #@ Returns: 1 if the flag is set, 0 otherwise. # function did_error_happen() { return (__LB_prog_error_flag__+0) } # #@ Description: Sets the skip end flag, exits with error code 0. #@ Returns: Nothing. # function exit_success() { skip_end_set() exit(0) } # #@ Description: Sets the skip end flag, exits with 'code', or 1 if 'code' is 0 #@ or not given. #@ Returns: Nothing. # function exit_failure(code) { skip_end_set() exit((code+0) ? code : 1) } # #@ Description: Prints ': error: msg' to stderr. Sets the #@ error and skip end flags. #@ Returns: Nothing. # function error_print(msg) { pstderr(sprintf(""%s: error: %s"", get_program_name(), msg)) error_flag_set() skip_end_set() } # #@ Description: Calls error_print() and quits with failure. #@ Returns: Nothing. # function error_quit(msg, code) { error_print(msg) exit_failure(code) } #@ # ../awklib/src/awklib_read.awk #@ #@ Library: read #@ Description: Read lines or a file into an array. #@ Version: 1.0 ## ## Vladimir Dinev ## vld.dinev@gmail.com ## 2021-08-15 #@ # #@ Description: Clears 'arr_out', reads 'fname' and saves the content in #@ 'arr_our'. #@ Returns: The number of lines read, which is also the length of #@ 'arr_out', or less than 0 if an error has occurred. # function read_file(fname, arr_out, _line, _i, _code) { delete arr_out _i = 0 while ((_code = (getline _line < fname)) > 0) arr_out[++_i] = _line if (_code < 0) return _code close(fname) return _i } # #@ Description: Clears 'arr_out', calls 'getline' and saves the lines #@ read in 'arr_out'. If 'rx_until' is given, reading stops when a line #@ matches 'rx_until'. The matched line is not saved. If 'rx_ignore' is #@ given, only lines which do not match 'rx_ignore' are saved. If #@ 'rx_until' and 'rx_ignore' are the same, only 'rx_until' is #@ considered. #@ Returns: The length of 'arr_out', or < 0 on error. # function read_lines(arr_out, rx_until, rx_ignore, _line, _i, _code) { delete arr_out _i = 0 while ((_code = (getline _line)) > 0) { if (rx_until && match(_line, rx_until)) break if (rx_ignore && match(_line, rx_ignore)) continue arr_out[++_i] = _line } if (_code < 0) return _code return _i } #@ # ",16269,True,2595.4085690925936,median "#include #include ""SerialTransfer.h"" SerialTransfer myTransfer; #define PIN_INPUT 6 #define PIN_HIDDEN 7 #define PIN_OUTPUT 8 #define NETWORK_LAYER_SIZE 10 // size of each layer in the network. All 3 layers have the same size #define SCALE_FACTOR 2 // multiplication factor - for specifying the size of the physical layer #define LAYER_SIZE NETWORK_LAYER_SIZE * SCALE_FACTOR // size of physical layer #define NUM_LEDS LAYER_SIZE * LAYER_SIZE #define PIXELS NETWORK_LAYER_SIZE * NETWORK_LAYER_SIZE int brightness = 60; CRGB _input_LED[NUM_LEDS]; CRGB _hidden_LED[NUM_LEDS]; CRGB _output_LED[NUM_LEDS]; #define HIDDEN_ACTUAL_SIZE 12 int down_size_10x10[PIXELS] = {0, 0, 0, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, 0, 0, 0, 0, 0, 0, 200, 200, 200, 200, 200, 200, 200, 200, 200, 200, 0, 0, 0, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, 0, 0, 0, 0, 0, 0, 0, 0, 0, 200, 0, 0, 0, 0, 0, 0}; //int hidden_layer_20x20[PIXELS] = {3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 3, 3, 3, 3, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 4, 4, 4, 4, 0, 0, 0, 8, 127, 255, 129, 0, 0, 0, 0, 0, 3, 3, 3, 3, 4, 4, 4, 4, 0, 0, 0, 11, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 3, 33, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 0, 0, 0, 2, 16, 0, 12, 129, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 0, 0, 0, 0, 13, 137, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 0, 0, 0, 0, 23, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 83, 74, 34, 66, 47, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 128, 192, 62, 52, 100, 5, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; //int output_layer_20x20[PIXELS] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 0, 0, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; //int input_layer_28x28[PIXELS] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 33, 62, 58, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 35, 246, 245, 121, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 89, 232, 254, 133, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 42, 217, 254, 193, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 90, 250, 242, 114, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 180, 254, 216, 12, 0, 0, 0, 0, 0, 0, 0, 0, 12, 112, 128, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 65, 247, 230, 42, 0, 0, 0, 0, 0, 0, 0, 0, 0, 107, 254, 229, 83, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 22, 175, 253, 217, 17, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45, 234, 249, 71, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 70, 248, 233, 45, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 95, 250, 240, 62, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 158, 255, 216, 40, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 43, 233, 248, 68, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 108, 252, 247, 160, 108, 101, 100, 99, 100, 100, 99, 98, 100, 131, 190, 241, 255, 218, 8, 0, 0, 0, 0, 0, 0, 0, 0, 11, 205, 240, 247, 253, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 216, 3, 0, 0, 0, 0, 0, 0, 0, 0, 17, 235, 255, 209, 173, 190, 193, 193, 191, 192, 192, 190, 190, 191, 183, 141, 103, 80, 37, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 12, 14, 14, 14, 14, 14, 14, 14, 15, 14, 17, 126, 253, 236, 18, 0, 0, 0, 0, 0, 0, 0, 0, 49, 251, 254, 136, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 151, 255, 255, 97, 0, 0, 0, 0, 0, 0, 0, 0, 142, 255, 255, 154, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 154, 255, 255, 163, 0, 0, 0, 0, 0, 0, 0, 0, 176, 255, 255, 154, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 15, 154, 255, 230, 60, 0, 0, 0, 0, 0, 0, 0, 0, 0, 162, 253, 143, 13, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 31, 62, 34, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; //int hidden_layer_28x28[PIXELS] = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 4, 4, 4, 4, 0, 0, 0, 0, 52, 192, 167, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 4, 4, 4, 4, 0, 0, 1, 107, 254, 119, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 4, 4, 4, 4, 0, 8, 164, 246, 0, 0, 0, 0, 20, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 0, 56, 137, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 4, 0, 12, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5, 18, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 19, 12, 0, 0, 0 //}; //int output_layer_28x28[PIXELS] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 //}; void initLEDMatrix(CRGB leds[NUM_LEDS]) { fill_solid( leds, NUM_LEDS, CRGB::Red); FastLED.delay(200); fill_solid( leds, NUM_LEDS, CRGB::Black); FastLED.delay(200); fill_solid( leds, NUM_LEDS, CRGB::Blue); FastLED.delay(200); fill_solid( leds, NUM_LEDS, CRGB::Black); FastLED.delay(200); fill_solid( leds, NUM_LEDS, CRGB::Green); FastLED.delay(200); fill_solid( leds, NUM_LEDS, CRGB::Black); FastLED.delay(200); fill_solid( leds, NUM_LEDS, CRGB::Yellow); FastLED.delay(200); fill_solid( leds, NUM_LEDS, CRGB::Black); FastLED.delay(200); } void setInputLEDs(int input_layer[PIXELS]) { Serial.println(""input layer fix""); int r, c, ind, _r, _c; CRGB val; CRGB row[NUM_LEDS]; for(int i = 0; i < NUM_LEDS; i++){ r = i / LAYER_SIZE; c = i % LAYER_SIZE; // corresponding row and column in the network layer _r = r / SCALE_FACTOR; _c = c / SCALE_FACTOR; row[r * LAYER_SIZE + c] = CHSV( 200, 255, input_layer[_r * NETWORK_LAYER_SIZE + _c]); // val = CHSV( 200, 255, input_layer[_r * NETWORK_LAYER_SIZE + _c]); // Assign it to actual hidden layer if (!(r % 2)) // even rows ind = r * LAYER_SIZE + c; else ind = (r+1) * LAYER_SIZE - c - 1; // _input_LED[ind] = val; // _input_LED[ind] = row[r * LAYER_SIZE + c]; } } void setHiddenLEDs(int hidden_layer[NUM_LEDS]) { /* input - all pixel values in row-wise in a single array. if it is considered as a matrix of size LAYER_SIZE x LAYER_SIZE, the grid on the bottom right corner of size HIDDEN_ACTUAL_SIZE x HIDDEN_ACTUAL_SIZE has the actual values of the hidden layer. Other areas of the matrix given as input has the values which represents colours for each dummy layer colour codes. 0 - no colour 1 - colour for dummy layer 1 2 - colour for dummy layer 2 3 - colour for dummy layer 3 4 - colour for dummy layer 4 The actual hidden layer area shoudl have a background colour (not black) so that is it easily visible */ int r, c, ind; CRGB row[NUM_LEDS], colour; for(int i = 0; i < NUM_LEDS; i++) { r = i / LAYER_SIZE; c = i % LAYER_SIZE; // rows of extra/dummy layers if ((r < LAYER_SIZE - HIDDEN_ACTUAL_SIZE) || (c < LAYER_SIZE - HIDDEN_ACTUAL_SIZE)) { // assign colours switch (hidden_layer[i]) // change to HSV if needed { case 4: colour = CHSV( 250, 255, 100); break; case 3: colour = CHSV( 200, 255, 100); break; case 2: colour = CHSV( 100, 255, 70); break; case 1: colour = CHSV( 150, 255, 100); break; case 0: colour = CRGB::Black; // CHSV( 100, 10, 30); // background colour break; default: break; } row[r * LAYER_SIZE + c] = colour; } else { // give a base colour - for values less than 100 hidden_layer[i] = hidden_layer[i] > 255 ? 255 : hidden_layer[i]; colour = (hidden_layer[i] < 50) ? CHSV( 70, 200, 80) : CHSV( 200, 255, hidden_layer[i]); // row[r * LAYER_SIZE + c] = CHSV( 255, 255, hidden_layer[i]); row[r * LAYER_SIZE + c] = colour; } // Assign it to actual hidden layer if (!(r % 2)) // even rows ind = r * LAYER_SIZE + c; else ind = (r+1) * LAYER_SIZE - c - 1; _hidden_LED[ind] = row[r * LAYER_SIZE + c]; } // FastLED.show(); } void setOutputLEDs(int output_layer[NUM_LEDS]) { /* input - all pixel values in row-wise in a single array. colours are encoded with integers. 0 - no colour (or keep a base colour as bg) 1 - colour for highest probable number 2 - colour for second highest probable number 3 - colour for third highest probable number */ int r, c, ind; CRGB row[NUM_LEDS], colour; for(int i = 0; i < NUM_LEDS; i++) { r = i / LAYER_SIZE; c = i % LAYER_SIZE; switch ((output_layer[i])) { case 3: colour = CHSV( 200, 255, 200); break; case 2: colour = CHSV( 150, 255, 200); break; case 1: colour = CHSV( 100, 255, 200); break; case 0: colour = CRGB::Black; // CHSV( 100, 20, 50); // background colour break; default: break; } // row[r * LAYER_SIZE + c] = colour; // Assign it to actual output layer if (!(r % 2)) // even rows ind = r * LAYER_SIZE + c; else ind = (r+1) * LAYER_SIZE - c - 1; _output_LED[ind] = row[r * LAYER_SIZE + c]; } } void setup() { // Initialise serial Serial.begin(115200); Serial.setTimeout(1); myTransfer.begin(Serial); ////////////////////////////////////////// delay(1000); // Add LEDs FastLED.addLeds<1, WS2812B, PIN_INPUT, GRB>(_input_LED, NUM_LEDS); FastLED.addLeds<1, WS2812B, PIN_HIDDEN, GRB>(_hidden_LED, NUM_LEDS); FastLED.addLeds<1, WS2812B, PIN_OUTPUT, GRB>(_output_LED, NUM_LEDS); FastLED.setBrightness(brightness); FastLED.setMaxPowerInVoltsAndMilliamps(5, 1500); // set_max_power_indicator_LED(13); fill_solid(_input_LED, NUM_LEDS, CRGB::Black); fill_solid(_hidden_LED, NUM_LEDS, CRGB::Black); fill_solid(_output_LED, NUM_LEDS, CRGB::Black); FastLED.show(); initLEDMatrix(_input_LED); initLEDMatrix(_hidden_LED); initLEDMatrix(_output_LED); fill_solid(_input_LED, NUM_LEDS, CRGB::White); fill_solid(_hidden_LED, NUM_LEDS, CRGB::White); fill_solid(_output_LED, NUM_LEDS, CRGB::White); FastLED.delay(500); fill_solid(_input_LED, NUM_LEDS, CRGB::Black); fill_solid(_hidden_LED, NUM_LEDS, CRGB::Black); fill_solid(_output_LED, NUM_LEDS, CRGB::Black); Serial.println(""setup ends""); } void loop() { // Update matrix values // input layer setInputLEDs(down_size_10x10); // hidden layer - Adjust colours // setHiddenLEDs(down_size_10x10); // output layer - Adjust colours // setOutputLEDs(down_size_10x10); // show everything FastLED.show(); } ",12476,True,3340.0759716655134,median "/* * Project: real time mobility tracker and logger * Description: location/speed tracker and logger based on Particle's Electron and Neo M8 GNSS module. * Location/speed data can be received by a server running Influx DB to report and save location in real time on a map. * Author: Jaafar Benabdallah * Last updated: January 2019 * v 0.17 -> log location(+geohash)/speed/altitude to influxdb via node.js service * v 0.18 -> fixed keep alive feature when using Google Fi sim card * v 0.2 -> added oled display, use of software timers for publishing data and refreshing display * v 0.3 -> using ubx messaging protocol to communicate with GNSS module. Added software watchdog. * v 0.31 -> dropped usage of software timers for tracking data publishing and display refreshing. (was not thread safe) * v 0.4 -> enabled switched 3.3v supply for oled display + gnss module * v 0.41 -> fixed minor bugs, watchdog time out period to 5 min * v 0.42 -> reverted to Particle's data plan * v 0.43 -> added trip time on a new bottom status bar. Removed particle.connect() blocking calls in loop() * v 0.5 -> added IMU unit, added SLEEP STATE with network on standby, trip distance calculation and display * v 0.6 -> added gball display for longitudinal and lateral acceleration, heading display * v 0.61 -> now uploads latitude, longitude, speed (mph) and heading (degrees). Discarded: session_id and altitude * v 0.62 -> changed pin mapping as in the snapshot: new_pin_mapping.jpg, changed libraries to reflect different SPI assignments * v 0.63 -> changed the 3.3v switched power control out of gnss class and back to main sequence * v 0.7 -> added high pass filter to remove gravity acceleration offset from z-axis acceleration when the device is tilted (when positioned on car dashboard for example) * v 0.8 -> added wake on motion, sleep on no motion for > 2 min * v 0.81 -> tweaked threshold for wake up. Track on autostart now works only at the first GNSS fix after a reset. * v 0.82 -> fix when to resume session and when to reset it: by 3 clicks or on demand with cloud function StandBy_OnMove(r) * v 0.83 -> add webhook to forward published data to telegraf (influx) instance and then to influxdb (to replace particle2influx server app?) * v 0.84 -> fix session_id assignment after reset: wait for connection then assign it. * v 0.85 -> fix blocking when cellular connection is lost. * v 0.86 -> use Rickkas publishQueue when sending tracking and session data, without timestamp * v 0.862 -> turn on tracking when speed > 7 mph * v 0.863 -> fix odometer/trip time increment rules (now based on delta_distance > threshold) * v 0.87 -> back to using Google Fi data sim/plan, various bug fixes, testing GNSS stopped mode without switching off SMPS-> abondoned for now * v 0.88 -> parse new message from gnss: NAV-STATUS --> fix type and ttff. Added feature: get publish queue size * v 0.89 -> reduce published data size + include time by creating a webhook to expand data to telegraf payload format * v 0.9 -> software timers for imu reading and display refresh * v0.91 -> [didnot work] fix when connecting (flashing green), a button press crashes Electron (assertion failure) -> local/global/int context confusion? * v0.92 -> use of low pass filter to get acceleration bias then substarct it from current reading (more useful that high pass filter) * v0.93 -> revert to 0.8.0-rc.10 in hope of avoiding assert failure panic on button push. * v0.94 -> updated OS to 0.8.0-rc.12 -> (finally!)fixed crash when pressing the button in non listening mode. Extend autosleep timer to 2:30 * v0.95 -> added feature to cycle modem power with 4 clicks of MODE button: useful when modem is stuck when cloud connecting after a wake up * TESTING v0.96 -> upgraded system firmware (now DeviceOS) to 1.0.0 * **all future upgrades from here will be implemented on Boron version first ** * future: v 1.0alpha -> porting on Boron (hardware changes: replace 3.3V SMPS with a switch supplied by Boron's 3v3 output, display and imu on same SPI bus) * future: v 1.1 -> enable 5Hz mode on GNSS, use Rickkas SerialBuffer lib and average GNSS fixes (study impact on power usage) * future: v 1.2 -> add joystick to augment MODE button functions + simple menus to display additional info (temperature, gnss stats, publish stats...) * * Credits: Rick K(rickkas7) for FSM, power save modes and publish queue, Ankur Dave for ubx-protocol library for NEO M8 modules */ // to avoid compile error when building for photon #if ( PLATFORM_ID == PLATFORM_ELECTRON_PRODUCTION) #define cellular #endif // enable serial log // #define serial_debug // use google fi sim #define googlefi #include ""SparkFunLSM6DS3.h"" #include ""Adafruit_GFX.h"" #include ""Adafruit_SH1106_Particle.h"" #include ""ubx_neom8n.h"" #include ""math.h"" #ifdef cellular //#include ""Serial5/Serial5.h"" #include ""cellular_hal.h"" #include ""PublishQueueAsyncRK.h"" #endif //peripherals control pins mapping #define OLED_CS B2 // /SS 128x64 OLED (in addition to SCK, MOSI on SPI) #define IMU_CS C0 #ifdef cellular #define OLED_DC B1 #define OLED_RESET B0 #define V33_SW B5 #else #define OLED_DC D1 #define OLED_RESET D0 #define V33_SW D6 #endif // Time bases for periodic events const unsigned long KEEPALIVE_PERIOD = 30; // in seconds, when using google fi sim const unsigned long DISPLAY_PERIOD = 300; // display refresh (ms) const unsigned long ODOMETER_PERIOD = 1000; // trip stats update (ms) const unsigned long IMU_PERIOD = 100; // acceleration data update (ms) unsigned long PUBLISH_PERIOD = 20000; // default publish period (ms) const unsigned long AUTOSLEEP_TIME = 150 * 1000; // inactivity time (ms) before going in sleep mode const unsigned long LED_PERIOD = 2000; // tracking on indicator (ms) #ifdef googlefi const unsigned long SLEEPING_TIME = 60 * 60; // wakeup every 120 min (have to reconnect with Fi anyway) #else const unsigned long SLEEPING_TIME = 22 * 60; // wakeup every 22min if no motion detected (keep network connection alive) #endif // Tracking parameters const double mm_per_second_per_mph = 447.04; // mm/s -> mph double delta_dist_th = 10.0; // min change in distance (meters) between locations to increment odometer const double alpha = 0.9; // high pass filter param const double beta = 0.2; // low pass filter (MA) first order coeff const double motion_th = 0.12; // min accel magnitude in g to trigger/maintain wake up // Tracking settings uint32_t session_id; bool session_id_reset = true; // reset session_id flag bool reset_session_flag = false; // reset session flag bool tracking_on_flag = false; bool assistNow_on_flag = false; // still buggy: GNSS Assist Now feature // Operations variables bool enter_standby_flag = false; // Power saving state flag bool cloud_conn_reqed = false; // to avoid repeated calls to Particle.connect() bool cycle_modem_power_flag = false; volatile int nb_clicks = 0; // Timing variables uint32_t last_updated_odometer = 0; // elapsed time in ms since last trip time/distance update uint32_t last_tracking_publish = 0; uint32_t publish_extra_time = 0; //to alter publish period if no fix or very low speed uint32_t last_refresh_display = 0; uint32_t update_start_time = 0; // GNSS stats uint32_t gnss_begin_ms = 0; uint32_t ttff = 0; uint32_t gnss_last_fix_ms = 0; // GNSS data bool gnss_on = false; bool valid_fix_flag = false; double lat = 0.0, lon = 0.0, alt = 0.0, hAcc = 0.0, speed_mph = 0.0, heading = 0.0; double old_lat = 0.0, old_lon = 0.0, delta_dist = 0.0; // used to calculate traveled distance uint8_t nb_sats = 0; uint8_t fixType = 0; uint32_t tripTime = 0; // elapsed time in s since last tracking session double tripDistance_m = 0.0; // distance in m since last tracking session // IMU data bool imu_on = false; // status flags bool update_start_on = false; // ready to be set when vehicle stops float accel[3]; // acceleration vector float old_filt_acc_z = 0.0, old_acc_z = 0.0, acc_z = 0.0; float acc_z_buff[3]; float a0_y = 0.0, a0_z = 0.0, acc_mag = 0.0; // Text buffer char buffer[256]; // publish queue buffers retained uint8_t publishQueueRetainedBuffer[2560]; //~21 points PublishQueueAsync publishQueue(publishQueueRetainedBuffer, sizeof(publishQueueRetainedBuffer)); // FSM states enum State {CONNECT_WAIT_STATE, TRACKING_OFF_STATE, TRACKING_ON_STATE, SLEEP_STATE}; State state; #ifdef serial_debug // Serial debug configuration SerialLogHandler logHandler(115200, LOG_LEVEL_WARN, { { ""app"", LOG_LEVEL_INFO }, { ""app.pubq"",LOG_LEVEL_TRACE } }); #endif // Required forward declarations void gnssMessageHandler(uint16_t msg_class_id, const ubx_buf_t &buf); //@rx valid gnss msg void wd_callback() { System.sleep(10);} // turn off cellular module for 10s // Global instances UBX_NEOM8N gnss(gnssMessageHandler); LSM6DS3 imu(SPI_MODE, IMU_CS); #ifdef cellular FuelGauge battery; PMIC pmic; // to change PMIC settings #endif Adafruit_SH1106 display(OLED_DC, OLED_RESET, OLED_CS); ApplicationWatchdog wd(300000, wd_callback); // called after 5 min no connection // Software timers Timer trackingLEDTimer(LED_PERIOD, trackingLEDUpdate); Timer autoSleepTimer(AUTOSLEEP_TIME, autoSleepHandler); Timer watchdogTimer(5000, wd_check_in); Timer imuTimer(IMU_PERIOD, imu_update); // Timer displayTimer(DISPLAY_PERIOD, display_update); // Startup options configurtion #ifdef googlefi STARTUP(cellular_credentials_set(""h2g2"", """", """", NULL)); #endif STARTUP(System.enableFeature(FEATURE_RETAINED_MEMORY)); SYSTEM_MODE(SEMI_AUTOMATIC); SYSTEM_THREAD(ENABLED); void setup() { #ifdef cellular battery.wakeup(); battery.quickStart(); pmic.setChargeVoltage(4208); // set charging voltage up to 4.208V --> will charge to 100% (if batt. doesn't overheat) #endif //system events // register SETUP button event handler System.on(button_final_click, modeButtonHandler); // report cloud event to console #ifdef serial_debug System.on(cloud_status, cloud_statusHandler); #endif // display setting up display.begin(SH1106_SWITCHCAPVCC); display.clearDisplay(); // display splash screen display.drawBitmap(0, 4, particleLogo, 128, 48, 1); display.setTextSize(1); display.setTextColor(WHITE); display.setCursor(15,54); display.print(""Real-Time Tracker""); display.display(); // start up the gnss module gnss_begin_ms = millis(); gnss_last_fix_ms = millis(); resetGNSSInfo(); gnss_on = gnss.start(&Serial1, 9600, V33_SW); // configure and start up the IMU module imu_on = init_imu(); // register cloud functions before calling Particle.connect() Particle.function(""Set_Tracking"", startTracking); Particle.function(""Get_Battery"", batteryStatus); Particle.function(""Get_Status"", getStatus); Particle.function(""Get_Location"", trackingDataPublish); Particle.function(""Sleep_WakeUp_OnMove"", enter_standby); // blue LED on D7 is used to indicate tracking is on pinMode(D7, OUTPUT); digitalWrite(D7, LOW); // adjust local time Time.zone(-5); Time.setDSTOffset(1.0); // Time.beginDST(); // uncomment when it's daylight saving time // initial screen display.clearDisplay(); display.setTextSize(1); // top status bar display.setCursor(48,0); display.printf(""%02d:%02d"", Time.hour(), Time.minute()); #ifdef cellular display.setCursor(104, 0); display.printf(""%.0f%%"", battery.getSoC()); #endif display.drawFastHLine(0, 9, display.width(), WHITE); // startup info display.setCursor(6, 10); display.printf(""gnss init. %s.."",gnss_on?""ok"":""failed""); // bottom status battery display.drawFastHLine(0, 55, display.width(), WHITE); display.setCursor(0, 57); display.print(""trip time / distance""); display.display(); // initiate cellular + cloud connection Particle.connect(); #ifdef serial_debug Serial.begin(); delay(2000); #endif // initial state after reset state = TRACKING_OFF_STATE; watchdogTimer.start(); autoSleepTimer.start(); imuTimer.start(); // displayTimer.start(); last_refresh_display = millis(); } void loop() { // FSM transitions switch(state) { case CONNECT_WAIT_STATE: if (enter_standby_flag) { state = SLEEP_STATE; } if (Particle.connected()) { if (tracking_on_flag) { state = TRACKING_ON_STATE; trackingLEDTimer.start(); } else { state = TRACKING_OFF_STATE; } } break; case TRACKING_OFF_STATE: if (enter_standby_flag) { state = SLEEP_STATE; } if (!Particle.connected()) { // cloud connection lost #ifdef serial_debug Log.info(""retrying to connect...""); #endif state = CONNECT_WAIT_STATE; } if (tracking_on_flag) { #ifdef serial_debug Log.info(""switch tracking on""); #endif state = TRACKING_ON_STATE; trackingLEDTimer.start(); } break; case TRACKING_ON_STATE: if (enter_standby_flag) { state = SLEEP_STATE; } if (!Particle.connected()) { // cloud connection lost #ifdef serial_debug Log.info(""retrying to connect...""); #endif state = CONNECT_WAIT_STATE; trackingLEDTimer.stop(); digitalWrite(D7, LOW); } if (!tracking_on_flag) { #ifdef serial_debug Log.info(""switch tracking off""); #endif state = TRACKING_OFF_STATE; trackingLEDTimer.stop(); digitalWrite(D7, LOW); } break; case SLEEP_STATE: /* Pre Sleep Routine */ pre_sleep_sequence(); /* Rickkas did an interesting analysis on which standby mode is best for different scenarios * https://github.com/rickkas7/electron-power-data-usage * SLEEP_NETWORK_STANDBY option is a 6.53mA on average standby mode but no need to reset cellular connection. * It's a faster wakeup and it saves energy by reducing radio transmission. * another Rickkas trick: remote wake up using modem's incoming data trigger: * https://community.particle.io/t/wakeon-ri-in-sleep-network-standby/43756/3 */ //Not Working: it's available to 3G modem only. Enable wake up on all URCs. We'll see with Boron //Cellular.command(""AT+URING=1\\r\\n"");delay(1000); System.sleep(WKP, RISING, SLEEPING_TIME, SLEEP_NETWORK_STANDBY); /* Post Wake up routine */ post_awake_sequence(); state = CONNECT_WAIT_STATE; break; } //FSM transitions /* * LOOP() other tasks * *NOTE *Keep Alive actions is not needed if using Particle Sim card (default value of 23 min). *Since firmware 0.8.4, Particle.keepAlive() behaviour changed regarding requirement of cloud connection. *but for the time being, I still wait for cloud connection before changing it */ #ifdef googlefi // one-time action that needs to run after cloud connection static bool keepAlive_set = false; if (!keepAlive_set && Particle.connected()) { Particle.keepAlive(KEEPALIVE_PERIOD); keepAlive_set = true; #ifdef serial_debug Log.info(""keepalive period updated to %lu seconds."", KEEPALIVE_PERIOD); #endif } #endif // a one-time check to set session_id after reset if (Time.isValid() && session_id_reset) { session_id = Time.local(); session_id_reset = false; } // in Tracking On mode, check if it's time to publish GNSS data if (tracking_on_flag && millis() > (last_tracking_publish + PUBLISH_PERIOD + publish_extra_time)) { trackingDataPublish(""""); last_tracking_publish = millis(); } // in Tracking On mode, check if it's time to increment trip distance/time if (tracking_on_flag && millis() > (last_updated_odometer + ODOMETER_PERIOD)) { // calculate distance if there's significant change if (valid_fix_flag) { if (old_lat == 0) { // first time with valid fix, save initial location old_lat = lat; old_lon = lon; } else { delta_dist = distance_angle_between(old_lat, old_lon, lat, lon, true); // delta distance threshold is max(horizontal_accuracy, 10) in meters delta_dist_th = hAcc > 10.0 ? hAcc : 10.0; if (delta_dist > delta_dist_th) { // increment distance only when delta > threshold to reduce inaccuracy due to location nois #ifdef serial_debug Log.info(""d_lat=%.6f"", lat - old_lat); Log.info(""d_lon=%.6f"", lon - old_lon); Log.info(""d_dist=%.2f m"", delta_dist); #endif tripDistance_m = tripDistance_m + delta_dist; // save previous location only when there was significant change in location // useful when in low speed (walking) it takes more time to get significant delta distance old_lat = lat; old_lon = lon; } } } // trip time is updated as long as tracking is on (regardless of fix validity) tripTime += (millis() - last_updated_odometer) / 1000; last_updated_odometer = millis(); } if (millis() > (last_refresh_display + DISPLAY_PERIOD)) { display_update(); last_refresh_display = millis(); } /* get assist now data provided by u-blox. Requires an HTTP request and a valid token provided by u-blox * try it once or every 10 sec while waiting for a fix * blocks for up to 10 sec * TODO do it in a non blocking way? --> get the while loop out of here or run in its own thread? */ if (!valid_fix_flag && assistNow_on_flag) { gnss.assist(); //blocks for up to 10 sec, needs cloud connection assistNow_on_flag = false; } // cycle power of cellular modem to force it to re-establish a clea connection with network if (cycle_modem_power_flag) { cycle_modem_power_flag = false; Cellular.off(); delay(3000); Cellular.on(); Cellular.connect(); } } //loop /* this runs in between calls to loop() to * feed gnss parser with available data on the UART */ void serialEvent1() { gnss.update(); } void pre_sleep_sequence() { //show sleep icon and then disable display module // displayTimer.stop(); display.clearDisplay(); display.drawBitmap(39, 7, power_sleep_icon, 48, 48, 1); display.display(); // reset session if requested. Clear flag only if successful if (reset_session_flag) { reset_publish_session(); reset_session_flag = false; // clear flag if reset successful // experimental: allow some time to make sure the publish go through delay(1000); } //digitalWrite(OLED_DC, LOW); // keeping OLED_DC high is a nice hack to maintain GNSS in standby mode // software shutdown gnss module then power off display and gnss modules gnss.stop(); // clear display display.clearDisplay(); display.display(); digitalWrite(OLED_CS, HIGH); digitalWrite(V33_SW, LOW); #ifdef serial_debug Log.info(""Going into network standby sleep mode""); #endif if (Particle.connected()) { Particle.publish(""GNSS/sleep"", Time.format(Time.now(), ""%FT%T""), 60, PRIVATE); //Time.timeStr() } // enable wake up on motion interrupt of the imu module enable_WakeOnMotionInterrupt(); } void post_awake_sequence() { enter_standby_flag = false; disable_WakeOnMotionInterrupt(); // reset GNSS module gnss.start(&Serial1, 9600, V33_SW); //TODO replace with a function that does resume() rather than (re)start() resetGNSSInfo(); // resume display activity display.begin(SH1106_SWITCHCAPVCC); display.display(); // displayTimer.reset(); SleepResult r = System.sleepResult(); if (r.wokenUpByPin()) { #ifdef serial_debug Log.info(""The device was woken up by pin %lu"", r.pin()); #endif } else if (r.wokenUpByRtc()) { batteryStatus(""""); // post battery percentage when waking up because of timeout #ifdef serial_debug Log.info(""The device was woken up by RTC""); #endif } // if resume in tracking on mode, substract the time when there was no motion if (tracking_on_flag && tripTime > (AUTOSLEEP_TIME / 1000) ) { tripTime -= (int)(AUTOSLEEP_TIME / 1000); } last_updated_odometer = millis(); // re-allow update of acceleration bias if no motion update_start_on = false; } // IMU handler: get current acceleration and reset auto sleep timer if there's motion void imu_update() { accel[0] = imu.readFloatAccelX(); accel[1] = imu.readFloatAccelY(); accel[2] = imu.readFloatAccelZ(); // get the magnitude acc_mag = sqrt(accel[0] * accel[0] + accel[1] * accel[1] + accel[2] * accel[2]); // get the deviation from acceleration at rest (==1g at any orientation) // acc_mag = 1.0 - acc_mag; acc_mag = fabs(1.0 - acc_mag); /* at any orientation, @rest: ||a|| = 1 => abs(1 - ||a||) < eps is a good criterion * for no change in motion. * reset autosleep timer if there's a change of speed or a good shake */ if (acc_mag > motion_th) { autoSleepTimer.reset(); } // improved LOW-PASS filter approach // 1- when vehicle is stopped (residual vibration and speed ~ 0), trigger the start of updating the acceleration bias due to tilt if (acc_mag < 0.005 && speed_mph < 2.0 && !update_start_on) { update_start_on = true; update_start_time = millis(); } // 2- for the next 2 seconds, update the acceleration bias (20 times) if ( (millis() - update_start_time) < 2000) { a0_y = a0_y + beta*(accel[1] - a0_y); a0_z = a0_z + beta*(accel[2] - a0_z); } else { //3- at the expiration of 2 seconds, wait until there's gain of speed to allow for another update period if (speed_mph > 10.0) update_start_on = false; } /* the tilt-compensated longitudinal acceleration is: * a_z = (accel[2] - accel[2]_rest) / -1*accel[1]_rest * when device is upright, accel[2]_rest = 0 and accel[1]_rest = -1 */ accel[2] = (a0_z - accel[2]) / a0_y; // calculate the compensated longitudinal acceleration // accel[2] = accel[2] + beta*(accel[2] - accel2_old); // MA order 1 // HIGH-PASS filter approach // compensating for tilt on the Z-axis by offesetting the projection of g-vector /*acc_z = accel[2]; //a_z[i] := x[i] // using a high pass filter accel[2] = alpha*(old_filt_acc_z + acc_z - old_acc_z); // y[i] = alpha*( y[i-1] + x[i] -x[i-1] ) old_filt_acc_z = accel[2]; //y[i-1] old_acc_z = acc_z; //x[i-1] */ } /* * GNSS data publish function: called either in tracking on mode or on demand as a cloud function */ int trackingDataPublish(String command) { int exit_code = -1; int fix_age_ms = millis() - gnss_last_fix_ms; #ifdef serial_debug Log.info(""publish gnss data requested""); Log.info(""gnss on since: %lu ms"", millis() - gnss_begin_ms); Log.info(""latest tttf: %lu ms"", ttff); Log.info(""fix age: %lu ms, validity: %d"", millis() - gnss_last_fix_ms, valid_fix_flag); #endif if (!valid_fix_flag) { snprintf(buffer, sizeof(buffer), ""%d s"", (int)(fix_age_ms / 1000)); Particle.publish(""GNSS/no fix"", buffer, 60, PRIVATE); // incease publish period since we don't need a ""no fix"" every 10s publish_extra_time = 40000; return exit_code; } if ((valid_fix_flag && fix_age_ms < 10000) || (fixType == 3)) { const char *command_c = command.c_str(); if (strcmp(command_c, ""srv"") == 0 ) { // publish -> nodejs -> influxdb (old way) const char *pattern = ""{\\""session_id\\"":\\""%lu\\"",\\""lat\\"":%f,\\""lon\\"":%f,\\""spd\\"":%.1f,\\""hd\\"":%.0f,\\""alt\\"":%.0f}""; snprintf(buffer, sizeof(buffer), pattern, session_id, lat, lon, speed_mph, heading, alt); Particle.publish(""GNSS/srv"",buffer, 60, PRIVATE); } else { // get current local timestamp and shift back to UTC time_t utc = Time.now() + 5*3600; // utc += Time.isDST()?4*3600:5*3600; const char *timeString = Time.format(utc, ""%FT%T"").c_str(); //format date/time string as expected by telegraf Particle'splugin const char *pattern = ""{\\""id\\"":%lu,\\""la\\"":%f,\\""lo\\"":%f,\\""sp\\"":%.1f,\\""hd\\"":%.0f,\\""el\\"":%.0f,\\""ts\\"":\\""%s\\""}""; snprintf(buffer, sizeof(buffer), pattern, session_id, lat, lon, speed_mph, heading, alt, timeString); publishQueue.publish(""GNSS/data"",buffer, 60, PRIVATE); } publish_extra_time = 0; } if (valid_fix_flag && fix_age_ms >= 10000) { snprintf(buffer, sizeof(buffer), ""%d s"",(int)(fix_age_ms / 1000)); Particle.publish(""GNSS/obsolete"", buffer, 60, PRIVATE); publish_extra_time = 40000; } exit_code = millis() - gnss_last_fix_ms; return exit_code; } /* remotely start/stop tracking and tracking period * command = 0..10 --> tracking off * command >= 10 and < 1800 --> tracking on, published every command seconds */ int startTracking(String command) { unsigned long _period = command.toInt(); if (_period >= 10 && _period < 1800) { tracking_on_flag = true; PUBLISH_PERIOD = _period*1000; last_updated_odometer = millis(); } else { // any other value will stop real time tracking and logging tracking_on_flag = false; PUBLISH_PERIOD = 20000; // for serial debug } return _period; } int batteryStatus(String command){ // Publish the battery percentage remaining #ifdef cellular float batterySoc = battery.getSoC(); #else float batterySoc = 100.0; #endif //new format for telegraf webhook: snprintf(buffer, sizeof(buffer), ""{\\""tags\\"":{\\""id\\"":\\""%lu\\""},\\""values\\"":{\\""percentage\\"":%.2f}}"", session_id, batterySoc); #ifdef serial_debug Log.info(buffer); #endif publishQueue.publish(""GNSS/bat"", buffer, 60, PRIVATE); // if (Particle.connected()) { Particle.publish(""GNSS/bat"", buffer, 60, PRIVATE); } return (int)batterySoc; } int getStatus(String command) { char state_label[16]; int exit_code; if (state == TRACKING_ON_STATE) { strcpy(state_label, ""tracking on""); exit_code = (int)((PUBLISH_PERIOD + publish_extra_time) / 1000); } else if (state == TRACKING_OFF_STATE) { strcpy(state_label, ""tracking off""); exit_code = 0; } else { return -1; } Particle.publish(""GNSS/status"", state_label, 60, PRIVATE); return exit_code; } int enter_standby(String command) { const char *command_c = command.c_str(); // deep sleep if (strcmp(command_c, ""off"") == 0 || strcmp(command_c, ""d"") == 0 ) { /* this is the same mode called by a double-click on SETUP button, but it's * limited in duration (8h). * it's 110uA on average with all peripherals on stand by * Device will reset when exiting this state */ System.sleep(SLEEP_MODE_SOFTPOWEROFF, 60*60*8); return 2; } else if (strcmp(command_c, ""dfu"") == 0 ) { System.dfu(); // enter DFU mode to allow new program flashing via usb return 4; } else if (strcmp(command_c, ""r"") == 0 ) { tracking_on_flag = false; reset_session_flag = true; // go for reset session id enter_standby_flag = true; // go to power save mode return 3; } else if (strcmp(command_c, ""rid"") == 0 ) { reset_session_flag = true; // go for reset session id return 1; } else { enter_standby_flag = true; // go to power save mode return 0; } } void gnssMessageHandler(uint16_t msg_class_id, const ubx_buf_t &buf) { switch (msg_class_id) { case UBX_MSG_NAV_PVT: valid_fix_flag = ((buf.payload_rx_nav_pvt.flags & UBX_RX_NAV_PVT_FLAGS_GNSSFIXOK) == 1); // update time of latest update if (valid_fix_flag) { gnss_last_fix_ms = millis();// keep it up to date unless fix is lost } // update tracking data lat = (double)buf.payload_rx_nav_pvt.lat * 1e-7; lon = (double)buf.payload_rx_nav_pvt.lon * 1e-7; alt = (double)buf.payload_rx_nav_pvt.height * 1e-3; hAcc = (double)buf.payload_rx_nav_pvt.hAcc * 1e-3; nb_sats = buf.payload_rx_nav_pvt.numSV; speed_mph = (double)buf.payload_rx_nav_pvt.gSpeed / mm_per_second_per_mph; heading = (double)buf.payload_rx_nav_pvt.headMot * 1e-5; if (speed_mph > 7.0) { // autostart tracking if (!tracking_on_flag) { tracking_on_flag = true; last_updated_odometer = millis(); } publish_extra_time = 0; } else { // slow speed, extend publish time by 30s publish_extra_time = 30000; } break; case UBX_MSG_NAV_STATUS: fixType = buf.payload_rx_nav_status.gpsFix; ttff = buf.payload_rx_nav_status.ttff; #ifdef serial_debug Log.info(""fix type=%d"", fixType); #endif break; default: valid_fix_flag = 0; // reset flag if no successful nav_pvt message parsing } } void modeButtonHandler(system_event_t event, int data) { //bug: calling this handler induce 'assert fail' crash nb_clicks = system_button_clicks(data); switch (nb_clicks) { // start / pause tracking case 1: { tracking_on_flag = !tracking_on_flag; #ifdef serial_debug Serial.printf(""tracking status: %s\\n"",tracking_on_flag?""on"":""off""); #endif if (tracking_on_flag) last_updated_odometer = millis(); break; } // end session and go into deep sleep mode (requires press on Reset button to wake up) case 2: { uint32_t trip_minutes = (tripTime > 60)? tripTime / 60 : 0; uint32_t trip_seconds = tripTime % 60; float tripDistance_mi = tripDistance_m / 1609.3; sprintf(buffer, ""{\\""tags\\"":{},\\""values\\"":{\\""id\\"":%lu,\\""min\\"":%lu,\\""sec\\"":%lu,\\""mi\\"":%.1f}}"", session_id, trip_minutes, trip_seconds, tripDistance_mi); publishQueue.publish(""GNSS/session"", buffer, 60, PRIVATE); break; } // 3 clicks: go into network standby mode, wake up very 22 or 120 minutes or when motion is detected. case 3: { // enable stop and reset session by turning off tracking. tracking_on_flag = false; reset_session_flag = true; // go for reset session id enter_standby_flag = true; // go to power save mode break; } // 4 clicks: enable turn off/on cellular module. case 4: { cycle_modem_power_flag = true; break; } default: break; } } void autoSleepHandler() { // if no motion detected for AUTOSLEEP_TIME ms, go into sleep mode enter_standby_flag = true; #ifdef serial_debug Log.info(""autosleep triggered.""); #endif } // flash blue led if tracking is on void trackingLEDUpdate() { if (state == TRACKING_ON_STATE) { digitalWrite(D7, HIGH); delay(50); digitalWrite(D7, LOW); } } #ifdef serial_debug void cloud_statusHandler(system_event_t event, int data) { switch(data) { case cloud_status_connecting: Log.info(""connecting to cloud""); break; case cloud_status_connected: Log.info(""connected to cloud""); break; case cloud_status_disconnected: Log.info(""disconnected from cloud""); break; } } #endif void resetGNSSInfo() { valid_fix_flag = false; lat = lon = alt = hAcc= speed_mph = 0.0; nb_sats = 0; // ttff = 0; // don't reset so we can use it to detect first time fix from reset from fix after sleep gnss_begin_ms = millis(); gnss_last_fix_ms = millis(); } void reset_publish_session() { // no session to publish, get new session id and exit if (tripTime == 0) { session_id_reset = true; return; } // convert seconds -> minutes:seconds and meters -> miles uint32_t trip_minutes = (tripTime > 60)? tripTime / 60 : 0; uint32_t trip_seconds = tripTime % 60; float tripDistance_mi = tripDistance_m / 1609.3; // format session stats const char *pattern = ""{\\""tags\\"":{},\\""values\\"":{\\""id\\"":%lu,\\""min\\"":%lu,\\""sec\\"":%lu,\\""mi\\"":%.1f}}""; snprintf(buffer, sizeof(buffer), pattern, session_id, trip_minutes, trip_seconds, tripDistance_mi); #ifdef serial_debug Serial.println(buffer); #endif // push to publish buffer so it'll be published next time it's cloud connected publishQueue.publish(""GNSS/session"", buffer, 60, PRIVATE); // reset trip data and set flag to renew session id tripTime = 0; tripDistance_m = 0.0; session_id_reset = true; return; } void status_bar_top_update() { display.drawFastHLine(0, 9, display.width(), WHITE); // cellular network cloud status indicator if(Particle.connected()) { //display.print(""CC""); display.drawBitmap(0, 0, cloud_icon, 10, 10, 1); } else { #ifdef cellular if(Cellular.connecting()) { display.drawBitmap(0, 0, signal_off_icon, 12, 10, 1); } if(Cellular.ready()) { display.drawBitmap(0, 0, signal_2G_icon, 12, 12, 1); } #else if(WiFi.connecting()) display.print(""--""); if(WiFi.ready()) display.print(""WiFi""); #endif } // gnss fix status indicator if (valid_fix_flag) { display.drawBitmap(14, 0, gnss_fix_icon_10, 10, 10, 1); } else { display.drawBitmap(14, 0, gnss_wait_icon_10, 10, 10, 1); } // tracking status indicator display.setCursor(28, 0); display.printf(""%s"", tracking_on_flag?""T"":"" ""); // current local time display.setCursor(48, 0); display.printf(""%d:%02d%s"", Time.hourFormat12(), Time.minute(), Time.isAM()?""AM"":""PM""); // battery state of charge #ifdef cellular display.setCursor(104, 0); float soc = battery.getSoC(); display.printf(""%.0f%%"", soc<100.0?soc:100.0); #endif } void status_bar_bottom_update() { //update bottom status bar display.drawFastHLine(0, 55, display.width(), WHITE); // left: trip time display.setCursor(0, 57); uint32_t trip_minutes = (tripTime > 60)? tripTime / 60 : 0; display.printf(""%02d:%02d"", trip_minutes, tripTime % 60); // center: last fix accuracy display.setCursor(49,57); if (valid_fix_flag) { display.printf(""%.0fm"", hAcc); // when valid, accuracy in meters } else { display.printf(""%d"", nb_sats); // # sats while waiting for fix display.drawBitmap(55, 55, satellite_icon, 10, 10, 1); } // right: trip distance display.setCursor(79, 57); display.printf(""%.2fmi"", tripDistance_m/1609.3); } void display_update() { display.clearDisplay(); status_bar_top_update(); // time since gnss on and once a fix, delta lat/lon display.setCursor(0, 11); if (!valid_fix_flag) { if (Particle.connected()) { display.printf(""%lus"", (int)(millis() - gnss_last_fix_ms) / 1000); } else { if (imu_on) display.printf(""T= %.0f F"", imu.readTempF()); } } // if lost cloud connection during tracking, display publish queue length if (!Particle.connected() && tracking_on_flag) { display.printf("" q:%u"", publishQueue.getQueueSize()); } /* char fixType_s[6]; switch (fixType ) { case 0: { strcpy(fixType_s, ""No fx""); //No fix break; } case 1: { strcpy(fixType_s, ""DR""); // Dead Reckoning break; } case 2: { strcpy(fixType_s, ""2D""); // 2d fix break; } case 3: { strcpy(fixType_s, ""3D""); // 3d fix break; } case 4: { strcpy(fixType_s, ""G+DR""); // GPS + dead reckoning break; } case 5: { strcpy(fixType_s, ""T""); // Time only fix break; } default: break; } display.setCursor(47, 11); display.printf(""%s"", fixType_s); */ // display acceleration on a g-ball chart if (imu_on) { display.drawCircle(100, 32, 20, 1); // target circle display.drawFastHLine(100-20-3, 32, 2*20+2*3, 1); // target H line display.drawFastVLine(100, 32-20-2, 2*20+2*2, 1); // target V line // reset gball location to center int16_t gball_center_x = 100; int16_t gball_center_y = 32; // longitudinal accel along Z-axis // longitudinal acceleration displacement scaled for: 20 pixels/0.5G (auto-compensated for tilt ) //if (accel[2] > 0.04 || accel[2] < -0.04) { gball_center_y = gball_center_y - int(accel[2]*40.0); //throttling --> accel < 0 --> y down --> ball up //} // lateral acceleration displacement scaled for: 20 pixels/0.5G along X-axis (not affected by tilt in this use case) if (accel[0] > 0.04 || accel[0] < -0.04 ) { gball_center_x = gball_center_x - int(accel[0]*40.0); //turn left --> accel > 0 --> x down --> ball left } // draw the gball display.fillCircle(gball_center_x, gball_center_y, 3, 1); // test: display acc_z offset display.setCursor(0, 43); display.printf(""z:%.2f"", a0_z); // display.setCursor(41, 19); // display.printf(""y:%.2f"", a0_y); // debug data: acceleration vector // display.setCursor(0,43); // display.printf(""m:%.3f"", acc_mag); /* display.setCursor(48,28); display.print(accel[1]); display.setCursor(48,37); display.print(accel[2]); */ } else { display.setCursor(0, 19); display.printf(""imu init. failed""); } // display current speed (size 2) display.setCursor(11, 24); display.setTextSize(2); display.printf(""%.0f"", speed_mph); display.setTextSize(1); display.print(""mph""); // display current heading (size 2) display.setCursor(48, 35); display.setTextSize(2); display.print(valid_fix_flag?heading2cardinal(heading):""--""); display.setTextSize(1); // snprintf # clicks when button is pressed... if (nb_clicks > 0) { display.setCursor(0, 43); display.printf(""%lu clicks"", nb_clicks); // clear the button pressed buffer nb_clicks = 0; } status_bar_bottom_update(); display.display(); } // functions included in Arduino but not Particle: double radians(double deg) { return (deg * M_PI) / 180.0; } double degrees(double radians) { return (radians * 180.0) / M_PI; } // calculate distance or angle between two locations // lat1 and long1 : previous locations // lat2 and long2 : current locations // approximation used: equirectangular (valid for short distances only) // dist_angle: if True _> distance, else --> angle/bearing from old_location to current location double distance_angle_between (float lat1, double long1, double lat2, double long2, bool dist_angle) { double dLon = radians(long2-long1); double aLat = radians(lat1+lat2)/2; double x = dLon*cos(aLat); double y = radians(lat2-lat1); if (dist_angle){ // calculate distance double dist = sqrt(x*x + y*y); //Log.info(""%12.9f, %12.9f, %12.9f, %12.9f, %12.9f"", dLon, aLat, x, y, dist); //return distance in meters after multiplying by mean earth radius return dist*6371009.0; } else { // returns angle in degrees! // to get bearing relative to course: rel_bearing = bearingTo - course // it's in [-pi, pi] and positive -> turn right, negative-> turn left double cto= atan2(x, y); //cto < 0.0? cto += TWO_PI: cto; //or: (degress(cto)+360)%360 to have it in 0..359 return degrees(cto); } } // from Mikal Hart's TinyGPSPlus lib: convert heading in degrees into a cardinal direction: N, NW, ENE .... const char* heading2cardinal(double heading) { static const char* directions[] = {""N"", ""NNE"", ""NE"", ""ENE"", ""E"", ""ESE"", ""SE"", ""SSE"", ""S"", ""SSW"", ""SW"", ""WSW"", ""W"", ""WNW"", ""NW"", ""NNW""}; int direction = (int)((heading + 11.25) / 22.5); return directions[direction % 16]; } bool init_imu() { //Over-ride default settings if desired imu.settings.gyroEnabled = 0; //to be reset as there's no need for gyro in this project for now imu.settings.gyroRange = 1000; //Max deg/s. Can be: 125, 245, 500, 1000, 2000 imu.settings.gyroSampleRate = 13; //Hz. Can be: 13, 26, 52, 104, 208, 416, 833, 1666 imu.settings.gyroBandWidth = 50; //Hz. Can be: 50, 100, 200, 400; imu.settings.gyroFifoEnabled = 0; //Set to include gyro in FIFO imu.settings.gyroFifoDecimation = 1; //set 1 for on /1 imu.settings.accelEnabled = 1; imu.settings.accelRange = 2; //Max G force readable. Can be: 2, 4, 8, 16 imu.settings.accelSampleRate = 52; //Hz. Can be: 13, 26, 52, 104, 208, 416, 833, 1666, 3332, 6664, 13330 imu.settings.accelBandWidth = 100; //Hz. Can be: 50, 100, 200, 400; imu.settings.accelFifoEnabled = 0; //Set to include accelerometer in the FIFO imu.settings.accelFifoDecimation = 2; //set 1 for on /1 //Non-basic mode settings imu.settings.commMode = 1; // doesn't seem to do anything, no reference to AN either... //FIFO control settings //imu.settings.fifoThreshold = 100; //Can be 0 to 4096 (16 bit bytes) //imu.settings.fifoSampleRate = 10; //Hz. Can be: 10, 25, 50, 100, 200, 400, 800, 1600, 3300, 6600 imu.settings.fifoModeWord = 0; //FIFO mode. //FIFO mode. Can be: // 0 (Bypass mode, FIFO off) // 1 (Stop when full) // 3 (Continuous during trigger) // 4 (Bypass until trigger) // 6 (Continous mode) imu.settings.tempEnabled = 1; // enable temp. data status_t imu_init_flag = imu.begin(); return imu_init_flag == IMU_SUCCESS? true : false; } bool enable_WakeOnMotionInterrupt() { // configure INT1 output to trigger wake on motion uint8_t errorAccumulator = 0; uint8_t dataToWrite = 0; // ST's recommended implementation (AN4650 p.50) // 1- set ODR (sampling rate) and full scale settings in CTRL1_XL dataToWrite |= LSM6DS3_ACC_GYRO_ODR_XL_104Hz; dataToWrite |= LSM6DS3_ACC_GYRO_BW_XL_100Hz; dataToWrite |= LSM6DS3_ACC_GYRO_FS_XL_2g; errorAccumulator = imu.writeRegister(LSM6DS3_ACC_GYRO_CTRL1_XL, dataToWrite); // 2- write 0x10 to TAP_CFG: enable high pass filter, no latch on INT (INT is high for just 1/ODR sec) errorAccumulator += imu.writeRegister( LSM6DS3_ACC_GYRO_TAP_CFG1, 0x10 ); // 3- write 0x00 to WAKE_UP_DUR (bits5&6) in multiple of 1/ODR second errorAccumulator += imu.writeRegister( LSM6DS3_ACC_GYRO_WAKE_UP_DUR, 0x40 ); //for 2 samples long // 4- write 0x04 to WAKE_UP_THS (0h to 3Fh) to set detection threshold in multiples of FS/64 errorAccumulator += imu.writeRegister( LSM6DS3_ACC_GYRO_WAKE_UP_THS, 0x05 ); //0x04:0.125g, 0x05:0.156, 0x08:0.25g // 5- write 0x20 to MD1_CFG to drive wake up interrupt to INT1 errorAccumulator += imu.writeRegister( LSM6DS3_ACC_GYRO_MD1_CFG, 0x20 ); return errorAccumulator == 0? true:false; } bool disable_WakeOnMotionInterrupt() { uint8_t errorAccumulator = 0; errorAccumulator = imu.writeRegister( LSM6DS3_ACC_GYRO_MD1_CFG, 0x00 ); errorAccumulator += imu.writeRegister( LSM6DS3_ACC_GYRO_TAP_CFG1, 0x00 ); errorAccumulator += imu.writeRegister( LSM6DS3_ACC_GYRO_WAKE_UP_DUR, 0x00 ); errorAccumulator += imu.writeRegister( LSM6DS3_ACC_GYRO_WAKE_UP_THS, 0x00 ); return errorAccumulator == 0? true:false; } // checking with wtachdog every 5 sec if cloud connected void wd_check_in() { if (Particle.connected()) { wd.checkin(); } }",12492,False,1979.3069264380672,median "cmd_/home/jsen/ovs/openvswitch-2.8.5/datapath/linux/dst_cache.o := gcc -Wp,-MD,/home/jsen/ovs/openvswitch-2.8.5/datapath/linux/.dst_cache.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.8/include -I/home/jsen/ovs/openvswitch-2.8.5/include -I/home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat -I/home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include -I./arch/x86/include -Iarch/x86/include/generated/uapi -Iarch/x86/include/generated -Iinclude -I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -Iubuntu/include -D__KERNEL__ -fno-pie -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-pie -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -O2 --param=allow-store-data-races=0 -Wframe-larger-than=1024 -fstack-protector -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -pg -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -DCC_HAVE_ASM_GOTO -DVERSION=\\""2.8.5\\"" -I/home/jsen/ovs/openvswitch-2.8.5/datapath/linux/.. -I/home/jsen/ovs/openvswitch-2.8.5/datapath/linux/.. -g -include /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/kcompat.h -DMODULE -D""KBUILD_STR(s)=\\#s"" -D""KBUILD_BASENAME=KBUILD_STR(dst_cache)"" -D""KBUILD_MODNAME=KBUILD_STR(openvswitch)"" -c -o /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/.tmp_dst_cache.o /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/dst_cache.c source_/home/jsen/ovs/openvswitch-2.8.5/datapath/linux/dst_cache.o := /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/dst_cache.c deps_/home/jsen/ovs/openvswitch-2.8.5/datapath/linux/dst_cache.o := \\ $(wildcard include/config/ipv6.h) \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/kcompat.h \\ include/generated/uapi/linux/version.h \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/linux/kernel.h \\ include/linux/kernel.h \\ $(wildcard include/config/lbdaf.h) \\ $(wildcard include/config/preempt/voluntary.h) \\ $(wildcard include/config/debug/atomic/sleep.h) \\ $(wildcard include/config/mmu.h) \\ $(wildcard include/config/prove/locking.h) \\ $(wildcard include/config/panic/timeout.h) \\ $(wildcard include/config/tracing.h) \\ $(wildcard include/config/ftrace/mcount/record.h) \\ /usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdarg.h \\ include/linux/linkage.h \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/linux/compiler.h \\ include/linux/compiler.h \\ $(wildcard include/config/sparse/rcu/pointer.h) \\ $(wildcard include/config/trace/branch/profiling.h) \\ $(wildcard include/config/profile/all/branches.h) \\ $(wildcard include/config/kasan.h) \\ $(wildcard include/config/enable/must/check.h) \\ $(wildcard include/config/enable/warn/deprecated.h) \\ $(wildcard include/config/kprobes.h) \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/linux/compiler-gcc.h \\ include/linux/compiler-gcc.h \\ $(wildcard include/config/arch/supports/optimized/inlining.h) \\ $(wildcard include/config/optimize/inlining.h) \\ $(wildcard include/config/gcov/kernel.h) \\ $(wildcard include/config/arch/use/builtin/bswap.h) \\ include/uapi/linux/types.h \\ arch/x86/include/uapi/asm/types.h \\ include/uapi/asm-generic/types.h \\ include/asm-generic/int-ll64.h \\ include/uapi/asm-generic/int-ll64.h \\ arch/x86/include/uapi/asm/bitsperlong.h \\ include/asm-generic/bitsperlong.h \\ $(wildcard include/config/64bit.h) \\ include/uapi/asm-generic/bitsperlong.h \\ include/uapi/linux/posix_types.h \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/linux/stddef.h \\ include/linux/stddef.h \\ include/uapi/linux/stddef.h \\ arch/x86/include/asm/posix_types.h \\ $(wildcard include/config/x86/32.h) \\ arch/x86/include/uapi/asm/posix_types_64.h \\ include/uapi/asm-generic/posix_types.h \\ include/linux/stringify.h \\ include/linux/export.h \\ $(wildcard include/config/have/underscore/symbol/prefix.h) \\ $(wildcard include/config/modules.h) \\ $(wildcard include/config/modversions.h) \\ $(wildcard include/config/unused/symbols.h) \\ arch/x86/include/asm/linkage.h \\ $(wildcard include/config/x86/64.h) \\ $(wildcard include/config/x86/alignment/16.h) \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/linux/types.h \\ include/linux/types.h \\ $(wildcard include/config/have/uid16.h) \\ $(wildcard include/config/uid16.h) \\ $(wildcard include/config/arch/dma/addr/t/64bit.h) \\ $(wildcard include/config/phys/addr/t/64bit.h) \\ include/linux/bitops.h \\ arch/x86/include/asm/bitops.h \\ $(wildcard include/config/x86/cmov.h) \\ arch/x86/include/asm/alternative.h \\ $(wildcard include/config/smp.h) \\ $(wildcard include/config/paravirt.h) \\ arch/x86/include/asm/asm.h \\ arch/x86/include/asm/ptrace.h \\ $(wildcard include/config/x86/debugctlmsr.h) \\ arch/x86/include/asm/segment.h \\ $(wildcard include/config/cc/stackprotector.h) \\ $(wildcard include/config/x86/32/lazy/gs.h) \\ include/uapi/linux/const.h \\ arch/x86/include/asm/cache.h \\ $(wildcard include/config/x86/l1/cache/shift.h) \\ $(wildcard include/config/x86/internode/cache/shift.h) \\ $(wildcard include/config/x86/vsmp.h) \\ arch/x86/include/asm/page_types.h \\ $(wildcard include/config/physical/start.h) \\ $(wildcard include/config/physical/align.h) \\ arch/x86/include/asm/page_64_types.h \\ $(wildcard include/config/randomize/base.h) \\ $(wildcard include/config/randomize/base/max/offset.h) \\ arch/x86/include/uapi/asm/ptrace.h \\ arch/x86/include/uapi/asm/ptrace-abi.h \\ arch/x86/include/asm/processor-flags.h \\ $(wildcard include/config/vm86.h) \\ arch/x86/include/uapi/asm/processor-flags.h \\ arch/x86/include/asm/paravirt_types.h \\ $(wildcard include/config/x86/local/apic.h) \\ $(wildcard include/config/pgtable/levels.h) \\ $(wildcard include/config/x86/pae.h) \\ $(wildcard include/config/queued/spinlocks.h) \\ $(wildcard include/config/paravirt/debug.h) \\ arch/x86/include/asm/desc_defs.h \\ arch/x86/include/asm/kmap_types.h \\ $(wildcard include/config/debug/highmem.h) \\ include/asm-generic/kmap_types.h \\ arch/x86/include/asm/pgtable_types.h \\ $(wildcard include/config/kmemcheck.h) \\ $(wildcard include/config/mem/soft/dirty.h) \\ $(wildcard include/config/proc/fs.h) \\ arch/x86/include/asm/pgtable_64_types.h \\ arch/x86/include/asm/sparsemem.h \\ $(wildcard include/config/sparsemem.h) \\ arch/x86/include/asm/spinlock_types.h \\ $(wildcard include/config/paravirt/spinlocks.h) \\ $(wildcard include/config/nr/cpus.h) \\ include/asm-generic/qspinlock_types.h \\ include/asm-generic/qrwlock_types.h \\ include/asm-generic/ptrace.h \\ arch/x86/include/asm/rmwcc.h \\ arch/x86/include/asm/barrier.h \\ $(wildcard include/config/x86/ppro/fence.h) \\ arch/x86/include/asm/nops.h \\ $(wildcard include/config/mk7.h) \\ $(wildcard include/config/x86/p6/nop.h) \\ include/asm-generic/bitops/find.h \\ $(wildcard include/config/generic/find/first/bit.h) \\ include/asm-generic/bitops/sched.h \\ arch/x86/include/asm/arch_hweight.h \\ arch/x86/include/asm/cpufeatures.h \\ arch/x86/include/asm/required-features.h \\ $(wildcard include/config/x86/minimum/cpu/family.h) \\ $(wildcard include/config/math/emulation.h) \\ $(wildcard include/config/x86/cmpxchg64.h) \\ $(wildcard include/config/x86/use/3dnow.h) \\ $(wildcard include/config/matom.h) \\ arch/x86/include/asm/disabled-features.h \\ $(wildcard include/config/x86/intel/mpx.h) \\ include/asm-generic/bitops/const_hweight.h \\ include/asm-generic/bitops/le.h \\ arch/x86/include/uapi/asm/byteorder.h \\ include/linux/byteorder/little_endian.h \\ include/uapi/linux/byteorder/little_endian.h \\ include/linux/swab.h \\ include/uapi/linux/swab.h \\ arch/x86/include/uapi/asm/swab.h \\ include/linux/byteorder/generic.h \\ include/asm-generic/bitops/ext2-atomic-setbit.h \\ include/linux/log2.h \\ $(wildcard include/config/arch/has/ilog2/u32.h) \\ $(wildcard include/config/arch/has/ilog2/u64.h) \\ include/linux/typecheck.h \\ include/linux/printk.h \\ $(wildcard include/config/message/loglevel/default.h) \\ $(wildcard include/config/early/printk.h) \\ $(wildcard include/config/printk.h) \\ $(wildcard include/config/dynamic/debug.h) \\ include/linux/init.h \\ $(wildcard include/config/broken/rodata.h) \\ $(wildcard include/config/lto.h) \\ include/linux/kern_levels.h \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/linux/cache.h \\ include/linux/cache.h \\ $(wildcard include/config/arch/has/cache/line/size.h) \\ include/uapi/linux/kernel.h \\ include/uapi/linux/sysinfo.h \\ include/linux/dynamic_debug.h \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/linux/percpu.h \\ include/linux/percpu.h \\ $(wildcard include/config/need/per/cpu/embed/first/chunk.h) \\ $(wildcard include/config/need/per/cpu/page/first/chunk.h) \\ $(wildcard include/config/have/setup/per/cpu/area.h) \\ include/linux/mmdebug.h \\ $(wildcard include/config/debug/vm.h) \\ $(wildcard include/config/debug/virtual.h) \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/linux/bug.h \\ include/linux/bug.h \\ $(wildcard include/config/generic/bug.h) \\ arch/x86/include/asm/bug.h \\ $(wildcard include/config/debug/bugverbose.h) \\ include/asm-generic/bug.h \\ $(wildcard include/config/bug.h) \\ $(wildcard include/config/generic/bug/relative/pointers.h) \\ include/linux/preempt.h \\ $(wildcard include/config/preempt/count.h) \\ $(wildcard include/config/debug/preempt.h) \\ $(wildcard include/config/preempt/tracer.h) \\ $(wildcard include/config/preempt.h) \\ $(wildcard include/config/preempt/notifiers.h) \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/linux/list.h \\ include/linux/list.h \\ $(wildcard include/config/debug/list.h) \\ include/linux/poison.h \\ $(wildcard include/config/illegal/pointer/value.h) \\ arch/x86/include/asm/preempt.h \\ arch/x86/include/asm/percpu.h \\ $(wildcard include/config/x86/64/smp.h) \\ include/asm-generic/percpu.h \\ include/linux/threads.h \\ $(wildcard include/config/base/small.h) \\ include/linux/percpu-defs.h \\ $(wildcard include/config/debug/force/weak/per/cpu.h) \\ include/linux/thread_info.h \\ $(wildcard include/config/compat.h) \\ $(wildcard include/config/debug/stack/usage.h) \\ arch/x86/include/asm/thread_info.h \\ $(wildcard include/config/ia32/emulation.h) \\ arch/x86/include/asm/page.h \\ arch/x86/include/asm/page_64.h \\ $(wildcard include/config/flatmem.h) \\ $(wildcard include/config/x86/vsyscall/emulation.h) \\ include/linux/range.h \\ include/asm-generic/memory_model.h \\ $(wildcard include/config/discontigmem.h) \\ $(wildcard include/config/sparsemem/vmemmap.h) \\ include/asm-generic/getorder.h \\ arch/x86/include/asm/cpufeature.h \\ $(wildcard include/config/x86/feature/names.h) \\ $(wildcard include/config/x86/debug/static/cpu/has.h) \\ arch/x86/include/asm/processor.h \\ $(wildcard include/config/m486.h) \\ $(wildcard include/config/xen.h) \\ arch/x86/include/asm/math_emu.h \\ arch/x86/include/uapi/asm/sigcontext.h \\ arch/x86/include/asm/current.h \\ arch/x86/include/asm/msr.h \\ arch/x86/include/asm/msr-index.h \\ $(wildcard include/config/tdp/nominal.h) \\ $(wildcard include/config/tdp/level/1.h) \\ $(wildcard include/config/tdp/level/2.h) \\ $(wildcard include/config/tdp/control.h) \\ $(wildcard include/config/tdp/level1.h) \\ $(wildcard include/config/tdp/level2.h) \\ arch/x86/include/uapi/asm/errno.h \\ include/uapi/asm-generic/errno.h \\ include/uapi/asm-generic/errno-base.h \\ arch/x86/include/asm/cpumask.h \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/linux/cpumask.h \\ include/linux/cpumask.h \\ $(wildcard include/config/cpumask/offstack.h) \\ $(wildcard include/config/hotplug/cpu.h) \\ $(wildcard include/config/debug/per/cpu/maps.h) \\ include/linux/bitmap.h \\ include/linux/string.h \\ $(wildcard include/config/binary/printf.h) \\ include/uapi/linux/string.h \\ arch/x86/include/asm/string.h \\ arch/x86/include/asm/string_64.h \\ arch/x86/include/uapi/asm/msr.h \\ include/uapi/linux/ioctl.h \\ arch/x86/include/uapi/asm/ioctl.h \\ include/asm-generic/ioctl.h \\ include/uapi/asm-generic/ioctl.h \\ arch/x86/include/asm/paravirt.h \\ arch/x86/include/asm/special_insns.h \\ arch/x86/include/asm/fpu/types.h \\ include/linux/personality.h \\ include/uapi/linux/personality.h \\ include/linux/math64.h \\ $(wildcard include/config/arch/supports/int128.h) \\ arch/x86/include/asm/div64.h \\ include/asm-generic/div64.h \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/linux/err.h \\ include/linux/err.h \\ include/linux/irqflags.h \\ $(wildcard include/config/trace/irqflags.h) \\ $(wildcard include/config/irqsoff/tracer.h) \\ $(wildcard include/config/trace/irqflags/support.h) \\ arch/x86/include/asm/irqflags.h \\ $(wildcard include/config/debug/lock/alloc.h) \\ include/linux/atomic.h \\ $(wildcard include/config/generic/atomic64.h) \\ arch/x86/include/asm/atomic.h \\ arch/x86/include/asm/cmpxchg.h \\ arch/x86/include/asm/cmpxchg_64.h \\ arch/x86/include/asm/atomic64_64.h \\ include/asm-generic/atomic-long.h \\ include/linux/smp.h \\ $(wildcard include/config/up/late/init.h) \\ include/linux/errno.h \\ include/uapi/linux/errno.h \\ include/linux/llist.h \\ $(wildcard include/config/arch/have/nmi/safe/cmpxchg.h) \\ arch/x86/include/asm/smp.h \\ $(wildcard include/config/x86/io/apic.h) \\ $(wildcard include/config/x86/32/smp.h) \\ $(wildcard include/config/debug/nmi/selftest.h) \\ arch/x86/include/asm/mpspec.h \\ $(wildcard include/config/eisa.h) \\ $(wildcard include/config/x86/mpparse.h) \\ arch/x86/include/asm/mpspec_def.h \\ arch/x86/include/asm/x86_init.h \\ arch/x86/include/uapi/asm/bootparam.h \\ include/linux/screen_info.h \\ include/uapi/linux/screen_info.h \\ include/linux/apm_bios.h \\ include/uapi/linux/apm_bios.h \\ include/linux/edd.h \\ include/uapi/linux/edd.h \\ arch/x86/include/asm/e820.h \\ $(wildcard include/config/efi.h) \\ $(wildcard include/config/hibernation.h) \\ include/linux/numa.h \\ $(wildcard include/config/nodes/shift.h) \\ arch/x86/include/uapi/asm/e820.h \\ $(wildcard include/config/x86/pmem/legacy.h) \\ $(wildcard include/config/intel/txt.h) \\ include/linux/ioport.h \\ $(wildcard include/config/memory/hotremove.h) \\ arch/x86/include/asm/ist.h \\ arch/x86/include/uapi/asm/ist.h \\ include/video/edid.h \\ $(wildcard include/config/x86.h) \\ include/uapi/video/edid.h \\ arch/x86/include/asm/apicdef.h \\ arch/x86/include/asm/apic.h \\ $(wildcard include/config/x86/x2apic.h) \\ include/linux/pm.h \\ $(wildcard include/config/vt/console/sleep.h) \\ $(wildcard include/config/pm.h) \\ $(wildcard include/config/pm/sleep.h) \\ $(wildcard include/config/pm/clk.h) \\ $(wildcard include/config/pm/generic/domains.h) \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/linux/workqueue.h \\ include/linux/workqueue.h \\ $(wildcard include/config/debug/objects/work.h) \\ $(wildcard include/config/lockdep.h) \\ $(wildcard include/config/freezer.h) \\ $(wildcard include/config/sysfs.h) \\ include/linux/timer.h \\ $(wildcard include/config/timer/stats.h) \\ $(wildcard include/config/debug/objects/timers.h) \\ $(wildcard include/config/no/hz/common.h) \\ include/linux/ktime.h \\ include/linux/time.h \\ $(wildcard include/config/arch/uses/gettimeoffset.h) \\ include/linux/seqlock.h \\ include/linux/spinlock.h \\ $(wildcard include/config/debug/spinlock.h) \\ $(wildcard include/config/generic/lockbreak.h) \\ include/linux/bottom_half.h \\ include/linux/spinlock_types.h \\ include/linux/lockdep.h \\ $(wildcard include/config/lock/stat.h) \\ include/linux/rwlock_types.h \\ arch/x86/include/asm/spinlock.h \\ include/linux/jump_label.h \\ $(wildcard include/config/jump/label.h) \\ arch/x86/include/asm/jump_label.h \\ arch/x86/include/asm/qspinlock.h \\ include/asm-generic/qspinlock.h \\ arch/x86/include/asm/qrwlock.h \\ include/asm-generic/qrwlock.h \\ include/linux/rwlock.h \\ include/linux/spinlock_api_smp.h \\ $(wildcard include/config/inline/spin/lock.h) \\ $(wildcard include/config/inline/spin/lock/bh.h) \\ $(wildcard include/config/inline/spin/lock/irq.h) \\ $(wildcard include/config/inline/spin/lock/irqsave.h) \\ $(wildcard include/config/inline/spin/trylock.h) \\ $(wildcard include/config/inline/spin/trylock/bh.h) \\ $(wildcard include/config/uninline/spin/unlock.h) \\ $(wildcard include/config/inline/spin/unlock/bh.h) \\ $(wildcard include/config/inline/spin/unlock/irq.h) \\ $(wildcard include/config/inline/spin/unlock/irqrestore.h) \\ include/linux/rwlock_api_smp.h \\ $(wildcard include/config/inline/read/lock.h) \\ $(wildcard include/config/inline/write/lock.h) \\ $(wildcard include/config/inline/read/lock/bh.h) \\ $(wildcard include/config/inline/write/lock/bh.h) \\ $(wildcard include/config/inline/read/lock/irq.h) \\ $(wildcard include/config/inline/write/lock/irq.h) \\ $(wildcard include/config/inline/read/lock/irqsave.h) \\ $(wildcard include/config/inline/write/lock/irqsave.h) \\ $(wildcard include/config/inline/read/trylock.h) \\ $(wildcard include/config/inline/write/trylock.h) \\ $(wildcard include/config/inline/read/unlock.h) \\ $(wildcard include/config/inline/write/unlock.h) \\ $(wildcard include/config/inline/read/unlock/bh.h) \\ $(wildcard include/config/inline/write/unlock/bh.h) \\ $(wildcard include/config/inline/read/unlock/irq.h) \\ $(wildcard include/config/inline/write/unlock/irq.h) \\ $(wildcard include/config/inline/read/unlock/irqrestore.h) \\ $(wildcard include/config/inline/write/unlock/irqrestore.h) \\ include/linux/time64.h \\ include/uapi/linux/time.h \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/linux/jiffies.h \\ include/linux/jiffies.h \\ include/linux/timex.h \\ include/uapi/linux/timex.h \\ include/uapi/linux/param.h \\ arch/x86/include/uapi/asm/param.h \\ include/asm-generic/param.h \\ $(wildcard include/config/hz.h) \\ include/uapi/asm-generic/param.h \\ arch/x86/include/asm/timex.h \\ arch/x86/include/asm/tsc.h \\ $(wildcard include/config/x86/tsc.h) \\ include/generated/timeconst.h \\ include/linux/timekeeping.h \\ include/linux/debugobjects.h \\ $(wildcard include/config/debug/objects.h) \\ $(wildcard include/config/debug/objects/free.h) \\ include/linux/sysctl.h \\ $(wildcard include/config/sysctl.h) \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/linux/rcupdate.h \\ include/linux/rcupdate.h \\ $(wildcard include/config/tiny/rcu.h) \\ $(wildcard include/config/tree/rcu.h) \\ $(wildcard include/config/preempt/rcu.h) \\ $(wildcard include/config/rcu/trace.h) \\ $(wildcard include/config/rcu/stall/common.h) \\ $(wildcard include/config/no/hz/full.h) \\ $(wildcard include/config/rcu/nocb/cpu.h) \\ $(wildcard include/config/tasks/rcu.h) \\ $(wildcard include/config/debug/objects/rcu/head.h) \\ $(wildcard include/config/prove/rcu.h) \\ $(wildcard include/config/rcu/boost.h) \\ $(wildcard include/config/rcu/nocb/cpu/all.h) \\ $(wildcard include/config/no/hz/full/sysidle.h) \\ include/linux/completion.h \\ include/linux/wait.h \\ include/uapi/linux/wait.h \\ include/linux/rcutree.h \\ include/linux/rbtree.h \\ include/uapi/linux/sysctl.h \\ arch/x86/include/asm/fixmap.h \\ $(wildcard include/config/paravirt/clock.h) \\ $(wildcard include/config/provide/ohci1394/dma/init.h) \\ $(wildcard include/config/pci/mmconfig.h) \\ $(wildcard include/config/x86/intel/mid.h) \\ arch/x86/include/asm/acpi.h \\ $(wildcard include/config/acpi/apei.h) \\ $(wildcard include/config/acpi.h) \\ $(wildcard include/config/acpi/numa.h) \\ include/acpi/pdc_intel.h \\ arch/x86/include/asm/numa.h \\ $(wildcard include/config/numa.h) \\ $(wildcard include/config/numa/emu.h) \\ include/linux/nodemask.h \\ $(wildcard include/config/highmem.h) \\ $(wildcard include/config/movable/node.h) \\ arch/x86/include/asm/topology.h \\ include/asm-generic/topology.h \\ $(wildcard include/config/have/memoryless/nodes.h) \\ arch/x86/include/asm/mmu.h \\ $(wildcard include/config/modify/ldt/syscall.h) \\ include/linux/mutex.h \\ $(wildcard include/config/debug/mutexes.h) \\ $(wildcard include/config/mutex/spin/on/owner.h) \\ include/linux/osq_lock.h \\ arch/x86/include/asm/realmode.h \\ $(wildcard include/config/acpi/sleep.h) \\ arch/x86/include/asm/io.h \\ $(wildcard include/config/mtrr.h) \\ arch/x86/include/generated/asm/early_ioremap.h \\ include/asm-generic/early_ioremap.h \\ $(wildcard include/config/generic/early/ioremap.h) \\ include/asm-generic/iomap.h \\ $(wildcard include/config/has/ioport/map.h) \\ $(wildcard include/config/pci.h) \\ $(wildcard include/config/generic/iomap.h) \\ include/asm-generic/pci_iomap.h \\ $(wildcard include/config/no/generic/pci/ioport/map.h) \\ $(wildcard include/config/generic/pci/iomap.h) \\ include/xen/xen.h \\ $(wildcard include/config/xen/dom0.h) \\ $(wildcard include/config/xen/pvh.h) \\ include/xen/interface/xen.h \\ arch/x86/include/asm/xen/interface.h \\ arch/x86/include/asm/xen/interface_64.h \\ arch/x86/include/asm/pvclock-abi.h \\ arch/x86/include/asm/xen/hypervisor.h \\ include/xen/features.h \\ include/xen/interface/features.h \\ arch/x86/include/asm/pvclock.h \\ include/linux/clocksource.h \\ $(wildcard include/config/arch/clocksource/data.h) \\ $(wildcard include/config/clocksource/watchdog.h) \\ $(wildcard include/config/clksrc/probe.h) \\ arch/x86/include/asm/clocksource.h \\ arch/x86/include/uapi/asm/vsyscall.h \\ include/asm-generic/fixmap.h \\ arch/x86/include/asm/idle.h \\ arch/x86/include/asm/io_apic.h \\ arch/x86/include/asm/irq_vectors.h \\ $(wildcard include/config/have/kvm.h) \\ $(wildcard include/config/pci/msi.h) \\ include/linux/pfn.h \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/net/dst_cache.h \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/net/dst.h \\ include/net/dst.h \\ $(wildcard include/config/xfrm.h) \\ $(wildcard include/config/ip/route/classid.h) \\ include/net/dst_ops.h \\ include/linux/percpu_counter.h \\ include/linux/gfp.h \\ $(wildcard include/config/zone/dma.h) \\ $(wildcard include/config/zone/dma32.h) \\ $(wildcard include/config/zone/device.h) \\ $(wildcard include/config/deferred/struct/page/init.h) \\ $(wildcard include/config/cma.h) \\ include/linux/mmzone.h \\ $(wildcard include/config/force/max/zoneorder.h) \\ $(wildcard include/config/memory/isolation.h) \\ $(wildcard include/config/memcg.h) \\ $(wildcard include/config/memory/hotplug.h) \\ $(wildcard include/config/compaction.h) \\ $(wildcard include/config/flat/node/mem/map.h) \\ $(wildcard include/config/page/extension.h) \\ $(wildcard include/config/no/bootmem.h) \\ $(wildcard include/config/numa/balancing.h) \\ $(wildcard include/config/have/memory/present.h) \\ $(wildcard include/config/need/node/memmap/size.h) \\ $(wildcard include/config/have/memblock/node/map.h) \\ $(wildcard include/config/need/multiple/nodes.h) \\ $(wildcard include/config/have/arch/early/pfn/to/nid.h) \\ $(wildcard include/config/sparsemem/extreme.h) \\ $(wildcard include/config/have/arch/pfn/valid.h) \\ $(wildcard include/config/holes/in/zone.h) \\ $(wildcard include/config/arch/has/holes/memorymodel.h) \\ include/linux/pageblock-flags.h \\ $(wildcard include/config/hugetlb/page.h) \\ $(wildcard include/config/hugetlb/page/size/variable.h) \\ include/linux/page-flags-layout.h \\ include/generated/bounds.h \\ include/linux/memory_hotplug.h \\ $(wildcard include/config/have/arch/nodedata/extension.h) \\ $(wildcard include/config/have/bootmem/info/node.h) \\ include/linux/notifier.h \\ include/linux/rwsem.h \\ $(wildcard include/config/rwsem/spin/on/owner.h) \\ $(wildcard include/config/rwsem/generic/spinlock.h) \\ arch/x86/include/asm/rwsem.h \\ include/linux/srcu.h \\ arch/x86/include/asm/mmzone.h \\ arch/x86/include/asm/mmzone_64.h \\ include/linux/topology.h \\ $(wildcard include/config/use/percpu/numa/node/id.h) \\ $(wildcard include/config/sched/smt.h) \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/linux/netdevice.h \\ include/linux/netdevice.h \\ $(wildcard include/config/dcb.h) \\ $(wildcard include/config/wlan.h) \\ $(wildcard include/config/ax25.h) \\ $(wildcard include/config/mac80211/mesh.h) \\ $(wildcard include/config/net/ipip.h) \\ $(wildcard include/config/net/ipgre.h) \\ $(wildcard include/config/ipv6/sit.h) \\ $(wildcard include/config/ipv6/tunnel.h) \\ $(wildcard include/config/rps.h) \\ $(wildcard include/config/netpoll.h) \\ $(wildcard include/config/xps.h) \\ $(wildcard include/config/bql.h) \\ $(wildcard include/config/rfs/accel.h) \\ $(wildcard include/config/fcoe.h) \\ $(wildcard include/config/net/poll/controller.h) \\ $(wildcard include/config/net/rx/busy/poll.h) \\ $(wildcard include/config/libfcoe.h) \\ $(wildcard include/config/wireless/ext.h) \\ $(wildcard include/config/net/switchdev.h) \\ $(wildcard include/config/net/l3/master/dev.h) \\ $(wildcard include/config/vlan/8021q.h) \\ $(wildcard include/config/net/dsa.h) \\ $(wildcard include/config/tipc.h) \\ $(wildcard include/config/mpls/routing.h) \\ $(wildcard include/config/net/cls/act.h) \\ $(wildcard include/config/netfilter/ingress.h) \\ $(wildcard include/config/cgroup/net/prio.h) \\ $(wildcard include/config/net/flow/limit.h) \\ include/linux/delay.h \\ arch/x86/include/asm/delay.h \\ include/asm-generic/delay.h \\ include/linux/prefetch.h \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/linux/rculist.h \\ include/linux/rculist.h \\ include/linux/dmaengine.h \\ $(wildcard include/config/async/tx/enable/channel/switch.h) \\ $(wildcard include/config/dma/engine.h) \\ $(wildcard include/config/rapidio/dma/engine.h) \\ $(wildcard include/config/async/tx/dma.h) \\ include/linux/device.h \\ $(wildcard include/config/debug/devres.h) \\ $(wildcard include/config/generic/msi/irq/domain.h) \\ $(wildcard include/config/pinctrl.h) \\ $(wildcard include/config/generic/msi/irq.h) \\ $(wildcard include/config/dma/cma.h) \\ $(wildcard include/config/of.h) \\ $(wildcard include/config/devtmpfs.h) \\ $(wildcard include/config/sysfs/deprecated.h) \\ include/linux/kobject.h \\ $(wildcard include/config/uevent/helper.h) \\ $(wildcard include/config/debug/kobject/release.h) \\ include/linux/sysfs.h \\ include/linux/kernfs.h \\ $(wildcard include/config/kernfs.h) \\ include/linux/idr.h \\ include/linux/kobject_ns.h \\ include/linux/stat.h \\ arch/x86/include/uapi/asm/stat.h \\ include/uapi/linux/stat.h \\ include/linux/uidgid.h \\ $(wildcard include/config/multiuser.h) \\ $(wildcard include/config/user/ns.h) \\ include/linux/highuid.h \\ include/linux/kref.h \\ include/linux/klist.h \\ include/linux/pinctrl/devinfo.h \\ include/linux/pinctrl/consumer.h \\ include/linux/seq_file.h \\ include/linux/pinctrl/pinctrl-state.h \\ include/linux/ratelimit.h \\ arch/x86/include/asm/device.h \\ $(wildcard include/config/x86/dev/dma/ops.h) \\ $(wildcard include/config/intel/iommu.h) \\ $(wildcard include/config/amd/iommu.h) \\ include/linux/pm_wakeup.h \\ include/linux/uio.h \\ include/uapi/linux/uio.h \\ include/linux/scatterlist.h \\ $(wildcard include/config/debug/sg.h) \\ $(wildcard include/config/need/sg/dma/length.h) \\ include/linux/mm.h \\ $(wildcard include/config/ppc.h) \\ $(wildcard include/config/parisc.h) \\ $(wildcard include/config/metag.h) \\ $(wildcard include/config/ia64.h) \\ $(wildcard include/config/stack/growsup.h) \\ $(wildcard include/config/transparent/hugepage.h) \\ $(wildcard include/config/shmem.h) \\ $(wildcard include/config/debug/vm/rb.h) \\ $(wildcard include/config/debug/pagealloc.h) \\ $(wildcard include/config/hugetlbfs.h) \\ include/linux/debug_locks.h \\ $(wildcard include/config/debug/locking/api/selftests.h) \\ include/linux/mm_types.h \\ $(wildcard include/config/split/ptlock/cpus.h) \\ $(wildcard include/config/arch/enable/split/pmd/ptlock.h) \\ $(wildcard include/config/have/cmpxchg/double.h) \\ $(wildcard include/config/have/aligned/struct/page.h) \\ $(wildcard include/config/userfaultfd.h) \\ $(wildcard include/config/aio.h) \\ $(wildcard include/config/mmu/notifier.h) \\ include/linux/auxvec.h \\ include/uapi/linux/auxvec.h \\ arch/x86/include/uapi/asm/auxvec.h \\ include/linux/uprobes.h \\ $(wildcard include/config/uprobes.h) \\ arch/x86/include/asm/uprobes.h \\ include/linux/bit_spinlock.h \\ include/linux/shrinker.h \\ include/linux/resource.h \\ include/uapi/linux/resource.h \\ arch/x86/include/uapi/asm/resource.h \\ include/asm-generic/resource.h \\ include/uapi/asm-generic/resource.h \\ include/linux/page_ext.h \\ $(wildcard include/config/idle/page/tracking.h) \\ $(wildcard include/config/page/owner.h) \\ include/linux/stacktrace.h \\ $(wildcard include/config/stacktrace.h) \\ $(wildcard include/config/user/stacktrace/support.h) \\ arch/x86/include/asm/pgtable.h \\ $(wildcard include/config/debug/wx.h) \\ $(wildcard include/config/have/arch/soft/dirty.h) \\ arch/x86/include/asm/pgtable_64.h \\ include/asm-generic/pgtable.h \\ $(wildcard include/config/have/arch/huge/vmap.h) \\ include/linux/page-flags.h \\ $(wildcard include/config/arch/uses/pg/uncached.h) \\ $(wildcard include/config/memory/failure.h) \\ $(wildcard include/config/swap.h) \\ $(wildcard include/config/ksm.h) \\ include/linux/huge_mm.h \\ include/linux/vmstat.h \\ $(wildcard include/config/vm/event/counters.h) \\ $(wildcard include/config/debug/tlbflush.h) \\ $(wildcard include/config/debug/vm/vmacache.h) \\ include/linux/vm_event_item.h \\ $(wildcard include/config/migration.h) \\ $(wildcard include/config/memory/balloon.h) \\ $(wildcard include/config/balloon/compaction.h) \\ include/linux/dynamic_queue_limits.h \\ include/linux/ethtool.h \\ include/linux/compat.h \\ $(wildcard include/config/compat/old/sigaction.h) \\ $(wildcard include/config/odd/rt/sigaction.h) \\ include/linux/sem.h \\ $(wildcard include/config/sysvipc.h) \\ include/uapi/linux/sem.h \\ include/linux/ipc.h \\ include/uapi/linux/ipc.h \\ arch/x86/include/uapi/asm/ipcbuf.h \\ include/uapi/asm-generic/ipcbuf.h \\ arch/x86/include/uapi/asm/sembuf.h \\ include/linux/socket.h \\ arch/x86/include/uapi/asm/socket.h \\ include/uapi/asm-generic/socket.h \\ arch/x86/include/uapi/asm/sockios.h \\ include/uapi/asm-generic/sockios.h \\ include/uapi/linux/sockios.h \\ include/uapi/linux/socket.h \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/linux/if.h \\ include/uapi/linux/if.h \\ include/uapi/linux/libc-compat.h \\ include/uapi/linux/hdlc/ioctl.h \\ include/linux/fs.h \\ $(wildcard include/config/fs/posix/acl.h) \\ $(wildcard include/config/security.h) \\ $(wildcard include/config/cgroup/writeback.h) \\ $(wildcard include/config/ima.h) \\ $(wildcard include/config/fsnotify.h) \\ $(wildcard include/config/epoll.h) \\ $(wildcard include/config/file/locking.h) \\ $(wildcard include/config/quota.h) \\ $(wildcard include/config/blk/dev/loop.h) \\ $(wildcard include/config/fs/dax.h) \\ $(wildcard include/config/block.h) \\ include/linux/kdev_t.h \\ include/uapi/linux/kdev_t.h \\ include/linux/dcache.h \\ include/linux/rculist_bl.h \\ include/linux/list_bl.h \\ include/linux/lockref.h \\ $(wildcard include/config/arch/use/cmpxchg/lockref.h) \\ include/linux/path.h \\ include/linux/list_lru.h \\ $(wildcard include/config/memcg/kmem.h) \\ include/linux/radix-tree.h \\ include/linux/pid.h \\ include/linux/capability.h \\ include/uapi/linux/capability.h \\ include/linux/semaphore.h \\ include/uapi/linux/fiemap.h \\ include/linux/migrate_mode.h \\ include/linux/percpu-rwsem.h \\ include/linux/rcu_sync.h \\ include/linux/blk_types.h \\ $(wildcard include/config/blk/cgroup.h) \\ $(wildcard include/config/blk/dev/integrity.h) \\ include/uapi/linux/fs.h \\ include/uapi/linux/limits.h \\ include/linux/quota.h \\ $(wildcard include/config/quota/netlink/interface.h) \\ include/uapi/linux/dqblk_xfs.h \\ include/linux/dqblk_v1.h \\ include/linux/dqblk_v2.h \\ include/linux/dqblk_qtree.h \\ include/linux/projid.h \\ include/uapi/linux/quota.h \\ include/linux/nfs_fs_i.h \\ include/linux/fcntl.h \\ include/uapi/linux/fcntl.h \\ arch/x86/include/uapi/asm/fcntl.h \\ include/uapi/asm-generic/fcntl.h \\ include/uapi/linux/aio_abi.h \\ include/uapi/linux/unistd.h \\ arch/x86/include/asm/unistd.h \\ $(wildcard include/config/x86/x32/abi.h) \\ arch/x86/include/uapi/asm/unistd.h \\ arch/x86/include/generated/uapi/asm/unistd_64.h \\ arch/x86/include/generated/asm/unistd_64_x32.h \\ arch/x86/include/asm/compat.h \\ include/linux/sched.h \\ $(wildcard include/config/sched/debug.h) \\ $(wildcard include/config/lockup/detector.h) \\ $(wildcard include/config/detect/hung/task.h) \\ $(wildcard include/config/core/dump/default/elf/headers.h) \\ $(wildcard include/config/virt/cpu/accounting/native.h) \\ $(wildcard include/config/sched/autogroup.h) \\ $(wildcard include/config/bsd/process/acct.h) \\ $(wildcard include/config/taskstats.h) \\ $(wildcard include/config/audit.h) \\ $(wildcard include/config/inotify/user.h) \\ $(wildcard include/config/fanotify.h) \\ $(wildcard include/config/posix/mqueue.h) \\ $(wildcard include/config/keys.h) \\ $(wildcard include/config/perf/events.h) \\ $(wildcard include/config/bpf/syscall.h) \\ $(wildcard include/config/sched/info.h) \\ $(wildcard include/config/task/delay/acct.h) \\ $(wildcard include/config/schedstats.h) \\ $(wildcard include/config/sched/mc.h) \\ $(wildcard include/config/fair/group/sched.h) \\ $(wildcard include/config/rt/group/sched.h) \\ $(wildcard include/config/cgroup/sched.h) \\ $(wildcard include/config/blk/dev/io/trace.h) \\ $(wildcard include/config/compat/brk.h) \\ $(wildcard include/config/virt/cpu/accounting/gen.h) \\ $(wildcard include/config/auditsyscall.h) \\ $(wildcard include/config/rt/mutexes.h) \\ $(wildcard include/config/task/xacct.h) \\ $(wildcard include/config/cpusets.h) \\ $(wildcard include/config/cgroups.h) \\ $(wildcard include/config/futex.h) \\ $(wildcard include/config/arch/want/batched/unmap/tlb/flush.h) \\ $(wildcard include/config/fault/injection.h) \\ $(wildcard include/config/latencytop.h) \\ $(wildcard include/config/function/graph/tracer.h) \\ $(wildcard include/config/bcache.h) \\ $(wildcard include/config/arch/wants/dynamic/task/struct.h) \\ $(wildcard include/config/have/unstable/sched/clock.h) \\ $(wildcard include/config/irq/time/accounting.h) \\ $(wildcard include/config/have/copy/thread/tls.h) \\ include/uapi/linux/sched.h \\ include/linux/sched/prio.h \\ include/linux/plist.h \\ $(wildcard include/config/debug/pi/list.h) \\ include/linux/cputime.h \\ arch/x86/include/generated/asm/cputime.h \\ include/asm-generic/cputime.h \\ $(wildcard include/config/virt/cpu/accounting.h) \\ include/asm-generic/cputime_jiffies.h \\ include/linux/shm.h \\ include/uapi/linux/shm.h \\ arch/x86/include/uapi/asm/shmbuf.h \\ include/uapi/asm-generic/shmbuf.h \\ arch/x86/include/asm/shmparam.h \\ include/linux/signal.h \\ $(wildcard include/config/old/sigaction.h) \\ include/uapi/linux/signal.h \\ arch/x86/include/asm/signal.h \\ arch/x86/include/uapi/asm/signal.h \\ include/uapi/asm-generic/signal-defs.h \\ arch/x86/include/uapi/asm/siginfo.h \\ include/asm-generic/siginfo.h \\ include/uapi/asm-generic/siginfo.h \\ include/linux/proportions.h \\ include/linux/seccomp.h \\ $(wildcard include/config/seccomp.h) \\ $(wildcard include/config/have/arch/seccomp/filter.h) \\ $(wildcard include/config/seccomp/filter.h) \\ $(wildcard include/config/checkpoint/restore.h) \\ include/uapi/linux/seccomp.h \\ arch/x86/include/asm/seccomp.h \\ arch/x86/include/asm/ia32_unistd.h \\ arch/x86/include/generated/asm/unistd_32_ia32.h \\ include/asm-generic/seccomp.h \\ include/linux/rtmutex.h \\ $(wildcard include/config/debug/rt/mutexes.h) \\ include/linux/hrtimer.h \\ $(wildcard include/config/high/res/timers.h) \\ $(wildcard include/config/time/low/res.h) \\ $(wildcard include/config/timerfd.h) \\ include/linux/timerqueue.h \\ include/linux/task_io_accounting.h \\ $(wildcard include/config/task/io/accounting.h) \\ include/linux/latencytop.h \\ include/linux/cred.h \\ $(wildcard include/config/debug/credentials.h) \\ include/linux/key.h \\ include/linux/assoc_array.h \\ $(wildcard include/config/associative/array.h) \\ include/linux/selinux.h \\ $(wildcard include/config/security/selinux.h) \\ include/uapi/linux/magic.h \\ include/linux/cgroup-defs.h \\ include/linux/percpu-refcount.h \\ include/linux/cgroup_subsys.h \\ $(wildcard include/config/cgroup/cpuacct.h) \\ $(wildcard include/config/cgroup/device.h) \\ $(wildcard include/config/cgroup/freezer.h) \\ $(wildcard include/config/cgroup/net/classid.h) \\ $(wildcard include/config/cgroup/perf.h) \\ $(wildcard include/config/cgroup/hugetlb.h) \\ $(wildcard include/config/cgroup/pids.h) \\ $(wildcard include/config/cgroup/debug.h) \\ arch/x86/include/asm/user32.h \\ include/uapi/linux/ethtool.h \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/linux/if_ether.h \\ include/linux/if_ether.h \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/linux/skbuff.h \\ $(wildcard include/config/nf/conntrack.h) \\ include/linux/skbuff.h \\ $(wildcard include/config/bridge/netfilter.h) \\ $(wildcard include/config/ipv6/ndisc/nodetype.h) \\ $(wildcard include/config/net/sched.h) \\ $(wildcard include/config/network/secmark.h) \\ $(wildcard include/config/network/phy/timestamping.h) \\ $(wildcard include/config/netfilter/xt/target/trace.h) \\ $(wildcard include/config/nf/tables.h) \\ include/linux/kmemcheck.h \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/linux/net.h \\ include/linux/net.h \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/linux/random.h \\ include/linux/random.h \\ $(wildcard include/config/arch/random.h) \\ include/linux/once.h \\ include/uapi/linux/random.h \\ include/linux/irqnr.h \\ include/uapi/linux/irqnr.h \\ arch/x86/include/asm/archrandom.h \\ include/uapi/linux/net.h \\ include/linux/textsearch.h \\ include/linux/slab.h \\ $(wildcard include/config/debug/slab.h) \\ $(wildcard include/config/failslab.h) \\ $(wildcard include/config/slab.h) \\ $(wildcard include/config/slub.h) \\ $(wildcard include/config/slob.h) \\ include/linux/kmemleak.h \\ $(wildcard include/config/debug/kmemleak.h) \\ include/linux/kasan.h \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/net/checksum.h \\ include/net/checksum.h \\ arch/x86/include/asm/uaccess.h \\ $(wildcard include/config/x86/intel/usercopy.h) \\ $(wildcard include/config/debug/strict/user/copy/checks.h) \\ arch/x86/include/asm/smap.h \\ $(wildcard include/config/x86/smap.h) \\ arch/x86/include/asm/uaccess_64.h \\ arch/x86/include/asm/checksum.h \\ arch/x86/include/asm/checksum_64.h \\ include/linux/dma-mapping.h \\ $(wildcard include/config/has/dma.h) \\ $(wildcard include/config/arch/has/dma/set/coherent/mask.h) \\ $(wildcard include/config/have/dma/attrs.h) \\ $(wildcard include/config/need/dma/map/state.h) \\ include/linux/sizes.h \\ include/linux/dma-attrs.h \\ include/linux/dma-direction.h \\ arch/x86/include/asm/dma-mapping.h \\ $(wildcard include/config/isa.h) \\ $(wildcard include/config/x86/dma/remap.h) \\ include/linux/dma-debug.h \\ $(wildcard include/config/dma/api/debug.h) \\ arch/x86/include/asm/swiotlb.h \\ $(wildcard include/config/swiotlb.h) \\ include/linux/swiotlb.h \\ include/linux/dma-contiguous.h \\ include/asm-generic/dma-mapping-common.h \\ include/asm-generic/dma-coherent.h \\ $(wildcard include/config/have/generic/dma/coherent.h) \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/linux/netdev_features.h \\ include/linux/netdev_features.h \\ include/net/flow_dissector.h \\ include/linux/in6.h \\ include/uapi/linux/in6.h \\ include/uapi/linux/if_ether.h \\ include/linux/splice.h \\ include/linux/pipe_fs_i.h \\ include/net/flow.h \\ include/linux/jhash.h \\ include/linux/unaligned/packed_struct.h \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/net/net_namespace.h \\ $(wildcard include/config/net/ns.h) \\ include/net/net_namespace.h \\ $(wildcard include/config/ieee802154/6lowpan.h) \\ $(wildcard include/config/ip/sctp.h) \\ $(wildcard include/config/ip/dccp.h) \\ $(wildcard include/config/netfilter.h) \\ $(wildcard include/config/nf/defrag/ipv6.h) \\ $(wildcard include/config/netfilter/netlink/acct.h) \\ $(wildcard include/config/wext/core.h) \\ $(wildcard include/config/ip/vs.h) \\ $(wildcard include/config/mpls.h) \\ include/net/netns/core.h \\ include/net/netns/mib.h \\ $(wildcard include/config/xfrm/statistics.h) \\ include/net/snmp.h \\ include/uapi/linux/snmp.h \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/linux/u64_stats_sync.h \\ include/linux/u64_stats_sync.h \\ include/net/netns/unix.h \\ include/net/netns/packet.h \\ include/net/netns/ipv4.h \\ $(wildcard include/config/ip/multiple/tables.h) \\ $(wildcard include/config/ip/mroute.h) \\ $(wildcard include/config/ip/mroute/multiple/tables.h) \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/net/inet_frag.h \\ include/net/inet_frag.h \\ include/net/netns/ipv6.h \\ $(wildcard include/config/ipv6/multiple/tables.h) \\ $(wildcard include/config/ipv6/mroute.h) \\ $(wildcard include/config/ipv6/mroute/multiple/tables.h) \\ include/net/netns/ieee802154_6lowpan.h \\ include/net/netns/sctp.h \\ include/net/netns/dccp.h \\ include/net/netns/netfilter.h \\ include/linux/netfilter_defs.h \\ include/uapi/linux/netfilter.h \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/linux/in.h \\ include/linux/in.h \\ include/uapi/linux/in.h \\ include/linux/module.h \\ $(wildcard include/config/module/sig.h) \\ $(wildcard include/config/modules/tree/lookup.h) \\ $(wildcard include/config/kallsyms.h) \\ $(wildcard include/config/tracepoints.h) \\ $(wildcard include/config/event/tracing.h) \\ $(wildcard include/config/livepatch.h) \\ $(wildcard include/config/module/unload.h) \\ $(wildcard include/config/constructors.h) \\ $(wildcard include/config/debug/set/module/ronx.h) \\ include/linux/kmod.h \\ include/linux/elf.h \\ arch/x86/include/asm/elf.h \\ arch/x86/include/asm/user.h \\ arch/x86/include/asm/user_64.h \\ arch/x86/include/asm/vdso.h \\ $(wildcard include/config/x86/x32.h) \\ include/uapi/linux/elf.h \\ include/uapi/linux/elf-em.h \\ include/linux/moduleparam.h \\ $(wildcard include/config/alpha.h) \\ $(wildcard include/config/ppc64.h) \\ include/linux/rbtree_latch.h \\ arch/x86/include/asm/module.h \\ $(wildcard include/config/m586.h) \\ $(wildcard include/config/m586tsc.h) \\ $(wildcard include/config/m586mmx.h) \\ $(wildcard include/config/mcore2.h) \\ $(wildcard include/config/m686.h) \\ $(wildcard include/config/mpentiumii.h) \\ $(wildcard include/config/mpentiumiii.h) \\ $(wildcard include/config/mpentiumm.h) \\ $(wildcard include/config/mpentium4.h) \\ $(wildcard include/config/mk6.h) \\ $(wildcard include/config/mk8.h) \\ $(wildcard include/config/melan.h) \\ $(wildcard include/config/mcrusoe.h) \\ $(wildcard include/config/mefficeon.h) \\ $(wildcard include/config/mwinchipc6.h) \\ $(wildcard include/config/mwinchip3d.h) \\ $(wildcard include/config/mcyrixiii.h) \\ $(wildcard include/config/mviac3/2.h) \\ $(wildcard include/config/mviac7.h) \\ $(wildcard include/config/mgeodegx1.h) \\ $(wildcard include/config/mgeode/lx.h) \\ include/asm-generic/module.h \\ $(wildcard include/config/have/mod/arch/specific.h) \\ $(wildcard include/config/modules/use/elf/rel.h) \\ $(wildcard include/config/modules/use/elf/rela.h) \\ include/net/netns/x_tables.h \\ $(wildcard include/config/bridge/nf/ebtables.h) \\ include/net/netns/conntrack.h \\ $(wildcard include/config/nf/conntrack/proc/compat.h) \\ $(wildcard include/config/nf/conntrack/events.h) \\ $(wildcard include/config/nf/conntrack/labels.h) \\ $(wildcard include/config/nf/nat/needed.h) \\ include/linux/list_nulls.h \\ include/linux/netfilter/nf_conntrack_tcp.h \\ include/uapi/linux/netfilter/nf_conntrack_tcp.h \\ include/net/netns/nftables.h \\ include/net/netns/xfrm.h \\ include/uapi/linux/xfrm.h \\ include/net/flowcache.h \\ include/linux/interrupt.h \\ $(wildcard include/config/irq/forced/threading.h) \\ $(wildcard include/config/generic/irq/probe.h) \\ include/linux/irqreturn.h \\ include/linux/hardirq.h \\ include/linux/ftrace_irq.h \\ $(wildcard include/config/ftrace/nmi/enter.h) \\ include/linux/vtime.h \\ include/linux/context_tracking_state.h \\ $(wildcard include/config/context/tracking.h) \\ include/linux/static_key.h \\ arch/x86/include/asm/hardirq.h \\ $(wildcard include/config/x86/thermal/vector.h) \\ $(wildcard include/config/x86/mce/threshold.h) \\ $(wildcard include/config/x86/mce/amd.h) \\ $(wildcard include/config/hyperv.h) \\ include/linux/irq.h \\ $(wildcard include/config/irq/domain/hierarchy.h) \\ $(wildcard include/config/generic/pending/irq.h) \\ $(wildcard include/config/hardirqs/sw/resend.h) \\ $(wildcard include/config/generic/irq/legacy/alloc/hwirq.h) \\ $(wildcard include/config/generic/irq/legacy.h) \\ include/linux/irqhandler.h \\ include/linux/io.h \\ arch/x86/include/asm/irq.h \\ arch/x86/include/asm/irq_regs.h \\ include/linux/irqdesc.h \\ $(wildcard include/config/irq/preflow/fasteoi.h) \\ $(wildcard include/config/sparse/irq.h) \\ $(wildcard include/config/handle/domain/irq.h) \\ arch/x86/include/asm/hw_irq.h \\ $(wildcard include/config/hpet/timer.h) \\ $(wildcard include/config/dmar/table.h) \\ $(wildcard include/config/ht/irq.h) \\ $(wildcard include/config/x86/uv.h) \\ include/linux/profile.h \\ $(wildcard include/config/profiling.h) \\ arch/x86/include/asm/sections.h \\ $(wildcard include/config/debug/rodata.h) \\ include/asm-generic/sections.h \\ include/net/netns/mpls.h \\ include/linux/ns_common.h \\ include/linux/seq_file_net.h \\ include/net/dsa.h \\ $(wildcard include/config/net/dsa/hwmon.h) \\ include/linux/of.h \\ $(wildcard include/config/sparc.h) \\ $(wildcard include/config/of/dynamic.h) \\ $(wildcard include/config/attach/node.h) \\ $(wildcard include/config/detach/node.h) \\ $(wildcard include/config/add/property.h) \\ $(wildcard include/config/remove/property.h) \\ $(wildcard include/config/update/property.h) \\ $(wildcard include/config/of/numa.h) \\ $(wildcard include/config/no/change.h) \\ $(wildcard include/config/change/add.h) \\ $(wildcard include/config/change/remove.h) \\ $(wildcard include/config/of/resolve.h) \\ $(wildcard include/config/of/overlay.h) \\ include/linux/mod_devicetable.h \\ include/linux/uuid.h \\ include/uapi/linux/uuid.h \\ include/linux/property.h \\ include/linux/fwnode.h \\ include/linux/phy.h \\ include/linux/mii.h \\ include/uapi/linux/mii.h \\ include/linux/phy_fixed.h \\ $(wildcard include/config/fixed/phy.h) \\ include/net/dcbnl.h \\ include/uapi/linux/dcbnl.h \\ include/net/netprio_cgroup.h \\ include/linux/cgroup.h \\ include/uapi/linux/cgroupstats.h \\ include/uapi/linux/taskstats.h \\ include/linux/nsproxy.h \\ include/linux/user_namespace.h \\ $(wildcard include/config/persistent/keyrings.h) \\ include/uapi/linux/neighbour.h \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/linux/netlink.h \\ include/linux/netlink.h \\ include/net/scm.h \\ $(wildcard include/config/security/network.h) \\ include/linux/security.h \\ $(wildcard include/config/security/network/xfrm.h) \\ $(wildcard include/config/security/path.h) \\ $(wildcard include/config/securityfs.h) \\ include/uapi/linux/netlink.h \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/net/netlink.h \\ $(wildcard include/config/have/efficient/unaligned/access.h) \\ include/net/netlink.h \\ include/linux/in6.h \\ include/uapi/linux/netdevice.h \\ include/uapi/linux/if_packet.h \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/linux/if_link.h \\ include/linux/if_link.h \\ include/uapi/linux/if_link.h \\ $(wildcard include/config/pending.h) \\ include/uapi/linux/if_bonding.h \\ include/uapi/linux/pkt_cls.h \\ $(wildcard include/config/net/cls/ind.h) \\ include/uapi/linux/pkt_sched.h \\ include/linux/if_bridge.h \\ $(wildcard include/config/bridge.h) \\ $(wildcard include/config/bridge/igmp/snooping.h) \\ include/uapi/linux/if_bridge.h \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/linux/rtnetlink.h \\ include/linux/rtnetlink.h \\ $(wildcard include/config/net/ingress.h) \\ include/uapi/linux/rtnetlink.h \\ include/uapi/linux/if_addr.h \\ include/net/neighbour.h \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/net/rtnetlink.h \\ include/net/rtnetlink.h \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/net/ip6_fib.h \\ include/net/ip6_fib.h \\ $(wildcard include/config/ipv6/subtrees.h) \\ include/linux/ipv6_route.h \\ include/uapi/linux/ipv6_route.h \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/net/inetpeer.h \\ include/net/inetpeer.h \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/net/ipv6.h \\ include/net/ipv6.h \\ include/linux/ipv6.h \\ $(wildcard include/config/ipv6/router/pref.h) \\ $(wildcard include/config/ipv6/route/info.h) \\ $(wildcard include/config/ipv6/optimistic/dad.h) \\ $(wildcard include/config/ipv6/mip6.h) \\ include/uapi/linux/ipv6.h \\ include/linux/icmpv6.h \\ include/uapi/linux/icmpv6.h \\ include/linux/tcp.h \\ $(wildcard include/config/tcp/md5sig.h) \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/net/sock.h \\ include/net/sock.h \\ $(wildcard include/config/net.h) \\ $(wildcard include/config/inet.h) \\ include/linux/uaccess.h \\ include/linux/page_counter.h \\ include/linux/memcontrol.h \\ $(wildcard include/config/memcg/swap.h) \\ include/linux/vmpressure.h \\ include/linux/eventfd.h \\ $(wildcard include/config/eventfd.h) \\ include/linux/writeback.h \\ include/linux/flex_proportions.h \\ include/linux/backing-dev-defs.h \\ $(wildcard include/config/debug/fs.h) \\ include/linux/bio.h \\ include/linux/highmem.h \\ arch/x86/include/asm/cacheflush.h \\ $(wildcard include/config/debug/rodata/test.h) \\ include/asm-generic/cacheflush.h \\ include/linux/mempool.h \\ include/linux/ioprio.h \\ include/linux/iocontext.h \\ include/linux/filter.h \\ $(wildcard include/config/bpf/jit.h) \\ include/net/sch_generic.h \\ /home/jsen/ovs/openvswitch-2.8.5/include/linux/pkt_cls.h \\ include/uapi/linux/pkt_cls.h \\ include/net/gen_stats.h \\ include/uapi/linux/gen_stats.h \\ include/uapi/linux/filter.h \\ include/uapi/linux/bpf_common.h \\ include/uapi/linux/bpf.h \\ include/linux/rculist_nulls.h \\ include/linux/poll.h \\ include/uapi/linux/poll.h \\ arch/x86/include/uapi/asm/poll.h \\ include/uapi/asm-generic/poll.h \\ include/net/tcp_states.h \\ include/uapi/linux/net_tstamp.h \\ include/net/inet_connection_sock.h \\ include/net/inet_sock.h \\ include/net/request_sock.h \\ include/net/netns/hash.h \\ include/net/inet_timewait_sock.h \\ include/net/timewait_sock.h \\ include/uapi/linux/tcp.h \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/linux/udp.h \\ include/linux/udp.h \\ include/uapi/linux/udp.h \\ include/net/if_inet6.h \\ include/net/ndisc.h \\ include/linux/if_arp.h \\ $(wildcard include/config/firewire/net.h) \\ include/uapi/linux/if_arp.h \\ include/linux/hash.h \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/compat/include/net/route.h \\ include/net/route.h \\ include/net/ip_fib.h \\ $(wildcard include/config/ip/route/multipath.h) \\ include/net/fib_rules.h \\ include/uapi/linux/fib_rules.h \\ include/net/l3mdev.h \\ include/uapi/linux/in_route.h \\ include/uapi/linux/route.h \\ include/linux/ip.h \\ include/uapi/linux/ip.h \\ /home/jsen/ovs/openvswitch-2.8.5/datapath/linux/dst_cache.o: $(deps_/home/jsen/ovs/openvswitch-2.8.5/datapath/linux/dst_cache.o) $(deps_/home/jsen/ovs/openvswitch-2.8.5/datapath/linux/dst_cache.o): ",16186,True,4493.110261384289,median "// KILL THE DEMONS // https://github.com/saswatsamal/kill-the-demons #include #include #include // DISPLAY SETTINGS #define OLED_ADDRESS 0x3C #define SCREEN_WIDTH 128 #define SCREEN_HEIGHT 64 // Input settings #define FIRE_BUT 6 #define RIGHT_BUT 5 #define LEFT_BUT 4 // Mothership #define MOTHERSHIP_HEIGHT 4 #define MOTHERSHIP_WIDTH 16 #define MOTHERSHIP_SPEED 2 #define MOTHERSHIP_SPAWN_CHANCE 250 //HIGHER IS LESS CHANCE OF SPAWN #define DISPLAY_MOTHERSHIP_BONUS_TIME 20 // how long bonus stays on screen for displaying mothership // Alien Settings #define ALIEN_HEIGHT 8 #define NUM_ALIEN_COLUMNS 7 #define NUM_ALIEN_ROWS 3 #define X_START_OFFSET 6 #define SPACE_BETWEEN_ALIEN_COLUMNS 5 #define LARGEST_ALIEN_WIDTH 11 #define SPACE_BETWEEN_ROWS 9 #define INVADERS_DROP_BY 4 // pixel amount that invaders move down by #define INVADERS_SPEED 12 // speed of movement, lower=faster. #define INVADER_HEIGHT 8 #define EXPLOSION_GFX_TIME 7 // How long an ExplosionGfx remains on screen before dissapearing #define INVADERS_Y_START MOTHERSHIP_HEIGHT-1 #define AMOUNT_TO_DROP_BY_PER_LEVEL 4 //NEW How much farther down aliens start per new level #define LEVEL_TO_RESET_TO_START_HEIGHT 4 // EVERY MULTIPLE OF THIS LEVEL THE ALIEN y START POSITION WILL RESET TO TOP #define ALIEN_X_MOVE_AMOUNT 1 //number of pixels moved at start of wave #define CHANCEOFBOMBDROPPING 20 // Higher the number the rarer the bomb drop, #define BOMB_HEIGHT 4 #define BOMB_WIDTH 2 #define MAXBOMBS 3 // Max number of bombs allowed to drop at a time // These two lines are for when bombs collide with the bases #define CHANCE_OF_BOMB_DAMAGE_TO_LEFT_OR_RIGHT 3 // higher more chance #define CHANCE_OF_BOMB_PENETRATING_DOWN 3 // higher more chance // Player settingsc #define TANKGFX_WIDTH 13 #define TANKGFX_HEIGHT 8 #define PLAYER_X_MOVE_AMOUNT 2 #define LIVES 3 //NEW #define PLAYER_EXPLOSION_TIME 10 // How long an ExplosionGfx remains on screen before dissapearing #define PLAYER_Y_START 56 #define PLAYER_X_START 0 #define BASE_WIDTH 16 #define BASE_WIDTH_IN_BYTES 2 #define BASE_HEIGHT 8 #define BASE_Y 46 #define NUM_BASES 4 #define BASE_MARGINS 10 #define MISSILE_HEIGHT 4 #define MISSILE_WIDTH 1 #define MISSILE_SPEED 4 // Status of a game object constants #define ACTIVE 0 #define EXPLODING 1 #define DESTROYED 2 // graphics // aliens const unsigned char MotherShipGfx [] PROGMEM = { B00111111,B11111100, B01101101,B10110110, B11111111,B11111111, B00111001,B10011100 }; const unsigned char InvaderTopGfx [] PROGMEM = { B00011000, B00111100, B01111110, B11011011, B11111111, B00100100, B01011010, B10100101 }; const unsigned char InvaderTopGfx2 [] PROGMEM = { B00011000, B00111100, B01111110, B11011011, B11111111, B01011010, B10000001, B01000010 }; const unsigned char PROGMEM InvaderMiddleGfx []= { B00100000,B10000000, B00010001,B00000000, B00111111,B10000000, B01101110,B11000000, B11111111,B11100000, B10111111,B10100000, B10100000,B10100000, B00011011,B00000000 }; const unsigned char PROGMEM InvaderMiddleGfx2 [] = { B00100000,B10000000, B00010001,B00000000, B10111111,B10100000, B10101110,B10100000, B11111111,B11100000, B00111111,B10000000, B00100000,B10000000, B01000000,B01000000 }; const unsigned char PROGMEM InvaderBottomGfx [] = { B00001111,B00000000, B01111111,B11100000, B11111111,B11110000, B11100110,B01110000, B11111111,B11110000, B00111001,B11000000, B01100110,B01100000, B00110000,B11000000 }; const unsigned char PROGMEM InvaderBottomGfx2 [] = { B00001111,B00000000, B01111111,B11100000, B11111111,B11110000, B11100110,B01110000, B11111111,B11110000, B00111001,B11000000, B01000110,B00100000, B10000000,B00010000 }; static const unsigned char PROGMEM ExplosionGfx [] = { B00001000,B10000000, B01000101,B00010000, B00100000,B00100000, B00010000,B01000000, B11000000,B00011000, B00010000,B01000000, B00100101,B00100000, B01001000,B10010000 }; // Player grafix const unsigned char PROGMEM TankGfx [] = { B00000010,B00000000, B00000111,B00000000, B00000111,B00000000, B01111111,B11110000, B11111111,B11111000, B11111111,B11111000, B11111111,B11111000, B11111111,B11111000, }; static const unsigned char PROGMEM MissileGfx [] = { B10000000, B10000000, B10000000, B10000000 }; static const unsigned char PROGMEM AlienBombGfx [] = { B10000000, B01000000, B10000000, B01000000 }; static const unsigned char PROGMEM BaseGfx [] = { B00011111,B11111000, B01111111,B11111110, B11111111,B11111111, B11111111,B11111111, B11111111,B11111111, B11111000,B00011111, B11100000,B00000111, B11100000,B00000111 }; // Game structures struct GameObjectStruct { // base object which most other objects will include signed int X; signed int Y; unsigned char Status; //0 active, 1 exploding, 2 destroyed }; struct BaseStruct { GameObjectStruct Ord; unsigned char Gfx[16]; }; struct AlienStruct { GameObjectStruct Ord; unsigned char ExplosionGfxCounter; // how long we want the ExplosionGfx to last }; struct PlayerStruct { GameObjectStruct Ord; unsigned int Score; unsigned char Lives; unsigned char Level; unsigned char AliensDestroyed; // count of how many killed so far unsigned char AlienSpeed; // higher the number slower they go, calculated when ever alien destroyed unsigned char ExplosionGfxCounter; // how long we want the ExplosionGfx to last }; // general global variables Adafruit_SSD1306 display(1); //alien global vars //The array of aliens across the screen AlienStruct Alien[NUM_ALIEN_COLUMNS][NUM_ALIEN_ROWS]; AlienStruct MotherShip; GameObjectStruct AlienBomb[MAXBOMBS]; BaseStruct Base[NUM_BASES]; static const int TOTAL_ALIENS=NUM_ALIEN_COLUMNS*NUM_ALIEN_ROWS; //NEW // widths of aliens // as aliens are the same type per row we do not need to store their graphic width per alien in the structure above // that would take a byte per alien rather than just three entries here, 1 per row, saving significnt memory byte AlienWidth[]={8,11,12}; // top, middle ,bottom widths char AlienXMoveAmount=2; signed char InvadersMoveCounter; // counts down, when 0 move invaders, set according to how many aliens on screen bool AnimationFrame=false; // two frames of animation, if true show one if false show the other // Mothership signed char MotherShipSpeed; unsigned int MotherShipBonus; signed int MotherShipBonusXPos; // pos to display bonus at unsigned char MotherShipBonusCounter; // how long bonus amount left on screen // Player global variables PlayerStruct Player; GameObjectStruct Missile; // game variables unsigned int HiScore; bool GameInPlay=false; void setup() { display.begin(SSD1306_SWITCHCAPVCC,OLED_ADDRESS); InitAliens(0); InitPlayer(); pinMode(RIGHT_BUT, INPUT_PULLUP); pinMode(LEFT_BUT, INPUT_PULLUP); pinMode(FIRE_BUT, INPUT_PULLUP); display.setTextSize(1); display.setTextColor(WHITE); EEPROM.get(0,HiScore); if(HiScore==65535) // new unit never written to { HiScore=0; EEPROM.put(0,HiScore); } } void loop() { //NEW if(GameInPlay) { Physics(); UpdateDisplay(); } else AttractScreen(); } void AttractScreen() { display.clearDisplay(); CentreText(""Play"",0); CentreText(""Space Invaders"",12); CentreText(""Press Fire to start"",24); CentreText(""Hi Score "",36); display.setCursor(80,36); display.print(HiScore); display.display(); if(digitalRead(FIRE_BUT)==0){ GameInPlay=true; NewGame(); } // CHECK FOR HIGH SCORE RESET, PLAYER MUST HOLD LEFT AND RIGHT TOGETHER if((digitalRead(LEFT_BUT)==0)&(digitalRead(RIGHT_BUT)==0)) { // Reset high score, don't need to worry about debounce as will ony write to EEPROM if changed, so writes a 0 then won't write again // if hiscore still 0 which it will be HiScore=0; EEPROM.put(0,HiScore); } } void Physics() { if(Player.Ord.Status==ACTIVE) { AlienControl(); MotherShipPhysics(); PlayerControl(); MissileControl(); CheckCollisions(); } } unsigned char GetScoreForAlien(int RowNumber) { // returns value for killing and alien at the row indicated switch (RowNumber) { case 0:return 30; case 1:return 20; case 2:return 10; } } void MotherShipPhysics() { if(MotherShip.Ord.Status==ACTIVE) {// spawned, move it MotherShip.Ord.X+=MotherShipSpeed; if(MotherShipSpeed>0) // going left to right , check if off right hand side { if(MotherShip.Ord.X>=SCREEN_WIDTH) { MotherShip.Ord.Status=DESTROYED; } } else // going right to left , check if off left hand side { if(MotherShip.Ord.X+MOTHERSHIP_WIDTH<0) { MotherShip.Ord.Status=DESTROYED; } } } else { // try to spawn mothership if(random(MOTHERSHIP_SPAWN_CHANCE)==1) { // Spawn a mother ship, starts just off screen at top MotherShip.Ord.Status=ACTIVE; // need to set direction if(random(2)==1) // values between 0 and 1 { MotherShip.Ord.X=SCREEN_WIDTH; MotherShipSpeed=-MOTHERSHIP_SPEED; // if we go in here swaps to right to left } else { MotherShip.Ord.X=-MOTHERSHIP_WIDTH; MotherShipSpeed=MOTHERSHIP_SPEED; // set to go left ot right } } } } void PlayerControl() { // user input checks if((digitalRead(RIGHT_BUT)==0)&(Player.Ord.X+TANKGFX_WIDTH0)) Player.Ord.X-=PLAYER_X_MOVE_AMOUNT; if((digitalRead(FIRE_BUT)==0)&(Missile.Status!=ACTIVE)) { Missile.X=Player.Ord.X+(TANKGFX_WIDTH/2); Missile.Y=PLAYER_Y_START; Missile.Status=ACTIVE; } } void MissileControl() { if(Missile.Status==ACTIVE) { Missile.Y-=MISSILE_SPEED; if(Missile.Y+MISSILE_HEIGHT<0) // If off top of screen destroy so can be used again Missile.Status=DESTROYED; } } void AlienControl() { if((InvadersMoveCounter--)<0) { bool Dropped=false; if((RightMostPos()+AlienXMoveAmount>=SCREEN_WIDTH) |(LeftMostPos()+AlienXMoveAmount<0)) // at edge of screen { AlienXMoveAmount=-AlienXMoveAmount; // reverse direction Dropped=true; // and indicate we are dropping } // update the alien postions for(int Across=0;Across=0) { if(Alien[Columns][Row].Ord.Status==ACTIVE) { ActiveCols[ActiveColCount]=Columns; ActiveColCount++; break; } Row--; } Columns++; } // we have ActiveCols array filled with the column numbers of the active cols and we have how many // in ActiveColCount, now choose a column at random ChosenColumn=random(ActiveColCount); // random number between 0 and the amount of columns // we now find the first available alien in this column to drop the bomb from Row=2; while(Row>=0) { if(Alien[ActiveCols[ChosenColumn]][Row].Ord.Status==ACTIVE) { // Set the bomb from this alien AlienBomb[BombIdx].Status=ACTIVE; AlienBomb[BombIdx].X=Alien[ActiveCols[ChosenColumn]][Row].Ord.X+int(AlienWidth[Row]/2); // above sets bomb to drop around invaders centre, here we add a litrle randomness around this pos AlienBomb[BombIdx].X=(AlienBomb[BombIdx].X-2)+random(0,4); AlienBomb[BombIdx].Y=Alien[ActiveCols[ChosenColumn]][Row].Ord.Y+4; break; } Row--; } } } void BombCollisions() { //check bombs collisions for(int i=0;i64) // gone off bottom of screen AlienBomb[i].Status=DESTROYED; else { // HAS IT HIT PLAYERS missile if(Collision(AlienBomb[i],BOMB_WIDTH,BOMB_HEIGHT,Missile,MISSILE_WIDTH,MISSILE_HEIGHT)) { // destroy missile and bomb AlienBomb[i].Status=EXPLODING; Missile.Status=DESTROYED; } else { // has it hit players ship if(Collision(AlienBomb[i],BOMB_WIDTH,BOMB_HEIGHT,Player.Ord,TANKGFX_WIDTH,TANKGFX_HEIGHT)) { PlayerHit(); AlienBomb[i].Status=DESTROYED; } else BombAndBasesCollision(&AlienBomb[i]); } } } } } void BombAndBasesCollision(GameObjectStruct *Bomb) { // check and handle any bomb and base collision for(int i=0;i>1) , this gives us a position with 2bit resolution unsigned char X=Bomb->X-Base[i].Ord.X; X=X>>1; // Because the bomb is 2 pixels wide it's X pos could have been less than the bases XPos, if this is the case the above substaction // on an unsigned char (byte) will cause a large number to occur (255), we check for this and if this large number has // resulted we just set X to 0 for the start of the bases structure if(X>7) X=0; // We now look at wether the bomb is hitting a part of the structure below it. // the bomb may be past the top of the base (even on first collision detection) as it moves in Y amounts greater than 1 pixel to give a higher speed // so we start from top of the base and destroy any structure of the base that comes before or equal to the // bombs Y pos, if we go past the bomb Y without finding any bit of base then stop looking and bomb is allowed to progress further down signed char Bomb_Y=(Bomb->Y+BOMB_HEIGHT)-Base[i].Ord.Y; unsigned char Base_Y=0; while((Base_Y<=Bomb_Y)&(Base_YStatus==ACTIVE)) { unsigned char Idx=(Base_Y*BASE_WIDTH_IN_BYTES)+(X>>2); // this gets the index for the byte in question from the gfx array unsigned char TheByte=Base[i].Gfx[Idx]; // we now have the byte to inspect, but need to only look at the 2 bits where the bomb is colliding // now isolate the 2 bits in question, we have the correct byte and we only have need the bottom 2 bits of X now to denote which bits // we need to destroy in the byte itself unsigned char BitIdx=X & 3; // this preseves the bottom 2 bits and removes the rest // A value of X of 0 (zero) would mean we want to look at the first 2 bits of the byte // A value of X of 1 (zero) would mean we want to look at the second 2 bits of the byte // A value of X of 2 (zero) would mean we want to look at the third 2 bits of the byte // A value of X of 3 (zero) would mean we want to look at the fourth 2 bits of the byte // So we need an AND mask to isolate these bits depending on the value of X // Here it is and we initially set it to the first 2 bits unsigned char Mask=B11000000; // now we need to move those 2 ""11""'s to the right depending on the value of X as noted above // the next line may look odd but all we're doing is multiplying X by 2 initially, so the values above would become,0,2,4,6 rather than 0,1,2,3 // Then we move the bits in the mask by this new amount, check it above,a value of X of 2 would shift the bits 4 places, whichis correct! Mask=Mask>>(BitIdx<<1); //now we peform a logical and to remove all bits (pixels) from around these two bits TheByte=TheByte & Mask; // and if there are any set pixels (bits) then they must be destroyed, else the bomb is allowed to continue if(TheByte>0) { // There are some pixels to destroy //We need to remove the pixels(bits) where there were ""11""'s in the mask and leave those intact where there were 0's //easiest way, flip all 0's in the mask to ones and all 1's to 0's, the tilde ""~"" means invert (swap), reffered to as logical NOT Mask=~Mask; // we can then ""AND"" the byte with the Mask to remove the bits but leave the rest intact Base[i].Gfx[Idx]=Base[i].Gfx[Idx] & Mask; // now do some collateral damage to surrounding bricks, try left hand side first if(X>0){ // not at far left, if we were there would be nothing to destroy to this left if(random(CHANCE_OF_BOMB_DAMAGE_TO_LEFT_OR_RIGHT)) // if true blow some bricks to the left hand side { if(X!=4) // we not at start of second byte { Mask=(Mask<<1)|1; Base[i].Gfx[Idx]=Base[i].Gfx[Idx] & Mask; } else // we are at very start of second byte, so wipe out adjacent pixel first byte { Base[i].Gfx[Idx-1]=Base[i].Gfx[Idx-1] & B11111110; } } } // now do some collateral damage right hand side first if(X<7){ // not at far right, if we were there would be nothing to destroy to this right if(random(CHANCE_OF_BOMB_DAMAGE_TO_LEFT_OR_RIGHT)) // if true blow some bricks to the left hand side { if(X!=3) // not at last pixel of left of first byte { Mask=(Mask>>1)|128; Base[i].Gfx[Idx]=Base[i].Gfx[Idx] & Mask; } else // we are at last pixel of first byte so destroy pixil in adjacent byte { Base[i].Gfx[Idx+1]=Base[i].Gfx[Idx+1] & B01111111; } } } if(random(CHANCE_OF_BOMB_PENETRATING_DOWN)==false) // if false BOMB EXPLODES else carries on destroying more Bomb->Status=EXPLODING; } else Base_Y++; } } } } void MissileAndBasesCollisions() { // check and handle any player missile and base collision for(int i=0;i>1) , this gives us a position with 2bit resolution unsigned char X=Missile.X-Base[i].Ord.X; X=X>>1; // Because the bomb is 2 pixels wide it's X pos could have been less than the bases XPos, if this is the case the above substaction // on an unsigned char (byte) will cause a large number to occur (255), we check for this and if this large number has // resulted we just set X to 0 for the start of the bases structure if(X>7) X=0; // We now look at wether the bomb is hitting a part of the structure above it. // the bomb may be past the top of the base (even on first collision detection) as it moves in Y amounts greater than 1 pixel to give a higher speed // so we start from top of the base and destroy any structure of the base that comes before or equal to the // bombs Y pos, if we go past the bomb Y without finding any bit of base then stop looking and bomb is allowed to progress further down signed char Missile_Y=Missile.Y-Base[i].Ord.Y; signed char Base_Y=BASE_HEIGHT-1; while((Base_Y>=Missile_Y)&(Base_Y>=0)&(Missile.Status==ACTIVE)) { // if(Base_Y<0) {Serial.println(""oop""); delay(999999);} unsigned char Idx=(Base_Y*BASE_WIDTH_IN_BYTES)+(X>>2); // this gets the index for the byte in question from the gfx array unsigned char TheByte=Base[i].Gfx[Idx]; // we now have the byte to inspect, but need to only look at the 2 bits where the bomb is colliding // now isolate the 2 bits in question, we have the correct byte and we only have need the bottom 2 bits of X now to denote which bits // we need to destroy in the byte itself unsigned char BitIdx=X & 3; // this preseves the bottom 2 bits and removes the rest // A value of X of 0 (zero) would mean we want to look at the first 2 bits of the byte // A value of X of 1 (zero) would mean we want to look at the second 2 bits of the byte // A value of X of 2 (zero) would mean we want to look at the third 2 bits of the byte // A value of X of 3 (zero) would mean we want to look at the fourth 2 bits of the byte // So we need an AND mask to isolate these bits depending on the value of X // Here it is and we initially set it to the first 2 bits unsigned char Mask=B11000000; // now we need to move those 2 ""11""'s to the right depending on the value of X as noted above // the next line may look odd but all we're doing is multiplying X by 2 initially, so the values above would become,0,2,4,6 rather than 0,1,2,3 // Then we move the bits in the mask by this new amount, check it above,a value of X of 2 would shift the bits 4 places, whichis correct! Mask=Mask>>(BitIdx<<1); //now we peform a logical AND to remove all bits (pixels) from around these two bits TheByte=TheByte & Mask; // and if there are any set pixels (bits) then they must be destroyed, else the bomb is allowed to continue if(TheByte>0) { // There are some pixels to destroy //We need to remove the pixels(bits) where there were ""11""'s in the mask and leave those intact where there were 0's //easiest way, flip all 0's in the mask to ones and all 1's to 0's, the tilde ""~"" means invert (swap), reffered to as logical NOT Mask=~Mask; // we can then ""AND"" the byte with the Mask to remove the bits but leave the rest intact Base[i].Gfx[Idx]=Base[i].Gfx[Idx] & Mask; // now do some collateral damage to surrounding bricks, try left hand side first if(X>0){ // not at far left, if we were there would be nothing to destroy to this left if(random(CHANCE_OF_BOMB_DAMAGE_TO_LEFT_OR_RIGHT)) // if true blow some bricks to the left hand side { if(X!=4) // we not at start of second byte { Mask=(Mask<<1)|1; Base[i].Gfx[Idx]=Base[i].Gfx[Idx] & Mask; } else // we are at very start of second byte, so wipe out adjacent pixel first byte { Base[i].Gfx[Idx-1]=Base[i].Gfx[Idx-1] & B11111110; } } } // now do some collateral damage right hand side first if(X<7){ // not at far right, if we were there would be nothing to destroy to this right if(random(CHANCE_OF_BOMB_DAMAGE_TO_LEFT_OR_RIGHT)) // if true blow some bricks to the left hand side { if(X!=3) // not at last pixel of left of first byte { Mask=(Mask>>1)|128; Base[i].Gfx[Idx]=Base[i].Gfx[Idx] & Mask; } else // we are at last pixel of first byte so destroy pixil in adjacent byte { Base[i].Gfx[Idx+1]=Base[i].Gfx[Idx+1] & B01111111; } } } if(random(CHANCE_OF_BOMB_PENETRATING_DOWN)==false) // if false BOMB EXPLODES else carries on destroying more Missile.Status=EXPLODING; } else Base_Y--; } } } } void PlayerHit() { Player.Ord.Status=EXPLODING; Player.ExplosionGfxCounter=PLAYER_EXPLOSION_TIME; Missile.Status=DESTROYED; } void CheckCollisions() { MissileAndAlienCollisions(); MotherShipCollisions(); MissileAndBasesCollisions(); BombCollisions(); AlienAndBaseCollisions(); } char GetAlienBaseCollisionMask(int AlienX, int AlienWidth,int BaseX) { signed int DamageWidth; unsigned char LeftMask,RightMask,FullMask; // this routine uses a 1 to mean remove bit and 0 to preserve, this is kind of opposite of what we would // normally think of, but it's done this way as when we perform bit shifting to show which bits are preserved // it will shift in 0's in (as that's just was the C shift operater "">>"" and ""<<"" does // at the end we will flip all the bits 0 becomes 1, 1 becomes 0 etc. so that the mask then works correctly // with the calling code LeftMask=B11111111; // initially set to remove all RightMask=B11111111; // unless change in code below // if Alien X more than base x then some start bits are unaffected if(AlienX>BaseX) { // we shift the bits above to the right by the amount unaffected, thus putting 0's into the bits // not to delete DamageWidth=AlienX-BaseX; LeftMask>>=DamageWidth; } // now work out how much of remaining byte is affected // if right hand side of alien is less than BaseX right hand side then some preserved at the right hand end if(AlienX+AlienWidthY+ALIEN_HEIGHT)-Base->Ord.Y; if(Y>BASE_HEIGHT-1) Y=BASE_HEIGHT-1; for(;Y>=0;Y--){ Base->Gfx[(Y*2)+BaseByteOffset]=Base->Gfx[(Y*2)+BaseByteOffset] & Mask; } } void AlienAndBaseCollisions() { unsigned char Mask; // checks if aliens are in collision with the tank // start at bottom row as they are most likely to be in contact or not and if not then none further up are either for(int row=2;row>=0;row--) { for(int column=0;column100) // to ensure isn't half off right hand side of screen MotherShipBonusXPos=100; if(MotherShipBonusXPos<0) // to ensure isn't half off right hand side of screen MotherShipBonusXPos=0; MotherShipBonusCounter=DISPLAY_MOTHERSHIP_BONUS_TIME; } } } void MissileAndAlienCollisions() { for(int across=0;across0) AlienXMoveAmount=ALIEN_X_MOVE_AMOUNT*2; else AlienXMoveAmount=-(ALIEN_X_MOVE_AMOUNT*2); // for very last alien make to super fast! if(Player.AliensDestroyed==TOTAL_ALIENS-1) if(AlienXMoveAmount>0) AlienXMoveAmount=ALIEN_X_MOVE_AMOUNT*4; else AlienXMoveAmount=-(ALIEN_X_MOVE_AMOUNT*4); if(Player.AliensDestroyed==TOTAL_ALIENS) NextLevel(&Player); } } if(Alien[across][down].Ord.Status==ACTIVE) // double check still active afer above code { // check if this alien is in contact with TankGfx if(Collision(Player.Ord,TANKGFX_WIDTH,TANKGFX_HEIGHT,Alien[across][down].Ord,AlienWidth[down],ALIEN_HEIGHT)) PlayerHit(); else { // check if alien is below bottom of screen if(Alien[across][down].Ord.Y+8>SCREEN_HEIGHT) PlayerHit(); } } } } } } bool Collision(GameObjectStruct Obj1,unsigned char Width1,unsigned char Height1,GameObjectStruct Obj2,unsigned char Width2,unsigned char Height2) { return ((Obj1.X+Width1>Obj2.X)&(Obj1.XObj2.Y)&(Obj1.Y=0){ Down=0; while(DownLargest) Largest=RightPos; } Down++; } if(Largest>0) // we have found largest for this coloum return Largest; Across--; } return 0; // should never get this far } int LeftMostPos() { //returns x pos of left most alien int Across=0; int Down; int Smallest=SCREEN_WIDTH*2; while(Across0) { // mothership bonus display.setCursor(MotherShipBonusXPos,0); display.print(MotherShipBonus); MotherShipBonusCounter--; } else { // draw score and lives, anything else can go above them display.setCursor(0,0); display.print(Player.Score); display.setCursor(SCREEN_WIDTH-7,0); display.print(Player.Lives); } //BOMBS // draw bombs next as aliens have priority of overlapping them for(i=0;i0) { display.drawBitmap(Alien[across][down].Ord.X, Alien[across][down].Ord.Y, ExplosionGfx, 13, 8,WHITE); } else Alien[across][down].Ord.Status=DESTROYED; } } } } // player if(Player.Ord.Status==ACTIVE) display.drawBitmap(Player.Ord.X, Player.Ord.Y, TankGfx, TANKGFX_WIDTH, TANKGFX_HEIGHT,WHITE); else { if(Player.Ord.Status==EXPLODING) { for(i=0;i0) { DisplayPlayerAndLives(&Player); // clear alien missiles for(int i=0;iHiScore) { CentreText(""NEW HIGH SCORE!!!"",36); CentreText(""**CONGRATULATIONS**"",48); } display.display(); if(Player.Score>HiScore){ HiScore=Player.Score; EEPROM.put(0,HiScore); } delay(2500); } void DisplayPlayerAndLives(PlayerStruct *Player) { display.clearDisplay(); CentreText(""Player 1"",0); CentreText(""Score "",12); display.print(Player->Score); CentreText(""Lives "",24); display.print(Player->Lives); CentreText(""Level "",36); display.print(Player->Level); display.display(); delay(2000); Player->Ord.X=PLAYER_X_START; } void CentreText(const char *Text,unsigned char Y) { // centres text on screen display.setCursor(int((float)(SCREEN_WIDTH)/2-((strlen(Text)*6)/2)),Y); display.print(Text); } void InitPlayer() { Player.Ord.Y=PLAYER_Y_START; Player.Ord.X=PLAYER_X_START; Player.Ord.Status=ACTIVE; Player.Lives=LIVES; Player.Level=0; Missile.Status=DESTROYED; Player.Score=0; } void NextLevel(PlayerStruct *Player) { // reset any dropping bombs int YStart; for(int i=0;iLevel++; YStart=((Player->Level-1) % LEVEL_TO_RESET_TO_START_HEIGHT)*AMOUNT_TO_DROP_BY_PER_LEVEL; InitAliens(YStart); AlienXMoveAmount=ALIEN_X_MOVE_AMOUNT; Player->AlienSpeed=INVADERS_SPEED; Player->AliensDestroyed=0; MotherShip.Ord.X=-MOTHERSHIP_WIDTH; MotherShip.Ord.Status=DESTROYED; Missile.Status=DESTROYED; randomSeed(100); InitBases(); DisplayPlayerAndLives(Player); } void InitBases() { // Bases need to be re-built! uint8_t TheByte; int Spacing=(SCREEN_WIDTH-(NUM_BASES*BASE_WIDTH))/NUM_BASES; for(int i=0;i TYPE any. rs_option = ws_option. CALL FUNCTION 'DDIF_FIELDINFO_GET' EXPORTING tabname = 'ZEXCEL_S_CONVERTER_OPTION' TABLES dfies_tab = lt_fields EXCEPTIONS not_found = 1 internal_error = 2 OTHERS = 3. IF sy-subrc <> 0. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ENDIF. LOOP AT lt_fields INTO ls_fields. ASSIGN COMPONENT ls_fields-fieldname OF STRUCTURE ws_option TO . IF sy-subrc = 0. CLEAR ls_sval. ls_sval-tabname = ls_fields-tabname. ls_sval-fieldname = ls_fields-fieldname. ls_sval-value = . ls_sval-field_attr = space. ls_sval-field_obl = space. ls_sval-comp_code = space. ls_sval-fieldtext = ls_fields-scrtext_m. ls_sval-comp_tab = space. ls_sval-comp_field = space. ls_sval-novaluehlp = space. INSERT ls_sval INTO TABLE lt_sval. ENDIF. ENDLOOP. CALL FUNCTION 'POPUP_GET_VALUES' EXPORTING popup_title = 'Excel creation options'(008) IMPORTING returncode = l_returncode TABLES fields = lt_sval EXCEPTIONS error_in_fields = 1 OTHERS = 2. IF sy-subrc <> 0. MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. ELSEIF l_returncode = 'A'. RAISE EXCEPTION TYPE zcx_excel. ELSE. LOOP AT lt_sval INTO ls_sval. ASSIGN COMPONENT ls_sval-fieldname OF STRUCTURE ws_option TO . IF sy-subrc = 0. = ls_sval-value. ENDIF. ENDLOOP. set_option( is_option = ws_option ) . rs_option = ws_option. ENDIF. ENDMETHOD. method BIND_CELLS. * Do we need subtotals with grouping READ TABLE wt_fieldcatalog TRANSPORTING NO FIELDS WITH KEY is_subtotalled = abap_true. IF sy-subrc = 0 . r_freeze_col = loop_subtotal( i_row_int = w_row_int i_col_int = w_col_int ) . ELSE. r_freeze_col = loop_normal( i_row_int = w_row_int i_col_int = w_col_int ) . ENDIF. endmethod. METHOD bind_table. DATA: lt_field_catalog TYPE zexcel_t_fieldcatalog, ls_field_catalog TYPE zexcel_s_fieldcatalog, ls_fcat TYPE zexcel_s_converter_fcat, lo_column TYPE REF TO zcl_excel_column, lv_col_int TYPE zexcel_cell_column, lv_col_alpha TYPE zexcel_cell_column_alpha, ls_settings TYPE zexcel_s_table_settings, lv_line TYPE i. FIELD-SYMBOLS: TYPE ANY TABLE. ASSIGN wo_data->* TO . ls_settings-table_style = i_style_table. ls_settings-top_left_column = zcl_excel_common=>convert_column2alpha( ip_column = w_col_int ). ls_settings-top_left_row = w_row_int. ls_settings-show_row_stripes = ws_layout-is_stripped. DESCRIBE TABLE wt_fieldcatalog LINES lv_line. lv_line = lv_line + 1 + w_col_int. ls_settings-bottom_right_column = zcl_excel_common=>convert_column2alpha( ip_column = lv_line ). DESCRIBE TABLE LINES lv_line. ls_settings-bottom_right_row = lv_line + 1 + w_row_int. SORT wt_fieldcatalog BY position. LOOP AT wt_fieldcatalog INTO ls_fcat. MOVE-CORRESPONDING ls_fcat TO ls_field_catalog. ls_field_catalog-dynpfld = abap_true. INSERT ls_field_catalog INTO TABLE lt_field_catalog. ENDLOOP. wo_worksheet->bind_table( EXPORTING ip_table = it_field_catalog = lt_field_catalog is_table_settings = ls_settings IMPORTING es_table_settings = ls_settings ). LOOP AT wt_fieldcatalog INTO ls_fcat. lv_col_int = w_col_int + ls_fcat-position - 1. lv_col_alpha = zcl_excel_common=>convert_column2alpha( lv_col_int ). * Freeze panes IF ls_fcat-fix_column = abap_true. ADD 1 TO r_freeze_col. ENDIF. * Now let's check for optimized IF ls_fcat-is_optimized = abap_true. lo_column = wo_worksheet->get_column( ip_column = lv_col_alpha ). lo_column->set_auto_size( ip_auto_size = abap_true ) . ENDIF. * Now let's check for visible IF ls_fcat-is_hidden = abap_true. lo_column = wo_worksheet->get_column( ip_column = lv_col_alpha ). lo_column->set_visible( ip_visible = abap_false ) . ENDIF. ENDLOOP. ENDMETHOD. method CLASS_CONSTRUCTOR. DATA: ls_objects TYPE ts_alv_types. DATA: ls_option TYPE zexcel_s_converter_option, l_uname TYPE sy-uname. GET PARAMETER ID 'ZUS' FIELD l_uname. IF l_uname IS INITIAL OR l_uname = space. l_uname = sy-uname. ENDIF. * Object CL_GUI_ALV_GRID ls_objects-seoclass = 'CL_GUI_ALV_GRID'. ls_objects-clsname = 'ZCL_EXCEL_CONVERTER_ALV_GRID'. INSERT ls_objects INTO TABLE wt_objects. * Object CL_SALV_TABLE ls_objects-seoclass = 'CL_SALV_TABLE'. ls_objects-clsname = 'ZCL_EXCEL_CONVERTER_SALV_TABLE'. INSERT ls_objects INTO TABLE wt_objects. * Object CL_SALV_RESULT ls_objects-seoclass = 'CL_SALV_EX_RESULT_DATA_TABLE '. ls_objects-clsname = 'ZCL_EXCEL_CONVERTER_RESULT_EX'. INSERT ls_objects INTO TABLE wt_objects. * Object CL_SALV_WD_RESULT ls_objects-seoclass = 'CL_SALV_WD_RESULT_DATA_TABLE '. ls_objects-clsname = 'ZCL_EXCEL_CONVERTER_RESULT_WD'. INSERT ls_objects INTO TABLE wt_objects. CONCATENATE 'EXCEL_' sy-uname INTO ws_indx-srtfd. IMPORT p1 = ls_option FROM DATABASE indx(xl) TO ws_indx ID ws_indx-srtfd. IF sy-subrc = 0. ws_option = ls_option. ELSE. init_option( ) . ENDIF. endmethod. method CLEAN_FIELDCATALOG. DATA: l_position TYPE tabfdpos. FIELD-SYMBOLS: TYPE zexcel_s_converter_fcat. SORT wt_fieldcatalog BY position col_id. CLEAR l_position. LOOP AT wt_fieldcatalog ASSIGNING . ADD 1 TO l_position. -position = l_position. * Default stype with alignment and format -style_hdr = get_style( i_type = c_type_hdr i_alignment = -alignment ). IF ws_layout-is_stripped = abap_true. -style_stripped = get_style( i_type = c_type_str i_alignment = -alignment i_inttype = -inttype i_decimals = -decimals ). ENDIF. -style_normal = get_style( i_type = c_type_nor i_alignment = -alignment i_inttype = -inttype i_decimals = -decimals ). -style_subtotal = get_style( i_type = c_type_sub i_alignment = -alignment i_inttype = -inttype i_decimals = -decimals ). -style_total = get_style( i_type = c_type_tot i_alignment = -alignment i_inttype = -inttype i_decimals = -decimals ). ENDLOOP. endmethod. method CONVERT. IF is_option IS SUPPLIED. ws_option = is_option. ENDIF. execute_converter( EXPORTING io_object = io_alv it_table = it_table ) . IF io_worksheet IS SUPPLIED AND io_worksheet IS BOUND. wo_worksheet = io_worksheet. ENDIF. IF co_excel IS SUPPLIED. IF co_excel IS NOT BOUND. CREATE OBJECT co_excel. co_excel->zif_excel_book_properties~creator = sy-uname. ENDIF. wo_excel = co_excel. ENDIF. * Move table to data object and clean it up IF wt_fieldcatalog IS NOT INITIAL. create_table( ). ELSE. wo_data = wo_table . ENDIF. IF wo_excel IS NOT BOUND. CREATE OBJECT wo_excel. wo_excel->zif_excel_book_properties~creator = sy-uname. ENDIF. IF wo_worksheet IS NOT BOUND. "" Get active sheet wo_worksheet = wo_excel->get_active_worksheet( ). wo_worksheet->set_title( ip_title = 'Sheet1'(001) ). ENDIF. IF i_row_int <= 0. w_row_int = 1. ELSE. w_row_int = i_row_int. ENDIF. IF i_column_int <= 0. w_col_int = 1. ELSE. w_col_int = i_column_int. ENDIF. create_worksheet( i_table = i_table i_style_table = i_style_table ) . endmethod. method CREATE_COLOR_STYLE. DATA: ls_styles TYPE ts_styles. DATA: lo_style TYPE REF TO zcl_excel_style. READ TABLE wt_styles INTO ls_styles WITH KEY guid = i_style. IF sy-subrc = 0. lo_style = wo_excel->add_new_style( ). * lo_style->borders = ls_styles-style->borders. * lo_style->protection = ls_styles-style->protection. lo_style->font->bold = ls_styles-style->font->bold. lo_style->alignment->horizontal = ls_styles-style->alignment->horizontal. lo_style->number_format->format_code = ls_styles-style->number_format->format_code. lo_style->font->color-rgb = is_colors-fontcolor. lo_style->fill->filltype = zcl_excel_style_fill=>c_fill_solid. lo_style->fill->fgcolor-rgb = is_colors-fillcolor. ro_style = lo_style. ENDIF. endmethod. method CREATE_FORMULAR_SUBTOTAL. data: l_row_alpha_start type string, l_row_alpha_end type string, l_func_num type string. l_row_alpha_start = i_row_int_start. l_row_alpha_end = i_row_int_end. l_func_num = get_function_number( i_totals_function = i_totals_function ). concatenate 'SUBTOTAL(' l_func_num ',' i_column l_row_alpha_start ':' i_column l_row_alpha_end ')' into r_formula. endmethod. method CREATE_FORMULAR_TOTAL. data: l_row_alpha type string, l_row_e_alpha type string. l_row_alpha = w_row_int + 1. l_row_e_alpha = i_row_int. concatenate i_totals_function '(' i_column l_row_alpha ':' i_column l_row_e_alpha ')' into r_formula. endmethod. method CREATE_PATH. DATA: l_sep TYPE c , l_path TYPE string, l_return TYPE i . CLEAR r_path. "" Save the file cl_gui_frontend_services=>get_sapgui_workdir( CHANGING sapworkdir = l_path EXCEPTIONS get_sapworkdir_failed = 1 cntl_error = 2 error_no_gui = 3 not_supported_by_gui = 4 ). IF sy-subrc <> 0. * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4. CONCATENATE 'Excel_' w_fcount '.xlsx' INTO r_path. ELSE. DO. ADD 1 TO w_fcount. *-obtain file separator character--------------------------------------- CALL METHOD cl_gui_frontend_services=>get_file_separator CHANGING file_separator = l_sep EXCEPTIONS cntl_error = 1 error_no_gui = 2 not_supported_by_gui = 3 OTHERS = 4. IF sy-subrc <> 0. l_sep = ''. ENDIF. CONCATENATE l_path l_sep 'Excel_' w_fcount '.xlsx' INTO r_path. IF cl_gui_frontend_services=>file_exist( file = r_path ) = abap_true. cl_gui_frontend_services=>file_delete( EXPORTING filename = r_path CHANGING rc = l_return EXCEPTIONS OTHERS = 1 ). IF sy-subrc = 0 . RETURN. ENDIF. ELSE. RETURN. ENDIF. ENDDO. ENDIF. endmethod. method CREATE_STYLE_HDR. data: lo_style type ref to zcl_excel_style. lo_style = wo_excel->add_new_style( ). lo_style->font->bold = abap_true. lo_style->font->color-rgb = zcl_excel_style_color=>c_white. lo_style->fill->filltype = zcl_excel_style_fill=>c_fill_solid. lo_style->fill->fgcolor-rgb = 'FF4F81BD'. if i_alignment is supplied and i_alignment is not initial. lo_style->alignment->horizontal = i_alignment. endif. ro_style = lo_style . endmethod. method CREATE_STYLE_NORMAL. DATA: lo_style TYPE REF TO zcl_excel_style, l_format TYPE zexcel_number_format. IF i_inttype IS SUPPLIED AND i_inttype IS NOT INITIAL. l_format = set_cell_format( i_inttype = i_inttype i_decimals = i_decimals ) . ENDIF. IF l_format IS NOT INITIAL OR ( i_alignment IS SUPPLIED AND i_alignment IS NOT INITIAL ) . lo_style = wo_excel->add_new_style( ). IF i_alignment IS SUPPLIED AND i_alignment IS NOT INITIAL. lo_style->alignment->horizontal = i_alignment. ENDIF. IF l_format IS NOT INITIAL. lo_style->number_format->format_code = l_format. ENDIF. ro_style = lo_style . ENDIF. endmethod. method CREATE_STYLE_STRIPPED. data: lo_style type ref to zcl_excel_style. data: l_format type zexcel_number_format. lo_style = wo_excel->add_new_style( ). lo_style->fill->filltype = zcl_excel_style_fill=>c_fill_solid. lo_style->fill->fgcolor-rgb = 'FFDBE5F1'. if i_alignment is supplied and i_alignment is not initial. lo_style->alignment->horizontal = i_alignment. endif. if i_inttype is supplied and i_inttype is not initial. l_format = set_cell_format( i_inttype = i_inttype i_decimals = i_decimals ) . if l_format is not initial. lo_style->number_format->format_code = l_format. endif. endif. ro_style = lo_style. endmethod. method CREATE_STYLE_SUBTOTAL. data: lo_style type ref to zcl_excel_style. data: l_format type zexcel_number_format. lo_style = wo_excel->add_new_style( ). lo_style->font->bold = abap_true. if i_alignment is supplied and i_alignment is not initial. lo_style->alignment->horizontal = i_alignment. endif. if i_inttype is supplied and i_inttype is not initial. l_format = set_cell_format( i_inttype = i_inttype i_decimals = i_decimals ) . if l_format is not initial. lo_style->number_format->format_code = l_format. endif. endif. ro_style = lo_style . endmethod. method CREATE_STYLE_TOTAL. DATA: lo_style TYPE REF TO zcl_excel_style. DATA: l_format TYPE zexcel_number_format. lo_style = wo_excel->add_new_style( ). lo_style->font->bold = abap_true. CREATE OBJECT lo_style->borders->top. lo_style->borders->top->border_style = zcl_excel_style_border=>c_border_thin. lo_style->borders->top->border_color-rgb = zcl_excel_style_color=>c_black. CREATE OBJECT lo_style->borders->right. lo_style->borders->right->border_style = zcl_excel_style_border=>c_border_none. lo_style->borders->right->border_color-rgb = zcl_excel_style_color=>c_black. CREATE OBJECT lo_style->borders->down. lo_style->borders->down->border_style = zcl_excel_style_border=>c_border_double. lo_style->borders->down->border_color-rgb = zcl_excel_style_color=>c_black. CREATE OBJECT lo_style->borders->left. lo_style->borders->left->border_style = zcl_excel_style_border=>c_border_none. lo_style->borders->left->border_color-rgb = zcl_excel_style_color=>c_black. IF i_alignment IS SUPPLIED AND i_alignment IS NOT INITIAL. lo_style->alignment->horizontal = i_alignment. ENDIF. IF i_inttype IS SUPPLIED AND i_inttype IS NOT INITIAL. l_format = set_cell_format( i_inttype = i_inttype i_decimals = i_decimals ) . IF l_format IS NOT INITIAL. lo_style->number_format->format_code = l_format. ENDIF. ENDIF. ro_style = lo_style . endmethod. method CREATE_TABLE. TYPES: BEGIN OF ts_output, fieldname TYPE fieldname, function TYPE funcname, END OF ts_output. DATA: lo_data TYPE REF TO data. DATA: lo_addit TYPE REF TO cl_abap_elemdescr, lt_components_tab TYPE cl_abap_structdescr=>component_table, ls_components TYPE abap_componentdescr, lo_table TYPE REF TO cl_abap_tabledescr, lo_struc TYPE REF TO cl_abap_structdescr. FIELD-SYMBOLS: TYPE zexcel_s_converter_fcat, TYPE ANY, TYPE STANDARD TABLE, TYPE ANY, TYPE STANDARD TABLE. SORT wt_fieldcatalog BY position. ASSIGN wo_table->* TO . READ TABLE ASSIGNING INDEX 1. IF sy-subrc EQ 0 . LOOP AT wt_fieldcatalog ASSIGNING . ASSIGN COMPONENT -columnname OF STRUCTURE TO . IF sy-subrc = 0. ls_components-name = -columnname. TRY. lo_addit ?= cl_abap_typedescr=>describe_by_data( ). CATCH cx_sy_move_cast_error. CLEAR lo_addit. DELETE TABLE wt_fieldcatalog FROM . ENDTRY. IF lo_addit IS BOUND. ls_components-type = lo_addit . INSERT ls_components INTO TABLE lt_components_tab. ENDIF. ENDIF. ENDLOOP. IF lt_components_tab IS NOT INITIAL. ""create new line type TRY. lo_struc = cl_abap_structdescr=>create( P_COMPONENTS = lt_components_tab P_STRICT = abap_false ). CATCH cx_sy_struct_creation. RETURN. "" We can not do anything in this case. ENDTRY. lo_table = cl_abap_tabledescr=>create( lo_struc ). CREATE DATA wo_data TYPE HANDLE lo_table. CREATE DATA lo_data TYPE HANDLE lo_struc. ASSIGN wo_data->* TO . ASSIGN lo_data->* TO . LOOP AT ASSIGNING . CLEAR . MOVE-CORRESPONDING TO . APPEND TO . ENDLOOP. ENDIF. ENDIF. endmethod. METHOD create_text_subtotal. DATA: l_string(256) TYPE c, l_func TYPE string. CASE i_totals_function. WHEN zcl_excel_table=>totals_function_sum. "" Total l_func = 'Total'(003). WHEN zcl_excel_table=>totals_function_min. "" Minimum l_func = 'Minimum'(004). WHEN zcl_excel_table=>totals_function_max. "" Maximum l_func = 'Maximum'(005). WHEN zcl_excel_table=>totals_function_average. "" Mean Value l_func = 'Average'(006). WHEN zcl_excel_table=>totals_function_count. "" Count l_func = 'Count'(007). WHEN OTHERS. CLEAR l_func. ENDCASE. MOVE i_value TO l_string. CONCATENATE l_string l_func INTO r_text SEPARATED BY space. ENDMETHOD. method CREATE_WORKSHEET. DATA: l_freeze_col TYPE i. IF wo_data IS BOUND AND wo_worksheet IS BOUND. wo_worksheet->zif_excel_sheet_properties~summarybelow = zif_excel_sheet_properties=>c_below_on. "" By default is on IF wt_fieldcatalog IS INITIAL. set_fieldcatalog( ) . ELSE. clean_fieldcatalog( ) . ENDIF. IF i_table = abap_true. l_freeze_col = bind_table( i_style_table = i_style_table ) . ELSEIF wt_filter IS NOT INITIAL. * Let's check for filter. wo_autofilter = wo_excel->add_new_autofilter( io_sheet = wo_worksheet ). l_freeze_col = bind_cells( ) . set_autofilter_area( ) . ELSE. l_freeze_col = bind_cells( ) . ENDIF. * Check for freeze panes IF ws_layout-is_fixed = abap_true. IF l_freeze_col = 0. l_freeze_col = w_col_int. ENDIF. wo_worksheet->freeze_panes( EXPORTING ip_num_columns = l_freeze_col ip_num_rows = w_row_int ) . ENDIF. ENDIF. endmethod. method EXECUTE_CONVERTER. DATA: lo_if TYPE REF TO zif_excel_converter, ls_types TYPE ts_alv_types, lo_addit TYPE REF TO cl_abap_classdescr, lo_addit_superclass type ref to cl_abap_classdescr. IF io_object IS BOUND. TRY. lo_addit ?= cl_abap_typedescr=>describe_by_object_ref( io_object ). CATCH cx_sy_move_cast_error. RAISE EXCEPTION TYPE zcx_excel. ENDTRY. ls_types-seoclass = lo_addit->get_relative_name( ). READ TABLE wt_objects INTO ls_types WITH TABLE KEY seoclass = ls_types-seoclass. if sy-subrc ne 0. do. free lo_addit_superclass. lo_addit_superclass = lo_addit->get_super_class_type( ). if lo_addit_superclass is initial. sy-subrc = '4'. exit. endif. lo_addit = lo_addit_superclass. ls_types-seoclass = lo_addit->get_relative_name( ). read table wt_objects into ls_types with table key seoclass = ls_types-seoclass. if sy-subrc eq 0. exit. endif. enddo. endif. if sy-subrc = 0. CREATE OBJECT lo_if type (ls_types-clsname). lo_if->create_fieldcatalog( exporting is_option = ws_option io_object = io_object it_table = it_table importing es_layout = ws_layout et_fieldcatalog = wt_fieldcatalog eo_table = wo_table et_colors = wt_colors et_filter = wt_filter ). * data lines of highest level. if ws_layout-max_subtotal_level > 0. add 1 to ws_layout-max_subtotal_level. endif. else. RAISE EXCEPTION type zcx_excel. endif. else. refresh wt_fieldcatalog. get reference of it_table into wo_table. endif. endmethod. method GET_COLOR_STYLE. DATA: ls_colors TYPE zexcel_s_converter_col, ls_color_styles TYPE ts_color_styles, lo_style TYPE REF TO zcl_excel_style. r_style = i_style. "" Default we change nothing IF wt_colors IS NOT INITIAL. * Full line has color READ TABLE wt_colors INTO ls_colors WITH KEY rownumber = i_row columnname = space. IF sy-subrc = 0. READ TABLE wt_color_styles INTO ls_color_styles WITH KEY guid_old = i_style fontcolor = ls_colors-fontcolor fillcolor = ls_colors-fillcolor. IF sy-subrc = 0. r_style = ls_color_styles-style_new->get_guid( ). ELSE. lo_style = create_color_style( i_style = i_style is_colors = ls_colors ) . r_style = lo_style->get_guid( ) . ls_color_styles-guid_old = i_style. ls_color_styles-fontcolor = ls_colors-fontcolor. ls_color_styles-fillcolor = ls_colors-fillcolor. ls_color_styles-style_new = lo_style. INSERT ls_color_styles INTO TABLE wt_color_styles. ENDIF. ELSE. * Only field has color READ TABLE wt_colors INTO ls_colors WITH KEY rownumber = i_row columnname = i_fieldname. IF sy-subrc = 0. READ TABLE wt_color_styles INTO ls_color_styles WITH KEY guid_old = i_style fontcolor = ls_colors-fontcolor fillcolor = ls_colors-fillcolor. IF sy-subrc = 0. r_style = ls_color_styles-style_new->get_guid( ). ELSE. lo_style = create_color_style( i_style = i_style is_colors = ls_colors ) . ls_color_styles-guid_old = i_style. ls_color_styles-fontcolor = ls_colors-fontcolor. ls_color_styles-fillcolor = ls_colors-fillcolor. ls_color_styles-style_new = lo_style. INSERT ls_color_styles INTO TABLE wt_color_styles. r_style = ls_color_styles-style_new->get_guid( ). ENDIF. ELSE. r_style = i_style. ENDIF. ENDIF. ELSE. r_style = i_style. ENDIF. endmethod. method GET_FILE. data: lo_excel_writer type ref to zif_excel_writer. data: ls_seoclass type seoclass. if wo_excel is bound. create object lo_excel_writer type zcl_excel_writer_2007. e_file = lo_excel_writer->write_file( wo_excel ). select single * into ls_seoclass from seoclass where clsname = 'CL_BCS_CONVERT'. if sy-subrc = 0. call method (ls_seoclass-clsname)=>xstring_to_solix exporting iv_xstring = e_file receiving et_solix = et_file. e_bytecount = xstrlen( e_file ). else. "" Convert to binary call function 'SCMS_XSTRING_TO_BINARY' exporting buffer = e_file importing output_length = e_bytecount tables binary_tab = et_file. endif. endif. endmethod. method GET_FUNCTION_NUMBER. *Number Function *1 AVERAGE *2 COUNT *3 COUNTA *4 MAX *5 MIN *6 PRODUCT *7 STDEV *8 STDEVP *9 SUM *10 VAR *11 VARP case i_totals_function. when ZCL_EXCEL_TABLE=>TOTALS_FUNCTION_SUM. "" Total r_function_number = 9. when ZCL_EXCEL_TABLE=>TOTALS_FUNCTION_MIN. "" Minimum r_function_number = 5. when ZCL_EXCEL_TABLE=>TOTALS_FUNCTION_MAX. "" Maximum r_function_number = 4. when ZCL_EXCEL_TABLE=>TOTALS_FUNCTION_AVERAGE. "" Mean Value r_function_number = 1. when ZCL_EXCEL_TABLE=>TOTALS_FUNCTION_count. "" Count r_function_number = 2. when others. clear r_function_number. endcase. endmethod. method GET_OPTION. rs_option = ws_option. endmethod. method GET_STYLE. DATA: ls_styles TYPE ts_styles, lo_style TYPE REF TO zcl_excel_style. CLEAR r_style. READ TABLE wt_styles INTO ls_styles WITH TABLE KEY type = i_type alignment = i_alignment inttype = i_inttype decimals = i_decimals. IF sy-subrc = 0. r_style = ls_styles-guid. ELSE. CASE i_type. WHEN c_type_hdr. "" Header lo_style = create_style_hdr( i_alignment = i_alignment ). WHEN c_type_str. ""Stripped lo_style = create_style_stripped( i_alignment = i_alignment i_inttype = i_inttype i_decimals = i_decimals ). WHEN c_type_nor. ""Normal lo_style = create_style_normal( i_alignment = i_alignment i_inttype = i_inttype i_decimals = i_decimals ). WHEN c_type_sub. ""Subtotals lo_style = create_style_subtotal( i_alignment = i_alignment i_inttype = i_inttype i_decimals = i_decimals ). WHEN c_type_tot. ""Totals lo_style = create_style_total( i_alignment = i_alignment i_inttype = i_inttype i_decimals = i_decimals ). ENDCASE. IF lo_style IS NOT INITIAL. r_style = lo_style->get_guid( ). ls_styles-type = i_type. ls_styles-alignment = i_alignment. ls_styles-inttype = i_inttype. ls_styles-decimals = i_decimals. ls_styles-guid = r_style. ls_styles-style = lo_style. INSERT ls_styles INTO TABLE wt_styles. ENDIF. ENDIF. endmethod. method INIT_OPTION. ws_option-filter = abap_true. ws_option-hidenc = abap_true. ws_option-subtot = abap_true. endmethod. method LOOP_NORMAL. DATA: l_row_int_end TYPE zexcel_cell_row, l_row_int TYPE zexcel_cell_row, l_col_int TYPE zexcel_cell_column, l_col_alpha TYPE zexcel_cell_column_alpha, l_cell_value TYPE zexcel_cell_value, l_s_color TYPE abap_bool, lo_column TYPE REF TO zcl_excel_column, l_formula TYPE zexcel_cell_formula, l_style TYPE zexcel_cell_style, l_cells TYPE i, l_count TYPE i, l_table_row TYPE i. FIELD-SYMBOLS: TYPE ANY, TYPE STANDARD TABLE, TYPE zexcel_s_converter_fcat, TYPE ANY. ASSIGN wo_data->* TO . DESCRIBE TABLE wt_fieldcatalog LINES l_cells. DESCRIBE TABLE LINES l_count. l_cells = l_cells * l_count. * It is better to loop column by column LOOP AT wt_fieldcatalog ASSIGNING . l_row_int = i_row_int. l_col_int = i_col_int + -position - 1. * Freeze panes IF -fix_column = abap_true. ADD 1 TO r_freeze_col. ENDIF. l_s_color = abap_true. l_col_alpha = zcl_excel_common=>convert_column2alpha( l_col_int ). * Only if the Header is required create it. IF ws_option-hidehd IS INITIAL. "" First of all write column header l_cell_value = -scrtext_m. wo_worksheet->set_cell( ip_column = l_col_alpha ip_row = l_row_int ip_value = l_cell_value ip_style = -style_hdr ). ADD 1 TO l_row_int. ENDIF. LOOP AT ASSIGNING . l_table_row = sy-tabix. * Now the cell values ASSIGN COMPONENT -columnname OF STRUCTURE TO . * Now let's write the cell values IF ws_layout-is_stripped = abap_true AND l_s_color = abap_true. l_style = get_color_style( i_row = l_table_row i_fieldname = -columnname i_style = -style_stripped ). wo_worksheet->set_cell( ip_column = l_col_alpha ip_row = l_row_int ip_value = ip_style = l_style ). CLEAR l_s_color. ELSE. l_style = get_color_style( i_row = l_table_row i_fieldname = -columnname i_style = -style_normal ). wo_worksheet->set_cell( ip_column = l_col_alpha ip_row = l_row_int ip_value = ip_style = l_style ). l_s_color = abap_true. ENDIF. READ TABLE wt_filter TRANSPORTING NO FIELDS WITH TABLE KEY rownumber = l_table_row columnname = -columnname. IF sy-subrc = 0. wo_worksheet->get_cell( EXPORTING ip_column = l_col_alpha ip_row = l_row_int IMPORTING ep_value = l_cell_value ). wo_autofilter->set_value( i_column = l_col_int i_value = l_cell_value ). ENDIF. ADD 1 TO l_row_int. ENDLOOP. * Now let's check for optimized IF -is_optimized = abap_true . lo_column = wo_worksheet->get_column( ip_column = l_col_alpha ). lo_column->set_auto_size( ip_auto_size = abap_true ) . ENDIF. * Now let's check for visible IF -is_hidden = abap_true. lo_column = wo_worksheet->get_column( ip_column = l_col_alpha ). lo_column->set_visible( ip_visible = abap_false ) . ENDIF. * Now let's check for total versus subtotal. IF -totals_function IS NOT INITIAL. l_row_int_end = l_row_int - 1. l_formula = create_formular_total( i_row_int = l_row_int_end i_column = l_col_alpha i_totals_function = -totals_function ). wo_worksheet->set_cell( ip_column = l_col_alpha ip_row = l_row_int ip_formula = l_formula ip_style = -style_total ). ENDIF. ENDLOOP. endmethod. method LOOP_SUBTOTAL. DATA: l_row_int_start TYPE zexcel_cell_row, l_row_int_end TYPE zexcel_cell_row, l_row_int TYPE zexcel_cell_row, l_col_int TYPE zexcel_cell_column, l_col_alpha TYPE zexcel_cell_column_alpha, l_col_alpha_start TYPE zexcel_cell_column_alpha, l_cell_value TYPE zexcel_cell_value, l_s_color TYPE abap_bool, lo_column TYPE REF TO zcl_excel_column, lo_row TYPE REF TO zcl_excel_row, l_formula TYPE zexcel_cell_formula, l_style TYPE zexcel_cell_style, l_text TYPE string, ls_sort_values TYPE ts_sort_values, ls_subtotal_rows TYPE ts_subtotal_rows, l_sort_level TYPE int4, l_hidden TYPE int4, l_line TYPE i, l_cells TYPE i, l_count TYPE i, l_table_row TYPE i, lt_fcat TYPE zexcel_t_converter_fcat. FIELD-SYMBOLS: TYPE ANY, TYPE STANDARD TABLE, TYPE zexcel_s_converter_fcat, TYPE ANY, TYPE ANY, TYPE ts_sort_values. ASSIGN wo_data->* TO . REFRESH: wt_sort_values, wt_subtotal_rows. DESCRIBE TABLE wt_fieldcatalog LINES l_cells. DESCRIBE TABLE LINES l_count. l_cells = l_cells * l_count. READ TABLE ASSIGNING INDEX 1. IF sy-subrc = 0. l_row_int = i_row_int + 1. lt_fcat = wt_fieldcatalog. SORT lt_fcat BY sort_level DESCENDING. LOOP AT lt_fcat ASSIGNING WHERE is_subtotalled = abap_true. ASSIGN COMPONENT -columnname OF STRUCTURE TO . ls_sort_values-fieldname = -columnname. ls_sort_values-row_int = l_row_int. ls_sort_values-sort_level = -sort_level. ls_sort_values-is_collapsed = -is_collapsed. CREATE DATA ls_sort_values-value LIKE . ASSIGN ls_sort_values-value->* TO . = . INSERT ls_sort_values INTO TABLE wt_sort_values. ENDLOOP. ENDIF. l_row_int = i_row_int. * Let's check if we need to hide a sort level. DESCRIBE TABLE wt_sort_values LINES l_line. IF l_line <= 1. CLEAR l_hidden. ELSE. LOOP AT wt_sort_values INTO ls_sort_values WHERE is_collapsed = abap_false. IF l_hidden < ls_sort_values-sort_level. l_hidden = ls_sort_values-sort_level. ENDIF. ENDLOOP. ENDIF. ADD 1 TO l_hidden. "" As this is the first level we show. * First loop without formular only addtional rows with subtotal text. LOOP AT ASSIGNING . ADD 1 TO l_row_int. "" 1 is for header row. l_row_int_start = l_row_int. SORT lt_fcat BY sort_level DESCENDING. LOOP AT lt_fcat ASSIGNING WHERE is_subtotalled = abap_true. l_col_int = i_col_int + -position - 1. l_col_alpha = zcl_excel_common=>convert_column2alpha( l_col_int ). * Now the cell values ASSIGN COMPONENT -columnname OF STRUCTURE TO . IF sy-subrc = 0. READ TABLE wt_sort_values ASSIGNING WITH TABLE KEY fieldname = -columnname. IF sy-subrc = 0. ASSIGN -value->* TO . IF <> OR -new = abap_true. * First let's remmember the subtotal values as it has to appear later. ls_subtotal_rows-row_int = l_row_int. ls_subtotal_rows-row_int_start = -row_int. ls_subtotal_rows-columnname = -columnname. INSERT ls_subtotal_rows INTO TABLE wt_subtotal_rows. * Now let's write the subtotal line l_cell_value = create_text_subtotal( i_value = i_totals_function = -totals_function ). wo_worksheet->set_cell( ip_column = l_col_alpha ip_row = l_row_int ip_value = l_cell_value ip_abap_type = cl_abap_typedescr=>typekind_string ip_style = -style_subtotal ). lo_row = wo_worksheet->get_row( ip_row = l_row_int ). lo_row->set_outline_level( ip_outline_level = -sort_level ) . IF -is_collapsed = abap_true. IF -sort_level > l_hidden. lo_row->set_visible( ip_visible = abap_false ) . ENDIF. lo_row->set_collapsed( ip_collapsed = -is_collapsed ) . ENDIF. * Now let's change the key ADD 1 TO l_row_int. = . -new = abap_false. l_line = -sort_level. LOOP AT wt_sort_values ASSIGNING WHERE sort_level >= l_line. -row_int = l_row_int. ENDLOOP. ENDIF. ENDIF. ENDIF. ENDLOOP. ENDLOOP. ADD 1 TO l_row_int. l_row_int_start = l_row_int. SORT lt_fcat BY sort_level DESCENDING. LOOP AT lt_fcat ASSIGNING WHERE is_subtotalled = abap_true. l_col_int = i_col_int + -position - 1. l_col_alpha = zcl_excel_common=>convert_column2alpha( l_col_int ). READ TABLE wt_sort_values ASSIGNING WITH TABLE KEY fieldname = -columnname. IF sy-subrc = 0. ASSIGN -value->* TO . ls_subtotal_rows-row_int = l_row_int. ls_subtotal_rows-row_int_start = -row_int. ls_subtotal_rows-columnname = -columnname. INSERT ls_subtotal_rows INTO TABLE wt_subtotal_rows. * First let's write the value as it has to appear. l_cell_value = create_text_subtotal( i_value = i_totals_function = -totals_function ). wo_worksheet->set_cell( ip_column = l_col_alpha ip_row = l_row_int ip_value = l_cell_value ip_abap_type = cl_abap_typedescr=>typekind_string ip_style = -style_subtotal ). l_sort_level = -sort_level. lo_row = wo_worksheet->get_row( ip_row = l_row_int ). lo_row->set_outline_level( ip_outline_level = l_sort_level ) . IF -is_collapsed = abap_true. IF -sort_level > l_hidden. lo_row->set_visible( ip_visible = abap_false ) . ENDIF. lo_row->set_collapsed( ip_collapsed = -is_collapsed ) . ENDIF. ADD 1 TO l_row_int. ENDIF. ENDLOOP. * Let's write the Grand total l_sort_level = 0. lo_row = wo_worksheet->get_row( ip_row = l_row_int ). lo_row->set_outline_level( ip_outline_level = l_sort_level ) . * lo_row_dim->set_collapsed( ip_collapsed = -is_collapsed ) . Not on grand total l_text = create_text_subtotal( i_value = 'Grand'(002) i_totals_function = -totals_function ). l_col_alpha_start = zcl_excel_common=>convert_column2alpha( i_col_int ). wo_worksheet->set_cell( ip_column = l_col_alpha_start ip_row = l_row_int ip_value = l_text ip_abap_type = cl_abap_typedescr=>typekind_string ip_style = -style_subtotal ). * It is better to loop column by column second time around * Second loop with formular and data. LOOP AT wt_fieldcatalog ASSIGNING . l_row_int = i_row_int. l_col_int = i_col_int + -position - 1. * Freeze panes IF -fix_column = abap_true. ADD 1 TO r_freeze_col. ENDIF. l_s_color = abap_true. l_col_alpha = zcl_excel_common=>convert_column2alpha( l_col_int ). "" First of all write column header l_cell_value = -scrtext_m. wo_worksheet->set_cell( ip_column = l_col_alpha ip_row = l_row_int ip_value = l_cell_value ip_abap_type = cl_abap_typedescr=>typekind_string ip_style = -style_hdr ). ADD 1 TO l_row_int. LOOP AT ASSIGNING . l_table_row = sy-tabix. * Now the cell values ASSIGN COMPONENT -columnname OF STRUCTURE TO . * Let's check for subtotal lines DO. READ TABLE wt_subtotal_rows TRANSPORTING NO FIELDS WITH TABLE KEY row_int = l_row_int. IF sy-subrc = 0. IF -is_subtotalled = abap_false AND -totals_function IS NOT INITIAL. DO. READ TABLE wt_subtotal_rows INTO ls_subtotal_rows WITH TABLE KEY row_int = l_row_int. IF sy-subrc = 0. l_row_int_start = ls_subtotal_rows-row_int_start. l_row_int_end = l_row_int - 1. l_formula = create_formular_subtotal( i_row_int_start = l_row_int_start i_row_int_end = l_row_int_end i_column = l_col_alpha i_totals_function = -totals_function ). wo_worksheet->set_cell( ip_column = l_col_alpha ip_row = l_row_int ip_formula = l_formula ip_style = -style_subtotal ). IF -is_collapsed = abap_true. lo_row = wo_worksheet->get_row( ip_row = l_row_int ). lo_row->set_collapsed( ip_collapsed = -is_collapsed ). IF -sort_level > l_hidden. lo_row->set_visible( ip_visible = abap_false ) . ENDIF. ENDIF. ADD 1 TO l_row_int. ELSE. EXIT. ENDIF. ENDDO. ELSE. ADD 1 TO l_row_int. ENDIF. ELSE. EXIT. ENDIF. ENDDO. * Let's set the row dimension values lo_row = wo_worksheet->get_row( ip_row = l_row_int ). lo_row->set_outline_level( ip_outline_level = ws_layout-max_subtotal_level ) . IF -is_collapsed = abap_true. lo_row->set_visible( ip_visible = abap_false ) . lo_row->set_collapsed( ip_collapsed = -is_collapsed ) . ENDIF. * Now let's write the cell values IF ws_layout-is_stripped = abap_true AND l_s_color = abap_true. l_style = get_color_style( i_row = l_table_row i_fieldname = -columnname i_style = -style_stripped ). wo_worksheet->set_cell( ip_column = l_col_alpha ip_row = l_row_int ip_value = ip_style = l_style ). CLEAR l_s_color. ELSE. l_style = get_color_style( i_row = l_table_row i_fieldname = -columnname i_style = -style_normal ). wo_worksheet->set_cell( ip_column = l_col_alpha ip_row = l_row_int ip_value = ip_style = l_style ). l_s_color = abap_true. ENDIF. READ TABLE wt_filter TRANSPORTING NO FIELDS WITH TABLE KEY rownumber = l_table_row columnname = -columnname. IF sy-subrc = 0. wo_worksheet->get_cell( EXPORTING ip_column = l_col_alpha ip_row = l_row_int IMPORTING ep_value = l_cell_value ). wo_autofilter->set_value( i_column = l_col_int i_value = l_cell_value ). ENDIF. ADD 1 TO l_row_int. ENDLOOP. * Let's check for subtotal lines DO. READ TABLE wt_subtotal_rows TRANSPORTING NO FIELDS WITH TABLE KEY row_int = l_row_int. IF sy-subrc = 0. IF -is_subtotalled = abap_false AND -totals_function IS NOT INITIAL. DO. READ TABLE wt_subtotal_rows INTO ls_subtotal_rows WITH TABLE KEY row_int = l_row_int. IF sy-subrc = 0. l_row_int_start = ls_subtotal_rows-row_int_start. l_row_int_end = l_row_int - 1. l_formula = create_formular_subtotal( i_row_int_start = l_row_int_start i_row_int_end = l_row_int_end i_column = l_col_alpha i_totals_function = -totals_function ). wo_worksheet->set_cell( ip_column = l_col_alpha ip_row = l_row_int ip_formula = l_formula ip_style = -style_subtotal ). IF -is_collapsed = abap_true. lo_row = wo_worksheet->get_row( ip_row = l_row_int ). lo_row->set_collapsed( ip_collapsed = -is_collapsed ). ENDIF. ADD 1 TO l_row_int. ELSE. EXIT. ENDIF. ENDDO. ELSE. ADD 1 TO l_row_int. ENDIF. ELSE. EXIT. ENDIF. ENDDO. * Now let's check for Grand total IF -is_subtotalled = abap_false AND -totals_function IS NOT INITIAL. l_row_int_start = i_row_int + 1. l_row_int_end = l_row_int - 1. l_formula = create_formular_subtotal( i_row_int_start = l_row_int_start i_row_int_end = l_row_int_end i_column = l_col_alpha i_totals_function = -totals_function ). wo_worksheet->set_cell( ip_column = l_col_alpha ip_row = l_row_int ip_formula = l_formula ip_style = -style_subtotal ). ENDIF. * Now let's check for optimized IF -is_optimized = abap_true. lo_column = wo_worksheet->get_column( ip_column = l_col_alpha ). lo_column->set_auto_size( ip_auto_size = abap_true ) . ENDIF. * Now let's check for visible IF -is_hidden = abap_true. lo_column = wo_worksheet->get_column( ip_column = l_col_alpha ). lo_column->set_visible( ip_visible = abap_false ) . ENDIF. ENDLOOP. endmethod. method OPEN_FILE. data: l_bytecount type i, lt_file type solix_tab, l_dir type string. field-symbols: type any table. assign wo_data->* to . * catch zcx_excel . *endtry. if wo_excel is bound. get_file( importing e_bytecount = l_bytecount et_file = lt_file ) . l_dir = create_path( ) . cl_gui_frontend_services=>gui_download( exporting bin_filesize = l_bytecount filename = l_dir filetype = 'BIN' changing data_tab = lt_file ). cl_gui_frontend_services=>execute( exporting document = l_dir * application = * parameter = * default_directory = * maximized = * minimized = * synchronous = * operation = 'OPEN' exceptions cntl_error = 1 error_no_gui = 2 bad_parameter = 3 file_not_found = 4 path_not_found = 5 file_extension_unknown = 6 error_execute_failed = 7 synchronous_failed = 8 not_supported_by_gui = 9 ). if sy-subrc <> 0. message id sy-msgid type sy-msgty number sy-msgno with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4. endif. endif. endmethod. method SET_AUTOFILTER_AREA. DATA: ls_area TYPE zexcel_s_autofilter_area, l_lines TYPE i, lt_values TYPE zexcel_t_autofilter_values, ls_values TYPE zexcel_s_autofilter_values. * Let's check for filter. IF wo_autofilter IS BOUND. ls_area-row_start = 1. lt_values = wo_autofilter->get_values( ) . SORT lt_values BY column ASCENDING. DESCRIBE TABLE lt_values LINES l_lines. READ TABLE lt_values INTO ls_values INDEX 1. IF sy-subrc = 0. ls_area-col_start = ls_values-column. ENDIF. READ TABLE lt_values INTO ls_values INDEX l_lines. IF sy-subrc = 0. ls_area-col_end = ls_values-column. ENDIF. wo_autofilter->set_filter_area( is_area = ls_area ) . ENDIF. endmethod. method SET_CELL_FORMAT. DATA: l_format TYPE zexcel_number_format. CLEAR r_format. CASE i_inttype. WHEN cl_abap_typedescr=>typekind_date. r_format = wo_worksheet->get_default_excel_date_format( ). WHEN cl_abap_typedescr=>typekind_time. r_format = wo_worksheet->get_default_excel_time_format( ). WHEN cl_abap_typedescr=>typekind_float OR cl_abap_typedescr=>typekind_packed. IF i_decimals > 0 . l_format = '#,##0.'. DO i_decimals TIMES. CONCATENATE l_format '0' INTO l_format. ENDDO. r_format = l_format. ENDIF. WHEN cl_abap_typedescr=>typekind_int OR cl_abap_typedescr=>typekind_int1 OR cl_abap_typedescr=>typekind_int2. r_format = '#,##0'. ENDCASE. endmethod. method SET_FIELDCATALOG. DATA: lr_data TYPE REF TO data, lo_structdescr TYPE REF TO cl_abap_structdescr, lt_dfies TYPE ddfields, ls_dfies TYPE dfies. DATA: ls_fcat TYPE zexcel_s_converter_fcat. FIELD-SYMBOLS: TYPE ANY TABLE. ASSIGN wo_data->* TO . CREATE DATA lr_data LIKE LINE OF . lo_structdescr ?= cl_abap_structdescr=>describe_by_data_ref( lr_data ). lt_dfies = zcl_excel_common=>describe_structure( io_struct = lo_structdescr ). LOOP AT lt_dfies INTO ls_dfies. MOVE-CORRESPONDING ls_dfies TO ls_fcat. ls_fcat-columnname = ls_dfies-fieldname. INSERT ls_fcat INTO TABLE wt_fieldcatalog. ENDLOOP. clean_fieldcatalog( ). endmethod. method SET_OPTION. IF ws_indx-begdt IS INITIAL. ws_indx-begdt = sy-datum. ENDIF. ws_indx-aedat = sy-datum. ws_indx-usera = sy-uname. ws_indx-pgmid = sy-cprog. EXPORT p1 = is_option TO DATABASE indx(xl) FROM ws_indx ID ws_indx-srtfd. IF sy-subrc = 0. ws_option = is_option. ENDIF. endmethod. method WRITE_FILE. data: l_bytecount type i, lt_file type solix_tab, l_dir type string. field-symbols: type any table. assign wo_data->* to . * catch zcx_excel . *endtry. if wo_excel is bound. get_file( importing e_bytecount = l_bytecount et_file = lt_file ) . if i_path is initial. l_dir = create_path( ) . else. l_dir = i_path. endif. cl_gui_frontend_services=>gui_download( exporting bin_filesize = l_bytecount filename = l_dir filetype = 'BIN' changing data_tab = lt_file ). endif. endmethod. ENDCLASS. ",15373,True,3066.9152407178753,median "/* GliderScoreMegaLed.ino - DBeach 1/6/2019 See https://github.com/dsbeach/GliderScoreMegaLed - hopefully the wiki will be updated by the time somebody reads this! */ #include #include #ifdef U8X8_HAVE_HW_SPI #include #endif #ifdef U8X8_HAVE_HW_I2C #include #endif // Please UNCOMMENT one of the contructor lines below // U8g2 Contructor List (Frame Buffer) // The complete list is available here: https://github.com/olikraus/u8g2/wiki/u8g2setupcpp // Please update the pin numbers according to your setup. Use U8X8_PIN_NONE if the reset pin is not connected //U8G2_NULL u8g2(U8G2_R0); // null device, a 8x8 pixel display which does nothing //U8G2_SSD1306_128X64_NONAME_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1306_128X64_NONAME_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 12, /* dc=*/ 4, /* reset=*/ 6); // Arduboy (Production, Kickstarter Edition) //U8G2_SSD1306_128X64_NONAME_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1306_128X64_NONAME_F_3W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* reset=*/ 8); //U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); //U8G2_SSD1306_128X64_ALT0_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); // same as the NONAME variant, but may solve the ""every 2nd line skipped"" problem //U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* reset=*/ 8); //U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // All Boards without Reset of the Display //U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ 16, /* data=*/ 17, /* reset=*/ U8X8_PIN_NONE); // ESP32 Thing, pure SW emulated I2C //U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE, /* clock=*/ 16, /* data=*/ 17); // ESP32 Thing, HW I2C with pin remapping //U8G2_SSD1306_128X64_NONAME_F_6800 u8g2(U8G2_R0, 13, 11, 2, 3, 4, 5, 6, A4, /*enable=*/ 7, /*cs=*/ 10, /*dc=*/ 9, /*reset=*/ 8); //U8G2_SSD1306_128X64_NONAME_F_8080 u8g2(U8G2_R0, 13, 11, 2, 3, 4, 5, 6, A4, /*enable=*/ 7, /*cs=*/ 10, /*dc=*/ 9, /*reset=*/ 8); //U8G2_SSD1306_128X64_VCOMH0_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but maximizes setContrast() range //U8G2_SSD1306_128X64_ALT0_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but may solve the ""every 2nd line skipped"" problem //U8G2_SH1106_128X64_NONAME_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); U8G2_SH1106_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); //U8G2_SH1106_128X64_VCOMH0_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but maximizes setContrast() range //U8G2_SH1106_128X64_WINSTAR_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but uses updated SH1106 init sequence //U8G2_SH1106_72X40_WISE_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SH1107_64X128_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SH1107_128X128_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SH1107_128X128_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); //U8G2_SH1107_SEEED_96X96_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SH1108_160X160_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SH1122_256X64_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8G2_16BIT in u8g2.h //U8G2_SSD1306_128X32_UNIVISION_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ 21, /* data=*/ 20, /* reset=*/ U8X8_PIN_NONE); // Adafruit Feather M0 Basic Proto + FeatherWing OLED //U8G2_SSD1306_128X32_UNIVISION_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // Adafruit Feather ESP8266/32u4 Boards + FeatherWing OLED //U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); // Adafruit ESP8266/32u4/ARM Boards + FeatherWing OLED //U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE, /* clock=*/ SCL, /* data=*/ SDA); // pin remapping with ESP8266 HW I2C //U8G2_SSD1306_64X48_ER_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); // EastRising 0.66"" OLED breakout board, Uno: A4=SDA, A5=SCL, 5V powered //U8G2_SSD1306_48X64_WINSTAR_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); //U8G2_SSD1306_64X32_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); //U8G2_SSD1306_64X32_1F_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); //U8G2_SSD1306_96X16_ER_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); // EastRising 0.69"" OLED //U8G2_SSD1322_NHD_256X64_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8G2_16BIT in u8g2.h //U8G2_SSD1322_NHD_256X64_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8G2_16BIT in u8g2.h //U8G2_SSD1322_NHD_128X64_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1322_NHD_128X64_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1325_NHD_128X64_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1325_NHD_128X64_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD0323_OS128064_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD0323_OS128064_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1326_ER_256X32_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // experimental driver for ER-OLED018-1 //U8G2_SSD1327_SEEED_96X96_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // Seeedstudio Grove OLED 96x96 //U8G2_SSD1327_SEEED_96X96_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); // Seeedstudio Grove OLED 96x96 //U8G2_SSD1327_EA_W128128_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1327_EA_W128128_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1327_EA_W128128_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ 5, /* data=*/ 4, /* reset=*/ U8X8_PIN_NONE); //U8G2_SSD1327_EA_W128128_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); //U8G2_SSD1327_MIDAS_128X128_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1327_MIDAS_128X128_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1329_128X96_NONAME_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1329_128X96_NONAME_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1305_128X32_NONAME_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1305_128X32_NONAME_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1305_128X32_ADAFRUIT_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1305_128X32_ADAFRUIT_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1305_128X64_ADAFRUIT_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1305_128X64_ADAFRUIT_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1309_128X64_NONAME0_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1309_128X64_NONAME0_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1309_128X64_NONAME2_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1309_128X64_NONAME2_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1317_96X96_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1317_96X96_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_LD7032_60X32_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 11, /* data=*/ 12, /* cs=*/ 9, /* dc=*/ 10, /* reset=*/ 8); // SW SPI Nano Board //U8G2_LD7032_60X32_F_4W_SW_I2C u8g2(U8G2_R0, /* clock=*/ 11, /* data=*/ 12, /* reset=*/ U8X8_PIN_NONE); // NOT TESTED! //U8G2_UC1701_EA_DOGS102_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_UC1701_EA_DOGS102_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_PCD8544_84X48_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Nokia 5110 Display //U8G2_PCD8544_84X48_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Nokia 5110 Display //U8G2_PCF8812_96X65_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Could be also PCF8814 //U8G2_PCF8812_96X65_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Could be also PCF8814 //U8G2_HX1230_96X68_F_3W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* reset=*/ 8); //U8G2_HX1230_96X68_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_KS0108_128X64_F u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*dc=*/ 17, /*cs0=*/ 14, /*cs1=*/ 15, /*cs2=*/ U8X8_PIN_NONE, /* reset=*/ U8X8_PIN_NONE); // Set R/W to low! //U8G2_KS0108_ERM19264_F u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*dc=*/ 17, /*cs0=*/ 14, /*cs1=*/ 15, /*cs2=*/ 16, /* reset=*/ U8X8_PIN_NONE); // Set R/W to low! //U8G2_ST7920_192X32_F_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ U8X8_PIN_NONE, /*dc=*/ 17, /*reset=*/ U8X8_PIN_NONE); //U8G2_ST7920_192X32_F_SW_SPI u8g2(U8G2_R0, /* clock=*/ 18 /* A4 */ , /* data=*/ 16 /* A2 */, /* CS=*/ 17 /* A3 */, /* reset=*/ U8X8_PIN_NONE); //U8G2_ST7920_128X64_F_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18 /* A4 */, /*cs=*/ U8X8_PIN_NONE, /*dc/rs=*/ 17 /* A3 */, /*reset=*/ 15 /* A1 */); // Remember to set R/W to 0 //U8G2_ST7920_128X64_F_SW_SPI u8g2(U8G2_R0, /* clock=*/ 18 /* A4 */ , /* data=*/ 16 /* A2 */, /* CS=*/ 17 /* A3 */, /* reset=*/ U8X8_PIN_NONE); //U8G2_ST7920_128X64_F_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* CS=*/ 10, /* reset=*/ 8); //U8G2_ST7920_128X64_F_HW_SPI u8g2(U8G2_R0, /* CS=*/ 10, /* reset=*/ 8); //U8G2_ST7565_EA_DOGM128_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_EA_DOGM128_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_64128N_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_64128N_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_EA_DOGM132_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); // DOGM132 Shield //U8G2_ST7565_EA_DOGM132_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); // DOGM132 Shield //U8G2_ST7565_ZOLEN_128X64_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_ZOLEN_128X64_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_LM6059_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Adafruit ST7565 GLCD //U8G2_ST7565_LM6059_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Adafruit ST7565 GLCD //U8G2_ST7565_LX12864_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_LX12864_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_ERC12864_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_ERC12864_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_NHD_C12832_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_NHD_C12832_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_NHD_C12864_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_NHD_C12864_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_JLX12864_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_JLX12864_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7567_PI_132X64_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); // Pax Instruments Shield, LCD_BL=6 //U8G2_ST7567_PI_132X64_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); // Pax Instruments Shield, LCD_BL=6 //U8G2_ST7567_JLX12864_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7567_JLX12864_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7567_ENH_DG128064_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7567_ENH_DG128064_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7567_ENH_DG128064I_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7567_ENH_DG128064I_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7567_64X32_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); //U8G2_ST75256_JLX172104_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST75256_JLX172104_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST75256_JLX256128_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8g2 16 bit mode for this display //U8G2_ST75256_JLX256128_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8g2 16 bit mode for this display //U8G2_ST75256_JLX256128_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 9, /* data=*/ 8, /* cs=*/ 7, /* dc=*/ 6, /* reset=*/ 5); // MKR Zero, Enable U8g2 16 bit mode for this display //U8G2_ST75256_JLX256128_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 7, /* dc=*/ 6, /* reset=*/ 5); // MKR Zero, Enable U8g2 16 bit mode for this display //U8G2_ST75256_JLX256160_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8g2 16 bit mode for this display //U8G2_ST75256_JLX256160_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8g2 16 bit mode for this display //U8G2_ST75256_JLX240160_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST75256_JLX240160_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST75256_JLX25664_F_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, enable U8g2 16 bit mode for this display //U8G2_NT7534_TG12864R_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_NT7534_TG12864R_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7588_JLX12864_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ 5); //U8G2_ST7588_JLX12864_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ 5); //U8G2_IST3020_ERC19264_F_6800 u8g2(U8G2_R0, 44, 43, 42, 41, 40, 39, 38, 37, /*enable=*/ 28, /*cs=*/ 32, /*dc=*/ 30, /*reset=*/ 31); // Connect WR pin with GND //U8G2_IST3020_ERC19264_F_8080 u8g2(U8G2_R0, 44, 43, 42, 41, 40, 39, 38, 37, /*enable=*/ 29, /*cs=*/ 32, /*dc=*/ 30, /*reset=*/ 31); // Connect RD pin with 3.3V //U8G2_IST3020_ERC19264_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_LC7981_160X80_F_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RW with GND //U8G2_LC7981_160X160_F_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RW with GND //U8G2_LC7981_240X128_F_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RW with GND //U8G2_LC7981_240X64_F_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RW with GND //U8G2_SED1520_122X32_F u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*dc=*/ A0, /*e1=*/ A3, /*e2=*/ A2, /* reset=*/ A4); // Set R/W to low! //U8G2_T6963_240X128_F_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RD with +5V, FS0 and FS1 with GND //U8G2_T6963_256X64_F_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RD with +5V, FS0 and FS1 with GND //U8G2_T6963_160X80_F_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RD with +5V, FS0 and FS1 with GND //U8G2_SED1330_240X128_F_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RD with +5V, FG with GND //U8G2_SED1330_240X128_F_6800 u8g2(U8G2_R0, 13, 11, 2, 3, 4, 5, 6, A4, /*enable=*/ 7, /*cs=*/ 10, /*dc=*/ 9, /*reset=*/ 8); // A0 is dc pin! //U8G2_RA8835_NHD_240X128_F_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect /RD = E with +5V, enable is /WR = RW, FG with GND, 14=Uno Pin A0 //U8G2_RA8835_NHD_240X128_F_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // A0 is dc pin, /WR = RW = GND, enable is /RD = E //U8G2_UC1604_JLX19264_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_UC1604_JLX19264_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_UC1608_ERC24064_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // SW SPI, Due ERC24064-1 Test Setup //U8G2_UC1608_ERC240120_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_UC1608_240X128_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // SW SPI, Due ERC24064-1 Test Setup //U8G2_UC1610_EA_DOGXL160_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8G2_UC1610_EA_DOGXL160_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8G2_UC1611_EA_DOGM240_F_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGM240 Test Board //U8G2_UC1611_EA_DOGM240_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Due, SW SPI, DOGXL240 Test Board //U8G2_UC1611_EA_DOGXL240_F_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGXL240 Test Board //U8G2_UC1611_EA_DOGXL240_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Due, SW SPI, DOGXL240 Test Board //U8G2_UC1611_EW50850_F_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 3, /*dc=*/ 16, /*reset=*/ 16); // 240x160, Connect RD/WR1 pin with 3.3V, CS is aktive high //U8G2_UC1638_160X128_F_4W_HW_SPI u8g2(U8G2_R2, /* cs=*/ 2, /* dc=*/ 3, /* reset=*/ 4); // Not tested //U8G2_SSD1606_172X72_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // eInk/ePaper Display //U8G2_SSD1607_200X200_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // eInk/ePaper Display, original LUT from embedded artists //U8G2_SSD1607_GD_200X200_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Good Display //U8G2_IL3820_296X128_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // WaveShare 2.9 inch eInk/ePaper Display, enable 16 bit mode for this display! //U8G2_IL3820_V2_296X128_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // ePaper Display, lesser flickering and faster speed, enable 16 bit mode for this display! //U8G2_MAX7219_64X8_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 11, /* data=*/ 12, /* cs=*/ 10, /* dc=*/ U8X8_PIN_NONE, /* reset=*/ U8X8_PIN_NONE); //U8G2_MAX7219_32X8_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 11, /* data=*/ 12, /* cs=*/ 10, /* dc=*/ U8X8_PIN_NONE, /* reset=*/ U8X8_PIN_NONE); //U8G2_MAX7219_8X8_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 11, /* data=*/ 12, /* cs=*/ 10, /* dc=*/ U8X8_PIN_NONE, /* reset=*/ U8X8_PIN_NONE); //U8G2_LS013B7DH03_128X128_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ U8X8_PIN_NONE, /* reset=*/ 8); // there is no DC line for this display //U8G2_LS027B7DH01_400X240_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ U8X8_PIN_NONE, /* reset=*/ 8); // there is no DC line for this display // End of constructor list #define CMD_BUF_SIZE 32 char cmdBuf[CMD_BUF_SIZE]; char displayBuf[CMD_BUF_SIZE]; void setup(void) { memset(cmdBuf, 0, CMD_BUF_SIZE); memset(displayBuf, 0, CMD_BUF_SIZE); u8g2.begin(); Serial.begin(115200); } void loop(void) { u8g2.firstPage(); do { if (readCmd(cmdBuf)) { Serial.print(""You entered: >""); Serial.print(cmdBuf); Serial.println(""<""); memcpy(displayBuf, cmdBuf, CMD_BUF_SIZE); } u8g2.setFont(u8g2_font_ncenB14_tr); u8g2.drawStr(0,15,displayBuf); } while ( u8g2.nextPage() ); // delay(1000); } bool readCmd(char *cmdBuf) { static int pos = 0; char readch; while (Serial.available() > 0) { readch = Serial.read(); switch (readch) { case '\\r': // Ignore CR break; case '\\n': // Return on new-line cmdBuf[pos++] = 0; pos = 0; // Reset position index ready for next time return true; default: cmdBuf[pos++] = readch; if (pos == (CMD_BUF_SIZE - 1)) { cmdBuf[pos] = 0; pos = 0; return true; } } } return false; } ",12226,True,3651.128138222812,median "cmd_arch/arm64/kernel/cpuinfo.o := aarch64-xilinx-linux-gcc -fuse-ld=bfd -fdebug-prefix-map=/home/zw/share/ultra96/mipitest/build/tmp/work/ultra96_zynqmp-xilinx-linux/linux-xlnx/4.19-xilinx-v2019.1+git999-r0=/usr/src/debug/linux-xlnx/4.19-xilinx-v2019.1+git999-r0 -fdebug-prefix-map=/home/zw/share/ultra96/mipitest/build/tmp/work/ultra96_zynqmp-xilinx-linux/linux-xlnx/4.19-xilinx-v2019.1+git999-r0/recipe-sysroot= -fdebug-prefix-map=/home/zw/share/ultra96/mipitest/build/tmp/work/ultra96_zynqmp-xilinx-linux/linux-xlnx/4.19-xilinx-v2019.1+git999-r0/recipe-sysroot-native= -fdebug-prefix-map=/home/zw/share/ultra96/mipitest/build/tmp/work-shared/ultra96-zynqmp/kernel-source=/usr/src/kernel --sysroot=/home/zw/share/ultra96/mipitest/build/tmp/work/ultra96_zynqmp-xilinx-linux/linux-xlnx/4.19-xilinx-v2019.1+git999-r0/recipe-sysroot -Wp,-MD,arch/arm64/kernel/.cpuinfo.o.d -nostdinc -isystem /home/zw/share/ultra96/mipitest/build/tmp/work/ultra96_zynqmp-xilinx-linux/linux-xlnx/4.19-xilinx-v2019.1+git999-r0/recipe-sysroot-native/usr/bin/aarch64-xilinx-linux/../../lib/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/8.2.0/include -I/home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include -I./arch/arm64/include/generated -I/home/zw/share/ultra96/mipitest/linux-xlnx/include -I./include -I/home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi -I./arch/arm64/include/generated/uapi -I/home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi -I./include/generated/uapi -include /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kconfig.h -include /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/compiler_types.h -I/home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/kernel -Iarch/arm64/kernel -D__KERNEL__ -mlittle-endian -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -DCC_HAVE_ASM_GOTO -mgeneral-regs-only -DCONFIG_AS_LSE=1 -fno-asynchronous-unwind-tables -mabi=lp64 -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-int-in-bool-context -O2 --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -g -Wdeclaration-after-statement -Wno-pointer-sign -Wno-stringop-truncation -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -fmacro-prefix-map=/home/zw/share/ultra96/mipitest/linux-xlnx/= -Wno-packed-not-aligned -DKBUILD_BASENAME='""cpuinfo""' -DKBUILD_MODNAME='""cpuinfo""' -c -o arch/arm64/kernel/cpuinfo.o /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/kernel/cpuinfo.c source_arch/arm64/kernel/cpuinfo.o := /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/kernel/cpuinfo.c deps_arch/arm64/kernel/cpuinfo.o := \\ $(wildcard include/config/compat.h) \\ $(wildcard include/config/arm64/sve.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kconfig.h \\ $(wildcard include/config/cpu/big/endian.h) \\ $(wildcard include/config/booger.h) \\ $(wildcard include/config/foo.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/compiler_types.h \\ $(wildcard include/config/have/arch/compiler/h.h) \\ $(wildcard include/config/enable/must/check.h) \\ $(wildcard include/config/arch/supports/optimized/inlining.h) \\ $(wildcard include/config/optimize/inlining.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/compiler-gcc.h \\ $(wildcard include/config/arch/use/builtin/bswap.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/arch_timer.h \\ $(wildcard include/config/arm/arch/timer/ool/workaround.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/barrier.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/barrier.h \\ $(wildcard include/config/smp.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/compiler.h \\ $(wildcard include/config/trace/branch/profiling.h) \\ $(wildcard include/config/profile/all/branches.h) \\ $(wildcard include/config/stack/validation.h) \\ $(wildcard include/config/kasan.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/compiler_types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/types.h \\ arch/arm64/include/generated/uapi/asm/types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/int-ll64.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/int-ll64.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/bitsperlong.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitsperlong.h \\ $(wildcard include/config/64bit.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/bitsperlong.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/posix_types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/stddef.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/stddef.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/posix_types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/posix_types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kasan-checks.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/sysreg.h \\ $(wildcard include/config/broken/gas/inst.h) \\ $(wildcard include/config/arm64/pa/bits/52.h) \\ $(wildcard include/config/arm64/4k/pages.h) \\ $(wildcard include/config/arm64/16k/pages.h) \\ $(wildcard include/config/arm64/64k/pages.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/compiler.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/stringify.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/build_bug.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/types.h \\ $(wildcard include/config/have/uid16.h) \\ $(wildcard include/config/uid16.h) \\ $(wildcard include/config/lbdaf.h) \\ $(wildcard include/config/arch/dma/addr/t/64bit.h) \\ $(wildcard include/config/phys/addr/t/64bit.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/bug.h \\ $(wildcard include/config/generic/bug.h) \\ $(wildcard include/config/bug/on/data/corruption.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/bug.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/asm-bug.h \\ $(wildcard include/config/debug/bugverbose.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/brk-imm.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bug.h \\ $(wildcard include/config/bug.h) \\ $(wildcard include/config/generic/bug/relative/pointers.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kernel.h \\ $(wildcard include/config/preempt/voluntary.h) \\ $(wildcard include/config/debug/atomic/sleep.h) \\ $(wildcard include/config/mmu.h) \\ $(wildcard include/config/prove/locking.h) \\ $(wildcard include/config/arch/has/refcount.h) \\ $(wildcard include/config/panic/timeout.h) \\ $(wildcard include/config/tracing.h) \\ $(wildcard include/config/ftrace/mcount/record.h) \\ /home/zw/share/ultra96/mipitest/build/tmp/work/ultra96_zynqmp-xilinx-linux/linux-xlnx/4.19-xilinx-v2019.1+git999-r0/recipe-sysroot-native/usr/lib/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/8.2.0/include/stdarg.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/linkage.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/export.h \\ $(wildcard include/config/modules.h) \\ $(wildcard include/config/modversions.h) \\ $(wildcard include/config/module/rel/crcs.h) \\ $(wildcard include/config/have/arch/prel32/relocations.h) \\ $(wildcard include/config/trim/unused/ksyms.h) \\ $(wildcard include/config/unused/symbols.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/linkage.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/bitops.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/bits.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/bitops.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/builtin-__ffs.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/builtin-ffs.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/builtin-__fls.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/builtin-fls.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/ffz.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/fls64.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/find.h \\ $(wildcard include/config/generic/find/first/bit.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/sched.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/hweight.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/arch_hweight.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/const_hweight.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/atomic.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/atomic.h \\ $(wildcard include/config/generic/atomic64.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/atomic.h \\ $(wildcard include/config/arm64/lse/atomics.h) \\ $(wildcard include/config/as/lse.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/lse.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/alternative.h \\ $(wildcard include/config/arm64/uao.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/cpucaps.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/insn.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/init.h \\ $(wildcard include/config/strict/kernel/rwx.h) \\ $(wildcard include/config/strict/module/rwx.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/atomic_lse.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/cmpxchg.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/atomic-long.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/lock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/non-atomic.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/le.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/byteorder.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/byteorder/little_endian.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/byteorder/little_endian.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/swab.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/swab.h \\ arch/arm64/include/generated/uapi/asm/swab.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/swab.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/byteorder/generic.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/ext2-atomic-setbit.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/log2.h \\ $(wildcard include/config/arch/has/ilog2/u32.h) \\ $(wildcard include/config/arch/has/ilog2/u64.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/typecheck.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/printk.h \\ $(wildcard include/config/message/loglevel/default.h) \\ $(wildcard include/config/console/loglevel/default.h) \\ $(wildcard include/config/console/loglevel/quiet.h) \\ $(wildcard include/config/early/printk.h) \\ $(wildcard include/config/printk/nmi.h) \\ $(wildcard include/config/printk.h) \\ $(wildcard include/config/dynamic/debug.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kern_levels.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/cache.h \\ $(wildcard include/config/arch/has/cache/line/size.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/kernel.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/sysinfo.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/cache.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/cputype.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/jump_label.h \\ $(wildcard include/config/jump/label.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/smp.h \\ $(wildcard include/config/up/late/init.h) \\ $(wildcard include/config/debug/preempt.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/errno.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/errno.h \\ arch/arm64/include/generated/uapi/asm/errno.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/errno.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/errno-base.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/list.h \\ $(wildcard include/config/debug/list.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/poison.h \\ $(wildcard include/config/illegal/pointer/value.h) \\ $(wildcard include/config/page/poisoning/zero.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/const.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/const.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/cpumask.h \\ $(wildcard include/config/cpumask/offstack.h) \\ $(wildcard include/config/hotplug/cpu.h) \\ $(wildcard include/config/debug/per/cpu/maps.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/threads.h \\ $(wildcard include/config/nr/cpus.h) \\ $(wildcard include/config/base/small.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/bitmap.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/string.h \\ $(wildcard include/config/binary/printf.h) \\ $(wildcard include/config/fortify/source.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/string.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/string.h \\ $(wildcard include/config/arch/has/uaccess/flushcache.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/llist.h \\ $(wildcard include/config/arch/have/nmi/safe/cmpxchg.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/preempt.h \\ $(wildcard include/config/preempt/count.h) \\ $(wildcard include/config/trace/preempt/toggle.h) \\ $(wildcard include/config/preempt.h) \\ $(wildcard include/config/preempt/notifiers.h) \\ arch/arm64/include/generated/asm/preempt.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/preempt.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/thread_info.h \\ $(wildcard include/config/thread/info/in/task.h) \\ $(wildcard include/config/have/arch/within/stack/frames.h) \\ $(wildcard include/config/hardened/usercopy.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/restart_block.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/time64.h \\ $(wildcard include/config/64bit/time.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/math64.h \\ $(wildcard include/config/arch/supports/int128.h) \\ arch/arm64/include/generated/asm/div64.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/div64.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/time.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/current.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/thread_info.h \\ $(wildcard include/config/arm64/sw/ttbr0/pan.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/memory.h \\ $(wildcard include/config/arm64/va/bits.h) \\ $(wildcard include/config/vmap/stack.h) \\ $(wildcard include/config/debug/align/rodata.h) \\ $(wildcard include/config/blk/dev/initrd.h) \\ $(wildcard include/config/debug/virtual.h) \\ $(wildcard include/config/sparsemem/vmemmap.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/page-def.h \\ $(wildcard include/config/arm64/page/shift.h) \\ $(wildcard include/config/arm64/cont/shift.h) \\ arch/arm64/include/generated/asm/sizes.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/sizes.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sizes.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/mmdebug.h \\ $(wildcard include/config/debug/vm.h) \\ $(wildcard include/config/debug/vm/pgflags.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/memory_model.h \\ $(wildcard include/config/flatmem.h) \\ $(wildcard include/config/discontigmem.h) \\ $(wildcard include/config/sparsemem.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/pfn.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/stack_pointer.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/smp.h \\ $(wildcard include/config/arm64/acpi/parking/protocol.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/percpu.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/percpu.h \\ $(wildcard include/config/have/setup/per/cpu/area.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/percpu-defs.h \\ $(wildcard include/config/debug/force/weak/per/cpu.h) \\ $(wildcard include/config/virtualization.h) \\ $(wildcard include/config/amd/mem/encrypt.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/clocksource/arm_arch_timer.h \\ $(wildcard include/config/arm/arch/timer.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/timecounter.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/cpu.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/cpu.h \\ $(wildcard include/config/pm/sleep/smp.h) \\ $(wildcard include/config/hotplug/smt.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/node.h \\ $(wildcard include/config/memory/hotplug/sparse.h) \\ $(wildcard include/config/hugetlbfs.h) \\ $(wildcard include/config/numa.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/device.h \\ $(wildcard include/config/debug/devres.h) \\ $(wildcard include/config/srcu.h) \\ $(wildcard include/config/generic/msi/irq/domain.h) \\ $(wildcard include/config/pinctrl.h) \\ $(wildcard include/config/generic/msi/irq.h) \\ $(wildcard include/config/dma/cma.h) \\ $(wildcard include/config/pm/sleep.h) \\ $(wildcard include/config/of.h) \\ $(wildcard include/config/devtmpfs.h) \\ $(wildcard include/config/sysfs/deprecated.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/ioport.h \\ $(wildcard include/config/memory/hotremove.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kobject.h \\ $(wildcard include/config/uevent/helper.h) \\ $(wildcard include/config/debug/kobject/release.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sysfs.h \\ $(wildcard include/config/debug/lock/alloc.h) \\ $(wildcard include/config/sysfs.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kernfs.h \\ $(wildcard include/config/kernfs.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/err.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/mutex.h \\ $(wildcard include/config/mutex/spin/on/owner.h) \\ $(wildcard include/config/debug/mutexes.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/spinlock_types.h \\ $(wildcard include/config/debug/spinlock.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/spinlock_types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/qspinlock_types.h \\ $(wildcard include/config/paravirt.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/qrwlock_types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/lockdep.h \\ $(wildcard include/config/lockdep.h) \\ $(wildcard include/config/lock/stat.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rwlock_types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/processor.h \\ $(wildcard include/config/have/hw/breakpoint.h) \\ $(wildcard include/config/gcc/plugin/stackleak.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/cpufeature.h \\ $(wildcard include/config/arm64/ssbd.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/hwcap.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/hwcap.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/hw_breakpoint.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/virt.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/ptrace.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/ptrace.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/sigcontext.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/prctl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/ptrace.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/sections.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/sections.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/pgtable-hwdef.h \\ $(wildcard include/config/pgtable/levels.h) \\ $(wildcard include/config/arm64/pa/bits.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/fpsimd.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/osq_lock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/debug_locks.h \\ $(wildcard include/config/debug/locking/api/selftests.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/idr.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/radix-tree.h \\ $(wildcard include/config/radix/tree/multiorder.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rcupdate.h \\ $(wildcard include/config/preempt/rcu.h) \\ $(wildcard include/config/rcu/stall/common.h) \\ $(wildcard include/config/no/hz/full.h) \\ $(wildcard include/config/rcu/nocb/cpu.h) \\ $(wildcard include/config/tasks/rcu.h) \\ $(wildcard include/config/tree/rcu.h) \\ $(wildcard include/config/tiny/rcu.h) \\ $(wildcard include/config/debug/objects/rcu/head.h) \\ $(wildcard include/config/prove/rcu.h) \\ $(wildcard include/config/rcu/boost.h) \\ $(wildcard include/config/arch/weak/release/acquire.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/irqflags.h \\ $(wildcard include/config/trace/irqflags.h) \\ $(wildcard include/config/irqsoff/tracer.h) \\ $(wildcard include/config/preempt/tracer.h) \\ $(wildcard include/config/trace/irqflags/support.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/irqflags.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/bottom_half.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rcutree.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/spinlock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/spinlock.h \\ arch/arm64/include/generated/asm/qrwlock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/qrwlock.h \\ arch/arm64/include/generated/asm/qspinlock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/qspinlock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rwlock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/spinlock_api_smp.h \\ $(wildcard include/config/inline/spin/lock.h) \\ $(wildcard include/config/inline/spin/lock/bh.h) \\ $(wildcard include/config/inline/spin/lock/irq.h) \\ $(wildcard include/config/inline/spin/lock/irqsave.h) \\ $(wildcard include/config/inline/spin/trylock.h) \\ $(wildcard include/config/inline/spin/trylock/bh.h) \\ $(wildcard include/config/uninline/spin/unlock.h) \\ $(wildcard include/config/inline/spin/unlock/bh.h) \\ $(wildcard include/config/inline/spin/unlock/irq.h) \\ $(wildcard include/config/inline/spin/unlock/irqrestore.h) \\ $(wildcard include/config/generic/lockbreak.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rwlock_api_smp.h \\ $(wildcard include/config/inline/read/lock.h) \\ $(wildcard include/config/inline/write/lock.h) \\ $(wildcard include/config/inline/read/lock/bh.h) \\ $(wildcard include/config/inline/write/lock/bh.h) \\ $(wildcard include/config/inline/read/lock/irq.h) \\ $(wildcard include/config/inline/write/lock/irq.h) \\ $(wildcard include/config/inline/read/lock/irqsave.h) \\ $(wildcard include/config/inline/write/lock/irqsave.h) \\ $(wildcard include/config/inline/read/trylock.h) \\ $(wildcard include/config/inline/write/trylock.h) \\ $(wildcard include/config/inline/read/unlock.h) \\ $(wildcard include/config/inline/write/unlock.h) \\ $(wildcard include/config/inline/read/unlock/bh.h) \\ $(wildcard include/config/inline/write/unlock/bh.h) \\ $(wildcard include/config/inline/read/unlock/irq.h) \\ $(wildcard include/config/inline/write/unlock/irq.h) \\ $(wildcard include/config/inline/read/unlock/irqrestore.h) \\ $(wildcard include/config/inline/write/unlock/irqrestore.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/gfp.h \\ $(wildcard include/config/highmem.h) \\ $(wildcard include/config/zone/dma.h) \\ $(wildcard include/config/zone/dma32.h) \\ $(wildcard include/config/zone/device.h) \\ $(wildcard include/config/memory/isolation.h) \\ $(wildcard include/config/compaction.h) \\ $(wildcard include/config/cma.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/mmzone.h \\ $(wildcard include/config/force/max/zoneorder.h) \\ $(wildcard include/config/zsmalloc.h) \\ $(wildcard include/config/memcg.h) \\ $(wildcard include/config/memory/hotplug.h) \\ $(wildcard include/config/flat/node/mem/map.h) \\ $(wildcard include/config/page/extension.h) \\ $(wildcard include/config/no/bootmem.h) \\ $(wildcard include/config/deferred/struct/page/init.h) \\ $(wildcard include/config/transparent/hugepage.h) \\ $(wildcard include/config/have/memory/present.h) \\ $(wildcard include/config/have/memoryless/nodes.h) \\ $(wildcard include/config/have/memblock/node/map.h) \\ $(wildcard include/config/need/multiple/nodes.h) \\ $(wildcard include/config/have/arch/early/pfn/to/nid.h) \\ $(wildcard include/config/sparsemem/extreme.h) \\ $(wildcard include/config/have/arch/pfn/valid.h) \\ $(wildcard include/config/holes/in/zone.h) \\ $(wildcard include/config/arch/has/holes/memorymodel.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/wait.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/wait.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/numa.h \\ $(wildcard include/config/nodes/shift.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/seqlock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/nodemask.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/pageblock-flags.h \\ $(wildcard include/config/hugetlb/page.h) \\ $(wildcard include/config/hugetlb/page/size/variable.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/page-flags-layout.h \\ $(wildcard include/config/numa/balancing.h) \\ include/generated/bounds.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/sparsemem.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/page.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/personality.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/personality.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/pgtable-types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/pgtable-nopud.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/pgtable-nop4d-hack.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/5level-fixup.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/getorder.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/memory_hotplug.h \\ $(wildcard include/config/arch/has/add/pages.h) \\ $(wildcard include/config/have/arch/nodedata/extension.h) \\ $(wildcard include/config/have/bootmem/info/node.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/notifier.h \\ $(wildcard include/config/tree/srcu.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rwsem.h \\ $(wildcard include/config/rwsem/spin/on/owner.h) \\ $(wildcard include/config/rwsem/generic/spinlock.h) \\ arch/arm64/include/generated/asm/rwsem.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/rwsem.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/srcu.h \\ $(wildcard include/config/tiny/srcu.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/workqueue.h \\ $(wildcard include/config/debug/objects/work.h) \\ $(wildcard include/config/freezer.h) \\ $(wildcard include/config/wq/watchdog.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/timer.h \\ $(wildcard include/config/debug/objects/timers.h) \\ $(wildcard include/config/no/hz/common.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/ktime.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/time.h \\ $(wildcard include/config/arch/uses/gettimeoffset.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/time32.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/jiffies.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/timex.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/timex.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/param.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/param.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/param.h \\ $(wildcard include/config/hz.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/param.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/timex.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/timex.h \\ include/generated/timeconst.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/timekeeping.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/timekeeping32.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/debugobjects.h \\ $(wildcard include/config/debug/objects.h) \\ $(wildcard include/config/debug/objects/free.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rcu_segcblist.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/srcutree.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rcu_node_tree.h \\ $(wildcard include/config/rcu/fanout.h) \\ $(wildcard include/config/rcu/fanout/leaf.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/completion.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/topology.h \\ $(wildcard include/config/use/percpu/numa/node/id.h) \\ $(wildcard include/config/sched/smt.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/percpu.h \\ $(wildcard include/config/need/per/cpu/embed/first/chunk.h) \\ $(wildcard include/config/need/per/cpu/page/first/chunk.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/topology.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/arch_topology.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/topology.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rbtree.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/uidgid.h \\ $(wildcard include/config/multiuser.h) \\ $(wildcard include/config/user/ns.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/highuid.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kobject_ns.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/stat.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/stat.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/stat.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/stat.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/compat_time.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/compat.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sched.h \\ $(wildcard include/config/virt/cpu/accounting/native.h) \\ $(wildcard include/config/sched/info.h) \\ $(wildcard include/config/schedstats.h) \\ $(wildcard include/config/fair/group/sched.h) \\ $(wildcard include/config/rt/group/sched.h) \\ $(wildcard include/config/cgroup/sched.h) \\ $(wildcard include/config/blk/dev/io/trace.h) \\ $(wildcard include/config/memcg/kmem.h) \\ $(wildcard include/config/compat/brk.h) \\ $(wildcard include/config/cgroups.h) \\ $(wildcard include/config/blk/cgroup.h) \\ $(wildcard include/config/stackprotector.h) \\ $(wildcard include/config/arch/has/scaled/cputime.h) \\ $(wildcard include/config/virt/cpu/accounting/gen.h) \\ $(wildcard include/config/posix/timers.h) \\ $(wildcard include/config/sysvipc.h) \\ $(wildcard include/config/detect/hung/task.h) \\ $(wildcard include/config/auditsyscall.h) \\ $(wildcard include/config/rt/mutexes.h) \\ $(wildcard include/config/ubsan.h) \\ $(wildcard include/config/block.h) \\ $(wildcard include/config/task/xacct.h) \\ $(wildcard include/config/cpusets.h) \\ $(wildcard include/config/intel/rdt.h) \\ $(wildcard include/config/futex.h) \\ $(wildcard include/config/perf/events.h) \\ $(wildcard include/config/rseq.h) \\ $(wildcard include/config/task/delay/acct.h) \\ $(wildcard include/config/fault/injection.h) \\ $(wildcard include/config/latencytop.h) \\ $(wildcard include/config/function/graph/tracer.h) \\ $(wildcard include/config/kcov.h) \\ $(wildcard include/config/uprobes.h) \\ $(wildcard include/config/bcache.h) \\ $(wildcard include/config/livepatch.h) \\ $(wildcard include/config/security.h) \\ $(wildcard include/config/arch/task/struct/on/stack.h) \\ $(wildcard include/config/debug/rseq.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/sched.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/pid.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rculist.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sem.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/sem.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/ipc.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rhashtable-types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/ipc.h \\ arch/arm64/include/generated/uapi/asm/ipcbuf.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/ipcbuf.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/refcount.h \\ $(wildcard include/config/refcount/full.h) \\ arch/arm64/include/generated/uapi/asm/sembuf.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/sembuf.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/shm.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/shm.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/hugetlb_encode.h \\ arch/arm64/include/generated/uapi/asm/shmbuf.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/shmbuf.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/shmparam.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/shmparam.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kcov.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/kcov.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/plist.h \\ $(wildcard include/config/debug/pi/list.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/hrtimer.h \\ $(wildcard include/config/high/res/timers.h) \\ $(wildcard include/config/time/low/res.h) \\ $(wildcard include/config/timerfd.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/timerqueue.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/seccomp.h \\ $(wildcard include/config/seccomp.h) \\ $(wildcard include/config/have/arch/seccomp/filter.h) \\ $(wildcard include/config/seccomp/filter.h) \\ $(wildcard include/config/checkpoint/restore.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/seccomp.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/resource.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/resource.h \\ arch/arm64/include/generated/uapi/asm/resource.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/resource.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/resource.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/latencytop.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sched/prio.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/signal_types.h \\ $(wildcard include/config/old/sigaction.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/signal.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/signal.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/signal.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/signal.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/signal-defs.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/siginfo.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/siginfo.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/mm_types_task.h \\ $(wildcard include/config/arch/want/batched/unmap/tlb/flush.h) \\ $(wildcard include/config/split/ptlock/cpus.h) \\ $(wildcard include/config/arch/enable/split/pmd/ptlock.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/task_io_accounting.h \\ $(wildcard include/config/task/io/accounting.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/rseq.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sched/task_stack.h \\ $(wildcard include/config/stack/growsup.h) \\ $(wildcard include/config/debug/stack/usage.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/magic.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/stat.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kref.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/klist.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/pm.h \\ $(wildcard include/config/vt/console/sleep.h) \\ $(wildcard include/config/pm.h) \\ $(wildcard include/config/pm/clk.h) \\ $(wildcard include/config/pm/generic/domains.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/ratelimit.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/overflow.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/device.h \\ $(wildcard include/config/iommu/api.h) \\ $(wildcard include/config/xen.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/pm_wakeup.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/cpuhotplug.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/compat.h \\ $(wildcard include/config/arch/has/syscall/wrapper.h) \\ $(wildcard include/config/x86/x32/abi.h) \\ $(wildcard include/config/compat/old/sigaction.h) \\ $(wildcard include/config/odd/rt/sigaction.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/socket.h \\ $(wildcard include/config/proc/fs.h) \\ arch/arm64/include/generated/uapi/asm/socket.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/socket.h \\ arch/arm64/include/generated/uapi/asm/sockios.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/sockios.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/sockios.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/uio.h \\ $(wildcard include/config/arch/has/uaccess/mcsafe.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/uio.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/socket.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/if.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/libc-compat.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/hdlc/ioctl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/fs.h \\ $(wildcard include/config/fs/posix/acl.h) \\ $(wildcard include/config/cgroup/writeback.h) \\ $(wildcard include/config/ima.h) \\ $(wildcard include/config/fsnotify.h) \\ $(wildcard include/config/fs/encryption.h) \\ $(wildcard include/config/epoll.h) \\ $(wildcard include/config/file/locking.h) \\ $(wildcard include/config/quota.h) \\ $(wildcard include/config/fs/dax.h) \\ $(wildcard include/config/mandatory/file/locking.h) \\ $(wildcard include/config/migration.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/wait_bit.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kdev_t.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/kdev_t.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/dcache.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rculist_bl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/list_bl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/bit_spinlock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/lockref.h \\ $(wildcard include/config/arch/use/cmpxchg/lockref.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/stringhash.h \\ $(wildcard include/config/dcache/word/access.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/hash.h \\ $(wildcard include/config/have/arch/hash.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/path.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/list_lru.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/shrinker.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/xarray.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/mm_types.h \\ $(wildcard include/config/have/aligned/struct/page.h) \\ $(wildcard include/config/userfaultfd.h) \\ $(wildcard include/config/have/arch/compat/mmap/bases.h) \\ $(wildcard include/config/membarrier.h) \\ $(wildcard include/config/aio.h) \\ $(wildcard include/config/mmu/notifier.h) \\ $(wildcard include/config/hmm.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/auxvec.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/auxvec.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/auxvec.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/uprobes.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/mmu.h \\ $(wildcard include/config/unmap/kernel/at/el0.h) \\ $(wildcard include/config/harden/branch/predictor.h) \\ $(wildcard include/config/harden/el2/vectors.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/capability.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/capability.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/semaphore.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/fcntl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/fcntl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/fcntl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/fcntl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/fiemap.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/migrate_mode.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/percpu-rwsem.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rcuwait.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rcu_sync.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/delayed_call.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/uuid.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/uuid.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/errseq.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/ioprio.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sched/rt.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/iocontext.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/fs.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/limits.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/ioctl.h \\ arch/arm64/include/generated/uapi/asm/ioctl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/ioctl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/ioctl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/quota.h \\ $(wildcard include/config/quota/netlink/interface.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/percpu_counter.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/dqblk_xfs.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/dqblk_v1.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/dqblk_v2.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/dqblk_qtree.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/projid.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/quota.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/nfs_fs_i.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/aio_abi.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/uaccess.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/uaccess.h \\ $(wildcard include/config/arm64/pan.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/kernel-pgtable.h \\ $(wildcard include/config/randomize/base.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/pgtable.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/proc-fns.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/pgtable-prot.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/fixmap.h \\ $(wildcard include/config/acpi/apei/ghes.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/boot.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/fixmap.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/pgtable.h \\ $(wildcard include/config/have/arch/transparent/hugepage/pud.h) \\ $(wildcard include/config/have/arch/soft/dirty.h) \\ $(wildcard include/config/arch/enable/thp/migration.h) \\ $(wildcard include/config/have/arch/huge/vmap.h) \\ $(wildcard include/config/x86/espfix64.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/extable.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/unistd.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/unistd.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/unistd.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/unistd.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/unistd.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/syscall_wrapper.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/elf.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/elf.h \\ arch/arm64/include/generated/asm/user.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/user.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/elf.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/elf-em.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/seq_file.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/cred.h \\ $(wildcard include/config/debug/credentials.h) \\ $(wildcard include/config/keys.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/key.h \\ $(wildcard include/config/sysctl.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sysctl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/sysctl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/assoc_array.h \\ $(wildcard include/config/associative/array.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/selinux.h \\ $(wildcard include/config/security/selinux.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sched/user.h \\ $(wildcard include/config/fanotify.h) \\ $(wildcard include/config/posix/mqueue.h) \\ $(wildcard include/config/bpf/syscall.h) \\ $(wildcard include/config/net.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/delay.h \\ arch/arm64/include/generated/asm/delay.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/delay.h \\ arch/arm64/kernel/cpuinfo.o: $(deps_arch/arm64/kernel/cpuinfo.o) $(deps_arch/arm64/kernel/cpuinfo.o): ",16305,True,5310.179633526731,median "/* StringLineU8x8.ino Universal 8bit Graphics Library (https://github.com/olikraus/u8g2/) Copyright (c) 2016, olikraus@gmail.com All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #include /* Preconditions: Uno with DOGS102 Shield */ // Please UNCOMMENT one of the contructor lines below // U8x8 Contructor List // The complete list is available here: https://github.com/olikraus/u8g2/wiki/u8x8setupcpp // Please update the pin numbers according to your setup. Use U8X8_PIN_NONE if the reset pin is not connected //U8X8_NULL u8x8; // null device, a 8x8 pixel display which does nothing //U8X8_SSD1306_128X64_NONAME_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1306_128X64_NONAME_4W_HW_SPI u8x8(/* cs=*/ 6, /* dc=*/ 4, /* reset=*/ 12); // Arduboy (DevKit) //U8X8_SSD1306_128X64_NONAME_4W_HW_SPI u8x8(/* cs=*/ 12, /* dc=*/ 4, /* reset=*/ 6); // Arduboy 10 (Production, Kickstarter Edition) //U8X8_SSD1306_128X64_NONAME_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1306_128X64_NONAME_3W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* reset=*/ 8); //U8X8_SSD1306_128X64_NONAME_3W_HW_SPI u8x8(/* cs=*/ 10, /* reset=*/ 8); //U8X8_SSD1306_128X64_NONAME_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_SSD1306_128X64_ALT0_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); // same as the NONAME variant, but may solve the ""every 2nd line skipped"" problem //U8X8_SSD1306_128X64_NONAME_SW_I2C u8x8(/* clock=*/ 2, /* data=*/ 0, /* reset=*/ U8X8_PIN_NONE); // Digispark ATTiny85 //U8X8_SSD1306_128X64_NONAME_SW_I2C u8x8(/* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // OLEDs without Reset of the Display //U8X8_SSD1306_128X64_VCOMH0_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but maximizes setContrast() range //U8X8_SSD1306_128X64_ALT0_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but may solve the ""every 2nd line skipped"" problem //U8X8_SSD1306_102X64_EA_OLEDS102_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but may solve the ""every 2nd line skipped"" problem //U8X8_SH1106_128X64_NONAME_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SH1106_128X64_NONAME_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_SH1106_128X64_VCOMH0_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but maximizes setContrast() range //U8X8_SH1106_128X64_WINSTAR_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but uses updated SH1106 init sequence //U8X8_SH1106_128X32_VISIONOX_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_SH1106_128X32_VISIONOX_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SH1106_72X40_WISE_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SH1107_64X128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SH1107_128X128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SH1107_128X128_HW_I2C u8x8(/* reset=*/ 8); //U8X8_SH1107_PIMORONI_128X128_HW_I2C u8x8(/* reset=*/ 8); //U8X8_SH1107_SEEED_128X128_SW_I2C u8x8(/* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); //U8X8_SH1107_SEEED_128X128_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_SH1107_SEEED_96X96_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SH1108_160X160_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1306_128X32_UNIVISION_SW_I2C u8x8(/* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // Adafruit Feather ESP8266/32u4 Boards + FeatherWing OLED //U8X8_SSD1306_128X32_UNIVISION_SW_I2C u8x8(/* clock=*/ 21, /* data=*/ 20, /* reset=*/ U8X8_PIN_NONE); // Adafruit Feather M0 Basic Proto + FeatherWing OLED //U8X8_SSD1306_128X32_UNIVISION_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); // Adafruit ESP8266/32u4/ARM Boards + FeatherWing OLED //U8X8_SSD1306_128X32_UNIVISION_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE, /* clock=*/ SCL, /* data=*/ SDA); // pin remapping with ESP8266 HW I2C //U8X8_SSD1306_128X32_WINSTAR_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE, /* clock=*/ SCL, /* data=*/ SDA); // pin remapping with ESP8266 HW I2C //U8X8_SSD1306_64X48_ER_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); // EastRising 0.66"" OLED breakout board, Uno: A4=SDA, A5=SCL, 5V powered //U8X8_SSD1306_48X64_WINSTAR_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_SSD1306_64X32_NONAME_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_SSD1306_64X32_1F_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_SSD1306_96X16_ER_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); // EastRising 0.69"" //U8X8_SSD1306_72X40_ER_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); // EastRising 0.42"" //U8X8_SSD1306_128X64_NONAME_6800 u8x8(13, 11, 2, 3, 4, 5, 6, A4, /*enable=*/ 7, /*cs=*/ 10, /*dc=*/ 9, /*reset=*/ 8); //U8X8_SSD1306_128X64_NONAME_8080 u8x8(13, 11, 2, 3, 4, 5, 6, A4, /*enable=*/ 7, /*cs=*/ 10, /*dc=*/ 9, /*reset=*/ 8); //U8X8_SSD1309_128X64_NONAME0_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1309_128X64_NONAME0_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1309_128X64_NONAME2_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1309_128X64_NONAME2_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1316_128X32_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1316_128X32_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1317_96X96_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // not tested, not confirmed //U8X8_SSD1317_96X96_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // not tested, not confirmed //U8X8_SSD1318_128X96_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1318_128X96_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1320_160X132_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1320_160X132_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1322_NHD_256X64_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1322_NHD_256X64_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1322_NHD_128X64_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1322_NHD_128X64_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1325_NHD_128X64_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1325_NHD_128X64_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD0323_OS128064_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD0323_OS128064_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1326_ER_256X32_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // experimental driver for ER-OLED018-1 //U8X8_SSD1327_SEEED_96X96_SW_I2C u8x8(/* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // Seeedstudio Grove OLED 96x96 //U8X8_SSD1327_SEEED_96X96_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); // Seeedstudio Grove OLED 96x96 //U8X8_SSD1327_EA_W128128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1327_EA_W128128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1327_MIDAS_128X128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1327_MIDAS_128X128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1327_WS_128X128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1327_WS_128X128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1327_VISIONOX_128X96_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1327_VISIONOX_128X96_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1329_128X96_NONAME_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1329_128X96_NONAME_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1329_96X96_NONAME_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1329_96X96_NONAME_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1329_96X96_NONAME_4W_HW_SPI u8x8(/* cs=*/ A4, /* dc=*/ A2, /* reset=*/ U8X8_PIN_NONE); // Adafruit Feather 32u4 Basic Proto //U8X8_SSD1305_128X32_NONAME_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1305_128X32_NONAME_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1305_128X32_ADAFRUIT_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1305_128X32_ADAFRUIT_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1305_128X64_ADAFRUIT_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1305_128X64_ADAFRUIT_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1305_128X64_RAYSTAR_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1305_128X64_RAYSTAR_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_KS0108_128X64 u8x8(8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*dc=*/ 17, /*cs0=*/ 14, /*cs1=*/ 15, /*cs2=*/ U8X8_PIN_NONE, /* reset=*/ U8X8_PIN_NONE); // Set R/W to low! //U8X8_KS0108_ERM19264 u8x8(8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*dc=*/ 17, /*cs0=*/ 14, /*cs1=*/ 15, /*cs2=*/ 16, /* reset=*/ U8X8_PIN_NONE); // Set R/W to low! //U8X8_HD44102_100X64 u8x8(4, 5, 6, 7, 8, 9, 10, 11, /*enable=*/ 2, /*dc=*/ 3, /*cs0=*/ A0, /*cs1=*/ A1, /*cs2=*/ A2, /* reset=*/ U8X8_PIN_NONE); // Set R/W to low! //U8X8_T7932_150X32 u8x8(4, 5, 6, 7, 8, 9, 10, 11, /*enable=*/ 2, /*dc=*/ 3, /*cs0=*/ A0, /*cs1=*/ A1, /*cs2=*/ A2, /* reset=*/ U8X8_PIN_NONE); // Set R/W to low! //U8X8_UC1701_EA_DOGS102_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1701_EA_DOGS102_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_PCD8544_84X48_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Nokia 5110 Display //U8X8_PCD8544_84X48_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Nokia 5110 Display //U8X8_PCF8812_96X65_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Could be also PCF8814 //U8X8_PCF8812_96X65_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Could be also PCF8814 //U8X8_HX1230_96X68_3W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* reset=*/ 8); //U8X8_HX1230_96X68_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7528_ERC16064_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7528_ERC16064_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_EA_DOGM128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_EA_DOGM128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_64128N_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_64128N_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_EA_DOGM132_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); // DOGM132 Shield //U8X8_ST7565_EA_DOGM132_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); // DOGM132 Shield //U8X8_ST7565_ZOLEN_128X64_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_ZOLEN_128X64_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_LM6059_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Adafruit ST7565 GLCD //U8X8_ST7565_LM6059_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Adafruit ST7565 GLCD //U8X8_ST7565_KS0713_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // KS0713 controller //U8X8_ST7565_KS0713_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // KS0713 controller //U8X8_ST7565_LX12864_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_LX12864_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_ERC12864_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_ERC12864_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_ERC12864_ALT_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // contrast improved version for ERC12864 //U8X8_ST7565_ERC12864_ALT_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // contrast improved version for ERC12864 //U8X8_ST7565_NHD_C12832_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_NHD_C12832_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_NHD_C12864_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_NHD_C12864_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_JLX12864_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_JLX12864_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_PI_132X64_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); // Pax Instruments Shield, LCD_BL=6 //U8X8_ST7567_PI_132X64_4W_HW_SPI u8x8(/* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); // Pax Instruments Shield, LCD_BL=6 //U8X8_ST7567_JLX12864_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_JLX12864_4W_HW_SPI u8x8(/* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_OS12864_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_OS12864_4W_HW_SPI u8x8(/* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_ENH_DG128064_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_ENH_DG128064_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_ENH_DG128064I_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_ENH_DG128064I_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_64X32_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_ST7567_HEM6432_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_ST7571_128X128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7571_128X128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7571_128X96_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7571_128X96_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX172104_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX172104_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX19296_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX19296_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256128_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_WO256X128_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_WO256X128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256160_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256160_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256160M_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256160M_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256160_ALT_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256160_ALT_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX240160_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX240160_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX25664_2ND_HW_I2C u8x8(/* reset=*/ 8); // Due, 2nd I2C //U8X8_ST75320_JLX320240_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75320_JLX320240_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_NT7534_TG12864R_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_NT7534_TG12864R_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7588_JLX12864_SW_I2C u8x8(/* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ 5); //U8X8_ST7588_JLX12864_HW_I2C u8x8(/* reset=*/ 5); //U8X8_IST3020_ERC19264_6800 u8x8(44, 43, 42, 41, 40, 39, 38, 37, /*enable=*/ 28, /*cs=*/ 32, /*dc=*/ 30, /*reset=*/ 31); // Connect WR pin with GND //U8X8_IST3020_ERC19264_8080 u8x8(44, 43, 42, 41, 40, 39, 38, 37, /*enable=*/ 29, /*cs=*/ 32, /*dc=*/ 30, /*reset=*/ 31); // Connect RD pin with 3.3V //U8X8_IST3020_ERC19264_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_IST7920_128X128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Round display //U8X8_IST7920_128X128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Round display //U8X8_UC1601_128X32_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1601_128X32_3W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* reset=*/ 8); //U8X8_UC1601_128X64_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1604_JLX19264_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1604_JLX19264_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1608_ERC24064_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Due, SW SPI, ERC24064-1 Test Board //U8X8_UC1608_DEM240064_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Due, SW SPI, ERC24064-1 Test Board //U8X8_UC1608_ERC240120_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1608_240X128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1610_EA_DOGXL160_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8X8_UC1610_EA_DOGXL160_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8X8_UC1611_EA_DOGM240_2ND_HW_I2C u8x8(/* reset=*/ 8); // Due, 2nd I2C, DOGM240 Test Board //U8X8_UC1611_EA_DOGM240_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // SW SPI, Due DOGXL240 Test Board //U8X8_UC1611_EA_DOGXL240_2ND_HW_I2C u8x8(/* reset=*/ 8); // Due, 2nd I2C, DOGXL240 Test Board //U8X8_UC1611_EA_DOGXL240_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // SW SPI, Due DOGXL240 Test Board //U8X8_UC1611_IDS4073_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1611_IDS4073_4W_HW_SPI u8x8( /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1611_EW50850_8080 u8x8(8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 3, /*dc=*/ 16, /*reset=*/ 17); // 240x160, Connect RD/WR1 pin with 3.3V, CS is aktive high //U8X8_UC1611_CG160160_8080 u8x8(8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 3, /*dc=*/ 16, /*reset=*/ 17); // Connect WR1 and CD1 pin with 3.3V, connect CS0 with cs, WR0 with enable, CD with dc //U8X8_UC1617_JLX128128_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1617_JLX128128_4W_HW_SPI u8x8( /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1638_192X96_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1638_192X96_4W_HW_SPI u8x8( /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1638_192X96_SW_I2C u8x8(/* clock=*/ 13, /* data=*/ 11, /* reset=*/ 8); // u8g2 test board: I2C clock/data is same as SPI, I2C default address is 0x78 //U8X8_SSD1606_172X72_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // eInk/ePaper Display //U8X8_SSD1607_200X200_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // eInk/ePaper Display, original LUT from embedded artists //U8X8_SSD1607_GS_200X200_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Good Display //U8X8_SSD1607_WS_200X200_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Waveshare //U8X8_IL3820_296X128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // eInk/ePaper Display, original LUT //U8X8_IL3820_V2_296X128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // eInk/ePaper Display, optimized (lesser screen flicker) //U8X8_ST7511_AVD_320X240_8080 u8x8(13, 11, 2, 3, 4, 5, 6, A4, /*enable/WR=*/ 7, /*cs=*/ 10, /*dc=*/ 9, /*reset=*/ 8); // Connect RD pin with 3.3V/5V //U8X8_S1D15721_240X64_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_S1D15721_240X64_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // End of constructor list void setup(void) { // DOGS102 Shield (http://shieldlist.org/controlconnection/dogs102) //u8x8.begin(/* menu_select_pin= */ 5, /* menu_next_pin= */ 4, /* menu_prev_pin= */ 2, /* menu_home_pin= */ 3); // DOGM128 Shield (http://shieldlist.org/schmelle2/dogm128) + DOGXL160 Shield u8x8.begin(/* menu_select_pin= */ 2, /* menu_next_pin= */ 3, /* menu_prev_pin= */ 7, /* menu_home_pin= */ 8); u8x8.setFont(u8x8_font_chroma48medium8_r); } const char *string_list = ""\\tAltocumulus\\n"" ""\\tAltostratus\\n"" ""\\tCirrocumulus\\n"" ""\\tCirrostratus\\n"" ""\\tCirrus\\n"" ""\\tCumulonimbus\\n"" ""\\tCumulus\\n"" ""\\tNimbostratus\\n"" ""\\tStratocumulus\\n"" ""\\tStratus""; uint8_t current_selection = 0; void loop(void) { current_selection = u8x8_UserInterfaceSelectionList( u8x8.getU8x8(), ""\\tCloud Types\\n\\t-----------"", current_selection, string_list); u8x8_UserInterfaceMessage( u8x8.getU8x8(), ""\\tSelection:"", u8x8_GetStringLineStart(current_selection, string_list ), """", "" ok \\n cancel ""); } ",12537,True,3772.9766222943153,median "// Animated eyes for Adafruit MONSTER M4SK and HALLOWING M4 dev boards. // This code is pretty tightly coupled to the resources of these boards // (one or two ST7789 240x240 pixel TFTs on separate SPI buses, and a // SAMD51 microcontroller), and not as generally portable as the prior // ""Uncanny Eyes"" project (better for SAMD21 chips or Teensy 3.X and // 128x128 TFT or OLED screens, single SPI bus). // IMPORTANT: in rare situations, a board may get ""bricked"" when running // this code while simultaneously connected to USB. A quick-flashing status // LED indicates the filesystem has gone corrupt. If this happens, install // CircuitPython to reinitialize the filesystem, copy over your eye files // (keep backups!), then re-upload this code. It seems to happen more often // at high optimization settings (above -O3), but there's not 1:1 causality. // The exact cause has not yet been found...possibly insufficient yield() // calls, or some rare alignment in the Arcada library or USB-handling code. // LET'S HAVE A WORD ABOUT COORDINATE SYSTEMS before continuing. From an // outside observer's point of view, looking at the display(s) on these // boards, the eyes are rendered COLUMN AT A TIME, working LEFT TO RIGHT, // rather than the horizontal scanline order of Uncanny Eyes and most other // graphics-heavy code. It was found much easier to animate the eyelids when // working along this axis. A ""column major"" display is easily achieved by // setting the screen(s) to ROTATION 3, which is a 90 degree // counterclockwise rotation relative to the default. This places (0,0) at // the BOTTOM-LEFT of the display, with +X being UP and +Y being RIGHT -- // so, conceptually, just swapping axes you have a traditional Cartesian // coordinate system and trigonometric functions work As Intended, and the // code tends to ""think"" that way in most places. Since the rotation is done // in hardware though...from the display driver's point of view, one might // think of these as ""horizontal"" ""scanlines,"" and that the eye is being // drawn sideways, with a left and right eyelid rather than bottom and top. // Just mentioning it here because there may still be lingering comments // and/or variables in the code where I refer to ""scanlines"" even though // visually/spatially these are columns. Will do my best to comment local // coordinate systems in different spots. (Any raster images loaded by // Adafruit_ImageReader are referenced in typical +Y = DOWN order.) // Oh also, ""left eye"" and ""right eye"" refer to the MONSTER'S left and // right. From an observer's point of view, looking AT the monster, the // ""right eye"" is on the left. #if !defined(USE_TINYUSB) #error ""Please select Tools->USB Stack->TinyUSB before compiling"" #endif #define GLOBAL_VAR #include ""globals.h"" // Global eye state that applies to all eyes (not per-eye): bool eyeInMotion = false; float eyeOldX, eyeOldY, eyeNewX, eyeNewY; uint32_t eyeMoveStartTime = 0L; int32_t eyeMoveDuration = 0L; uint32_t lastSaccadeStop = 0L; int32_t saccadeInterval = 0L; // Some sloppy eye state stuff, some carried over from old eye code... // kinda messy and badly named and will get cleaned up/moved/etc. uint32_t timeOfLastBlink = 0L, timeToNextBlink = 0L; int xPositionOverMap = 0; int yPositionOverMap = 0; uint8_t eyeNum = 0; uint32_t frames = 0; uint32_t lastFrameRateReportTime = 0; uint32_t lastLightReadTime = 0; float lastLightValue = 0.5; double irisValue = 0.5; int iPupilFactor = 42; uint32_t boopSum = 0, boopSumFiltered = 0; static bool booped = false; int fixate = 7; uint8_t lightSensorFailCount = 0; // For autonomous iris scaling #define IRIS_LEVELS 7 float iris_prev[IRIS_LEVELS] = { 0 }; float iris_next[IRIS_LEVELS] = { 0 }; uint16_t iris_frame = 0; // Callback invoked after each SPI DMA transfer - sets a flag indicating // the next line of graphics can be issued as soon as its ready. static void dma_callback(Adafruit_ZeroDMA *dma) { // It's possible to assign each DMA channel its own callback function // (freeing up a few cycles vs. this channel-to-eye lookup), but it's // written this way to scale to as many eyes as needed (up to one per // SERCOM if this is ported to something like Grand Central). for(uint8_t e=0; e50MHz SPI was fun but just too glitchy to rely on //#if F_CPU < 200000000 // #define DISPLAY_FREQ (F_CPU / 2) // #define DISPLAY_CLKSRC SERCOM_CLOCK_SOURCE_FCPU //#else #define DISPLAY_FREQ 50000000 #define DISPLAY_CLKSRC SERCOM_CLOCK_SOURCE_100M //#endif SPISettings settings(DISPLAY_FREQ, MSBFIRST, SPI_MODE0); // The time required to issue one scanline (DISPLAY_SIZE pixels x 16 bits) over // SPI is a known(ish) quantity. The DMA scheduler isn't always perfectly // deterministic though...especially on startup, as things make their way // into caches. Very occasionally, something (not known yet) is causing // SPI DMA to seize up. This condition is pretty easy to check for... // periodically the code needs to wait on a DMA transfer to finish // anyway, and we can use the micros() function to determine if it's taken // considerably longer than expected (a factor of 4 is used - the ""4000"" // below, to allow for caching/scheduling fudge). If so, that's our signal // that something is likely amiss and we take evasive maneuvers, resetting // the affected DMA channel (DMAbuddy::fix()). #define DMA_TIMEOUT (uint32_t)((DISPLAY_SIZE * 16 * 4000) / (DISPLAY_FREQ / 1000)) static inline uint16_t readBoop(void) { uint16_t counter = 0; pinMode(boopPin, OUTPUT); digitalWrite(boopPin, HIGH); pinMode(boopPin, INPUT); while(digitalRead(boopPin) && (++counter < 1000)); return counter; } // Crude error handler. Prints message to Serial Monitor, blinks LED. void fatal(const char *message, uint16_t blinkDelay) { Serial.begin(9600); Serial.println(message); for(bool ledState = HIGH;; ledState = !ledState) { digitalWrite(LED_BUILTIN, ledState); delay(blinkDelay); } } #include // sbrk() function uint32_t availableRAM(void) { char top; // Local variable pushed on stack return &top - (char *)sbrk(0); // Top of stack minus end of heap } // SETUP FUNCTION - CALLED ONCE AT PROGRAM START --------------------------- void setup() { if(!arcada.arcadaBegin()) fatal(""Arcada init fail!"", 100); #if defined(USE_TINYUSB) if(!arcada.filesysBeginMSD()) fatal(""No filesystem found!"", 250); #else if(!arcada.filesysBegin()) fatal(""No filesystem found!"", 250); #endif user_setup(); arcada.displayBegin(); // Backlight(s) off ASAP, they'll switch on after screen(s) init & clear arcada.setBacklight(0); DISPLAY_SIZE = min(ARCADA_TFT_WIDTH, ARCADA_TFT_HEIGHT); Serial.begin(115200); //while(!Serial) yield(); Serial.printf(""Available RAM at start: %d\\n"", availableRAM()); Serial.printf(""Available flash at start: %d\\n"", arcada.availableFlash()); yield(); // Periodic yield() makes sure mass storage filesystem stays alive // No file selector yet. In the meantime, you can override the default // config file by holding one of the 3 edge buttons at startup (loads // config1.eye, config2.eye or config3.eye instead). Keep fingers clear // of the nose booper when doing this...it self-calibrates on startup. // DO THIS BEFORE THE SPLASH SO IT DOESN'T REQUIRE A LENGTHY HOLD. char *filename = (char *)""config.eye""; uint32_t buttonState = arcada.readButtons(); if((buttonState & ARCADA_BUTTONMASK_UP) && arcada.exists(""config1.eye"")) { filename = (char *)""config1.eye""; } else if((buttonState & ARCADA_BUTTONMASK_A) && arcada.exists(""config2.eye"")) { filename = (char *)""config2.eye""; } else if((buttonState & ARCADA_BUTTONMASK_DOWN) && arcada.exists(""config3.eye"")) { filename = (char *)""config3.eye""; } yield(); // Initialize display(s) #if (NUM_EYES > 1) eye[0].display = arcada._display; eye[1].display = arcada.display2; #else eye[0].display = arcada.display; #endif // Initialize DMAs yield(); uint8_t e; for(e=0; esetClockSource(DISPLAY_CLKSRC); // Accelerate SPI! #endif eye[e].display->fillScreen(0); eye[e].dma.allocate(); eye[e].dma.setTrigger(eye[e].spi->getDMAC_ID_TX()); eye[e].dma.setAction(DMA_TRIGGER_ACTON_BEAT); eye[e].dptr = eye[e].dma.addDescriptor(NULL, NULL, 42, DMA_BEAT_SIZE_BYTE, false, false); eye[e].dma.setCallback(dma_callback); eye[e].dma.setPriority(DMA_PRIORITY_0); uint32_t spi_data_reg = (uint32_t)eye[e].spi->getDataRegister(); for(int i=0; i<2; i++) { // For each of 2 scanlines... for(int j=0; j 1) { // Load on other eye too, ignore status yield(); arcada.drawBMP((char *)""/splash.bmp"", 0, 0, eye[1].display); } // Ramp up backlight over 1/2 sec duration startTime = millis(); while ((elapsed = (millis() - startTime)) <= 500) { yield(); arcada.setBacklight(255 * elapsed / 500); } arcada.setBacklight(255); // To the max startTime = millis(); // Note current time for backlight hold later } } // If no splash, or load failed, turn backlight on early so user gets a // little feedback, that the board is not locked up, just thinking. if (!showSplashScreen) arcada.setBacklight(255); // LOAD CONFIGURATION FILE ----------------------------------------------- loadConfig(filename); // LOAD EYELIDS AND TEXTURE MAPS ----------------------------------------- // Experiencing a problem with MEMORY FRAGMENTATION when loading texture // maps. These images only occupy RAM temporarily -- they're copied to // internal flash memory and then freed. However, something is preventing // the freed memory from restoring to a contiguous block. For example, // if a texture image equal to about 50% of RAM is loaded/copied/freed, // following this with a larger texture (or trying to allocate a larger // polar lookup array) fails because RAM is fragmented into two segments. // I've been through this code, Adafruit_ImageReader and Adafruit_GFX // pretty carefully and they appear to be freeing RAM in the reverse order // that they allocate (which should avoid fragmentation), but I'm likely // overlooking something there or additional allocations are occurring // in other libraries -- perhaps the filesystem and/or mass storage code. // SO, here is the DIRTY WORKAROUND... // Adafruit_ImageReader provides a bmpDimensions() function to determine // the pixel size of an image without actually loading it. We can use this // to estimate the RAM requirements for loading the image, then allocate // a ""booster seat"" which makes the subsequent image load occur in higher // memory, and the fragmenting part a bit beyond that. When the image and // booster are both freed, that should restore a large contiguous chunk, // leaving the fragments in high memory. Not TOO high though, we need to // leave some RAM for the stack to operate over the lifetime of this // program and to handle small heap allocations. uint32_t maxRam = availableRAM() - stackReserve; // Load texture maps for eyes uint8_t e2; for(e=0; e= e)) { // If first eye, or no match found... // If no iris filename was specified, or if file fails to load... if((eye[e].iris.filename == NULL) || (loadTexture(eye[e].iris.filename, &eye[e].iris.data, &eye[e].iris.width, &eye[e].iris.height, maxRam) != IMAGE_SUCCESS)) { // Point iris data at the color variable and set image size to 1px eye[e].iris.data = &eye[e].iris.color; eye[e].iris.width = eye[e].iris.height = 1; } // Huh. The booster seat idea STILL doesn't always work right, // something leaking in upper memory. Keep shrinking down the // booster seat size a bit each time we load a texture. Feh. maxRam -= 20; } // Repeat for sclera... for(e2=0; e2= e)) { // If first eye, or no match found... // If no sclera filename was specified, or if file fails to load... if((eye[e].sclera.filename == NULL) || (loadTexture(eye[e].sclera.filename, &eye[e].sclera.data, &eye[e].sclera.width, &eye[e].sclera.height, maxRam) != IMAGE_SUCCESS)) { // Point sclera data at the color variable and set image size to 1px eye[e].sclera.data = &eye[e].sclera.color; eye[e].sclera.width = eye[e].sclera.height = 1; } maxRam -= 20; // See note above } } // Load eyelid graphics. yield(); ImageReturnCode status; status = loadEyelid(upperEyelidFilename ? upperEyelidFilename : (char *)""upper.bmp"", upperClosed, upperOpen, DISPLAY_SIZE-1, maxRam); status = loadEyelid(lowerEyelidFilename ? lowerEyelidFilename : (char *)""lower.bmp"", lowerOpen, lowerClosed, 0, maxRam); // Filenames are no longer needed... for(e=0; eVAL + analogRead(A2)); eyeOldX = eyeNewX = eyeOldY = eyeNewY = mapRadius; // Start in center for(e=0; esetRotation(eye[e].rotation); eye[e].eyeX = eyeOldX; // Set up initial position eye[e].eyeY = eyeOldY; } if (showSplashScreen) { // Image(s) loaded above? // Hold backlight on for up to 2 seconds (minus other initialization time) if ((elapsed = (millis() - startTime)) < 2000) { delay(2000 - elapsed); } // Ramp down backlight over 1/2 sec duration startTime = millis(); while ((elapsed = (millis() - startTime)) <= 500) { yield(); arcada.setBacklight(255 - (255 * elapsed / 500)); } arcada.setBacklight(0); for(e=0; efillScreen(0); } } #if defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) if(voiceOn) { if(!voiceSetup((waveform > 0))) { Serial.println(""Voice init fail, continuing without""); voiceOn = false; } else { voiceGain(gain); currentPitch = voicePitch(currentPitch); if(waveform) voiceMod(modulate, waveform); arcada.enableSpeaker(true); } } #endif arcada.setBacklight(255); // Back on, impending graphics yield(); if(boopPin >= 0) { boopThreshold = 0; for(int i=0; i= NUM_EYES) eyeNum = 0; // Cycle through eyes... uint8_t x = eye[eyeNum].colNum; uint32_t t = micros(); // If next column for this eye is not yet rendered... if(!eye[eyeNum].column_ready) { if(!x) { // If it's the first column... // ONCE-PER-FRAME EYE ANIMATION LOGIC HAPPENS HERE ------------------- // Eye movement float eyeX, eyeY; if(moveEyesRandomly) { int32_t dt = t - eyeMoveStartTime; // uS elapsed since last eye event if(eyeInMotion) { // Eye currently moving? if(dt >= eyeMoveDuration) { // Time up? Destination reached. eyeInMotion = false; // Stop moving // The ""move"" duration temporarily becomes a hold duration... // Normally this is 35 ms to 1 sec, but don't exceed gazeMax setting uint32_t limit = min(1000000, gazeMax); eyeMoveDuration = random(35000, limit); // Time between microsaccades if(!saccadeInterval) { // Cleared when ""big"" saccade finishes lastSaccadeStop = t; // Time when saccade stopped saccadeInterval = random(eyeMoveDuration, gazeMax); // Next in 30ms to 3sec } // Similarly, the ""move"" start time becomes the ""stop"" starting time... eyeMoveStartTime = t; // Save time of event eyeX = eyeOldX = eyeNewX; // Save position eyeY = eyeOldY = eyeNewY; } else { // Move time's not yet fully elapsed -- interpolate position float e = (float)dt / float(eyeMoveDuration); // 0.0 to 1.0 during move e = 3 * e * e - 2 * e * e * e; // Easing function: 3*e^2-2*e^3 0.0 to 1.0 eyeX = eyeOldX + (eyeNewX - eyeOldX) * e; // Interp X eyeY = eyeOldY + (eyeNewY - eyeOldY) * e; // and Y } } else { // Eye is currently stopped eyeX = eyeOldX; eyeY = eyeOldY; if(dt > eyeMoveDuration) { // Time up? Begin new move. if((t - lastSaccadeStop) > saccadeInterval) { // Time for a ""big"" saccade // r is the radius in X and Y that the eye can go, from (0,0) in the center. float r = ((float)mapDiameter - (float)DISPLAY_SIZE * M_PI_2) * 0.75; eyeNewX = random(-r, r); float h = sqrt(r * r - eyeNewX * eyeNewX); eyeNewY = random(-h, h); // Set the duration for this move, and start it going. eyeMoveDuration = random(83000, 166000); // ~1/12 - ~1/6 sec saccadeInterval = 0; // Calc next interval when this one stops } else { // Microsaccade // r is possible radius of motion, ~1/10 size of full saccade. // We don't bother with clipping because if it strays just a little, // that's okay, it'll get put in-bounds on next full saccade. float r = (float)mapDiameter - (float)DISPLAY_SIZE * M_PI_2; r *= 0.07; float dx = random(-r, r); eyeNewX = eyeX - mapRadius + dx; float h = sqrt(r * r - dx * dx); eyeNewY = eyeY - mapRadius + random(-h, h); eyeMoveDuration = random(7000, 25000); // 7-25 ms microsaccade } eyeNewX += mapRadius; // Translate new point into map space eyeNewY += mapRadius; eyeMoveStartTime = t; // Save initial time of move eyeInMotion = true; // Start move on next frame } } } else { // Allow user code to control eye position (e.g. IR sensor, joystick, etc.) float r = ((float)mapDiameter - (float)DISPLAY_SIZE * M_PI_2) * 0.9; eyeX = mapRadius + eyeTargetX * r; eyeY = mapRadius + eyeTargetY * r; } // Eyes fixate (are slightly crossed) -- amount is filtered for boops int nufix = booped ? 90 : 7; fixate = ((fixate * 15) + nufix) / 16; // save eye position to this eye's struct so it's same throughout render if(eyeNum & 1) eyeX += fixate; // Eyes converge slightly toward center else eyeX -= fixate; eye[eyeNum].eyeX = eyeX; eye[eyeNum].eyeY = eyeY; // pupilFactor? irisValue? TO DO: pick a name and stick with it eye[eyeNum].pupilFactor = irisValue; // Also note - irisValue is calculated at the END of this function // for the next frame (because the sensor must be read when there's // no SPI traffic to the left eye) // Similar to the autonomous eye movement above -- blink start times // and durations are random (within ranges). if((t - timeOfLastBlink) >= timeToNextBlink) { // Start new blink? timeOfLastBlink = t; uint32_t blinkDuration = random(36000, 72000); // ~1/28 - ~1/14 sec // Set up durations for both eyes (if not already winking) for(uint8_t e=0; e upperOpen[ix]) { uq = 1.0; } else if(iy < upperClosed[ix]) { uq = 0.0; } else { uq = (float)(iy - upperClosed[ix]) / (float)(upperOpen[ix] - upperClosed[ix]); } if(booped) { uq = 0.9; lq = 0.7; } else { lq = 1.0 - uq; } } else { // If no tracking, eye is FULLY OPEN when not blinking uq = 1.0; lq = 1.0; } // Dampen eyelid movements slightly // SAVE upper & lower lid factors per eye, // they need to stay consistent across frame eye[eyeNum].upperLidFactor = (eye[eyeNum].upperLidFactor * 0.6) + (uq * 0.4); eye[eyeNum].lowerLidFactor = (eye[eyeNum].lowerLidFactor * 0.6) + (lq * 0.4); // Process blinks if(eye[eyeNum].blink.state) { // Eye currently blinking? // Check if current blink state time has elapsed if((t - eye[eyeNum].blink.startTime) >= eye[eyeNum].blink.duration) { if(++eye[eyeNum].blink.state > DEBLINK) { // Deblinking finished? eye[eyeNum].blink.state = NOBLINK; // No longer blinking eye[eyeNum].blinkFactor = 0.0; } else { // Advancing from ENBLINK to DEBLINK mode eye[eyeNum].blink.duration *= 2; // DEBLINK is 1/2 ENBLINK speed eye[eyeNum].blink.startTime = t; eye[eyeNum].blinkFactor = 1.0; } } else { eye[eyeNum].blinkFactor = (float)(t - eye[eyeNum].blink.startTime) / (float)eye[eyeNum].blink.duration; if(eye[eyeNum].blink.state == DEBLINK) eye[eyeNum].blinkFactor = 1.0 - eye[eyeNum].blinkFactor; } } // Periodically report frame rate. Really this is ""total number of // eyeballs drawn."" If there are two eyes, the overall refresh rate // of both screens is about 1/2 this. frames++; if(((t - lastFrameRateReportTime) >= 1000000) && t) { // Once per sec. Serial.println((frames * 1000) / (t / 1000)); lastFrameRateReportTime = t; } // Once per frame (of eye #0), reset boopSum... if((eyeNum == 0) && (boopPin >= 0)) { boopSumFiltered = ((boopSumFiltered * 3) + boopSum) / 4; if(boopSumFiltered > boopThreshold) { if(!booped) { Serial.println(""BOOP!""); } booped = true; } else { booped = false; } boopSum = 0; } float mins = (float)millis() / 60000.0; if(eye[eyeNum].iris.iSpin) { // Spin works in fixed amount per frame (eyes may lose sync, but ""wagon wheel"" tricks work) eye[eyeNum].iris.angle += eye[eyeNum].iris.iSpin; } else { // Keep consistent timing in spin animation (eyes stay in sync, no ""wagon wheel"" effects) eye[eyeNum].iris.angle = (int)((float)eye[eyeNum].iris.startAngle + eye[eyeNum].iris.spin * mins + 0.5); } if(eye[eyeNum].sclera.iSpin) { eye[eyeNum].sclera.angle += eye[eyeNum].sclera.iSpin; } else { eye[eyeNum].sclera.angle = (int)((float)eye[eyeNum].sclera.startAngle + eye[eyeNum].sclera.spin * mins + 0.5); } // END ONCE-PER-FRAME EYE ANIMATION ---------------------------------- } // end first-scanline check // PER-COLUMN RENDERING ------------------------------------------------ // Should be possible for these to be local vars, // but the animation becomes super chunky then, what gives? xPositionOverMap = (int)(eye[eyeNum].eyeX - (DISPLAY_SIZE/2.0)); yPositionOverMap = (int)(eye[eyeNum].eyeY - (DISPLAY_SIZE/2.0)); // These are constant across frame and could be stored in eye struct float upperLidFactor = (1.0 - eye[eyeNum].blinkFactor) * eye[eyeNum].upperLidFactor, lowerLidFactor = (1.0 - eye[eyeNum].blinkFactor) * eye[eyeNum].lowerLidFactor; iPupilFactor = (int)((float)eye[eyeNum].iris.height * 256 * (1.0 / eye[eyeNum].pupilFactor)); int y1, y2; int lidColumn = (eyeNum & 1) ? (DISPLAY_SIZE - 1 - x) : x; // Reverse eyelid columns for left eye DmacDescriptor *d = &eye[eyeNum].column[eye[eyeNum].colIdx].descriptor[0]; if(upperOpen[lidColumn] == 255) { // No eyelid data for this line; eyelid image is smaller than screen. // Great! Make a full scanline of nothing, no rendering needed: d->BTCTRL.bit.SRCINC = 0; d->BTCNT.reg = DISPLAY_SIZE * 2; d->SRCADDR.reg = (uint32_t)&eyelidIndex; d->DESCADDR.reg = 0; // No linked descriptor } else { y1 = lowerClosed[lidColumn] + (int)(0.5 + lowerLidFactor * (float)((int)lowerOpen[lidColumn] - (int)lowerClosed[lidColumn])); y2 = upperClosed[lidColumn] + (int)(0.5 + upperLidFactor * (float)((int)upperOpen[lidColumn] - (int)upperClosed[lidColumn])); if(y1 > DISPLAY_SIZE-1) y1 = DISPLAY_SIZE-1; // Clip results in case lidfactor else if(y1 < 0) y1 = 0; // is beyond the usual 0.0 to 1.0 range if(y2 > DISPLAY_SIZE-1) y2 = DISPLAY_SIZE-1; else if(y2 < 0) y2 = 0; if(y1 >= y2) { // Eyelid is fully or partially closed, enough that there are no // pixels to be rendered for this line. Make ""nothing,"" as above. d->BTCTRL.bit.SRCINC = 0; d->BTCNT.reg = DISPLAY_SIZE * 2; d->SRCADDR.reg = (uint32_t)&eyelidIndex; d->DESCADDR.reg = 0; // No linked descriptors } else { // If single eye, dynamically build descriptor list as needed, // else use a single descriptor & fully buffer each line. #if NUM_DESCRIPTORS > 1 DmacDescriptor *next; int renderlen; if(y1 > 0) { // Do upper eyelid unless at top of image d->BTCTRL.bit.SRCINC = 0; d->BTCNT.reg = y1 * 2; d->SRCADDR.reg = (uint32_t)&eyelidIndex; next = &eye[eyeNum].column[eye[eyeNum].colIdx].descriptor[1]; d->DESCADDR.reg = (uint32_t)next; // Link to next descriptor d = next; // Advance to next descriptor } // Partial column will be rendered renderlen = y2 - y1 + 1; d->BTCTRL.bit.SRCINC = 1; d->BTCNT.reg = renderlen * 2; d->SRCADDR.reg = (uint32_t)eye[eyeNum].column[eye[eyeNum].colIdx].renderBuf + renderlen * 2; // Point to END of data! #else // Full column will be rendered; DISPLAY_SIZE pixels, point source to end of // renderBuf and enable source increment. d->BTCTRL.bit.SRCINC = 1; d->BTCNT.reg = DISPLAY_SIZE * 2; d->SRCADDR.reg = (uint32_t)eye[eyeNum].column[eye[eyeNum].colIdx].renderBuf + DISPLAY_SIZE * 2; d->DESCADDR.reg = 0; // No linked descriptors #endif // Render column 'x' into eye's next available renderBuf uint16_t *ptr = eye[eyeNum].column[eye[eyeNum].colIdx].renderBuf; int xx = xPositionOverMap + x; int y; #if NUM_DESCRIPTORS == 1 // Render lower eyelid if needed for(y=0; y= 0) && (mx < mapDiameter) && (my >= 0) && (my < mapDiameter)) { // Inside polar angle/dist map int angle, dist, moff; if(my >= mapRadius) { if(mx >= mapRadius) { // Quadrant 1 // Use angle & dist directly mx -= mapRadius; my -= mapRadius; moff = my * mapRadius + mx; // Offset into map arrays angle = polarAngle[moff]; dist = polarDist[moff]; } else { // Quadrant 2 // ROTATE angle by 90 degrees (270 degrees clockwise; 768) // MIRROR dist on X axis mx = mapRadius - 1 - mx; my -= mapRadius; angle = polarAngle[mx * mapRadius + my] + 768; dist = polarDist[ my * mapRadius + mx]; } } else { if(mx < mapRadius) { // Quadrant 3 // ROTATE angle by 180 degrees // MIRROR dist on X & Y axes mx = mapRadius - 1 - mx; my = mapRadius - 1 - my; moff = my * mapRadius + mx; angle = polarAngle[moff] + 512; dist = polarDist[ moff]; } else { // Quadrant 4 // ROTATE angle by 270 degrees (90 degrees clockwise; 256) // MIRROR dist on Y axis mx -= mapRadius; my = mapRadius - 1 - my; angle = polarAngle[mx * mapRadius + my] + 256; dist = polarDist[ my * mapRadius + mx]; } } // Convert angle/dist to texture map coords if(dist >= 0) { // Sclera angle = ((angle + eye[eyeNum].sclera.angle) & 1023) ^ eye[eyeNum].sclera.mirror; int tx = angle * eye[eyeNum].sclera.width / 1024; // Texture map x/y int ty = dist * eye[eyeNum].sclera.height / 128; *ptr++ = eye[eyeNum].sclera.data[ty * eye[eyeNum].sclera.width + tx]; } else if(dist > -128) { // Iris or pupil int ty = dist * iPupilFactor / -32768; if(ty >= eye[eyeNum].iris.height) { // Pupil *ptr++ = eye[eyeNum].pupilColor; } else { // Iris angle = ((angle + eye[eyeNum].iris.angle) & 1023) ^ eye[eyeNum].iris.mirror; int tx = angle * eye[eyeNum].iris.width / 1024; *ptr++ = eye[eyeNum].iris.data[ty * eye[eyeNum].iris.width + tx]; } } else { *ptr++ = eye[eyeNum].backColor; // Back of eye } } else { *ptr++ = eye[eyeNum].backColor; // Off map, use back-of-eye color } } else { // Outside eyeball area *ptr++ = eyelidColor; } } #if NUM_DESCRIPTORS == 1 // Render upper eyelid if needed for(; y= (DISPLAY_SIZE-1)) { // No third descriptor; close it off d->DESCADDR.reg = 0; } else { next = &eye[eyeNum].column[eye[eyeNum].colIdx].descriptor[(y1 > 0) ? 2 : 1]; d->DESCADDR.reg = (uint32_t)next; // link to next descriptor d = next; // Increment descriptor d->BTCTRL.bit.SRCINC = 0; d->BTCNT.reg = ((DISPLAY_SIZE-1) - y2) * 2; d->SRCADDR.reg = (uint32_t)&eyelidIndex; d->DESCADDR.reg = 0; // end of descriptor list } #endif } } eye[eyeNum].column_ready = true; // Line is rendered! } // If DMA for this eye is currently busy, don't block, try next eye... if(eye[eyeNum].dma_busy) { if((micros() - eye[eyeNum].dmaStartTime) < DMA_TIMEOUT) return; // If we reach this point in the code, an SPI DMA transfer has taken // noticably longer than expected and is probably stalled (see comments // in the DMAbuddy.h file and above the DMA_TIMEOUT declaration earlier // in this code). Take action! // digitalWrite(13, HIGH); Serial.printf(""Eye #%d stalled, resetting DMA channel...\\n"", eyeNum); eye[eyeNum].dma.fix(); // If this somehow proves to be inadequate, we still have the Nuclear // Option of just completely restarting the sketch from the beginning, // though this stalls animation for several seconds during startup. // DO NOT enable this line unless the fix() function isn't fixing! //NVIC_SystemReset(); } // At this point, above checks confirm that column is ready and DMA is free if(!x) { // If it's the first column... // End prior SPI transaction... digitalWrite(eye[eyeNum].cs, HIGH); // Deselect eye[eyeNum].spi->endTransaction(); // Initialize new SPI transaction & address window... eye[eyeNum].spi->beginTransaction(settings); digitalWrite(eye[eyeNum].cs, LOW); // Chip select eye[eyeNum].display->setAddrWindow((eye[eyeNum].display->width() - DISPLAY_SIZE) / 2, (eye[eyeNum].display->height() - DISPLAY_SIZE) / 2, DISPLAY_SIZE, DISPLAY_SIZE); delayMicroseconds(1); digitalWrite(eye[eyeNum].dc, HIGH); // Data mode if(eyeNum == (NUM_EYES-1)) { // Handle pupil scaling if(lightSensorPin >= 0) { // Read light sensor, but not too often (Seesaw hates that) #define LIGHT_INTERVAL (1000000 / 10) // 10 Hz, don't poll Seesaw too often if((t - lastLightReadTime) >= LIGHT_INTERVAL) { // Fun fact: eyes have a ""consensual response"" to light -- both // pupils will react even if the opposite eye is stimulated. // Meaning we can get away with using a single light sensor for // both eyes. This comment has nothing to do with the code. uint16_t rawReading = arcada.readLightSensor(); if(rawReading <= 1023) { if(rawReading < lightSensorMin) rawReading = lightSensorMin; // Clamp light sensor range else if(rawReading > lightSensorMax) rawReading = lightSensorMax; // to within usable range float v = (float)(rawReading - lightSensorMin) / (float)(lightSensorMax - lightSensorMin); // 0.0 to 1.0 v = pow(v, lightSensorCurve); lastLightValue = irisMin + v * irisRange; lastLightReadTime = t; lightSensorFailCount = 0; } else { // I2C error if(++lightSensorFailCount >= 25) { // If repeated errors in succession... lightSensorPin = -1; // Stop trying to use the light sensor } else { lastLightReadTime = t - LIGHT_INTERVAL + 30000; // Try again in 30 ms } } } irisValue = (irisValue * 0.97) + (lastLightValue * 0.03); // Filter response for smooth reaction } else { // Not light responsive. Use autonomous iris w/fractal subdivision float n, sum = 0.5; for(uint16_t i=0; i iris min/max if((++iris_frame) >= (1 << IRIS_LEVELS)) iris_frame = 0; } #if defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) if(voiceOn) { // Read buttons, change pitch arcada.readButtons(); uint32_t buttonState = arcada.justPressedButtons(); if( buttonState & ARCADA_BUTTONMASK_UP) { currentPitch *= 1.05; } else if(buttonState & ARCADA_BUTTONMASK_A) { currentPitch = defaultPitch; } else if(buttonState & ARCADA_BUTTONMASK_DOWN) { currentPitch *= 0.95; } if(buttonState & (ARCADA_BUTTONMASK_UP | ARCADA_BUTTONMASK_A | ARCADA_BUTTONMASK_DOWN)) { currentPitch = voicePitch(currentPitch); if(waveform) voiceMod(modulate, waveform); Serial.print(""Voice pitch: ""); Serial.println(currentPitch); } } #endif user_loop(); } } // end first-column check // MUST read the booper when there’s no SPI traffic across the nose! if((eyeNum == (NUM_EYES-1)) && (boopPin >= 0)) { boopSum += readBoop(); } memcpy(eye[eyeNum].dptr, &eye[eyeNum].column[eye[eyeNum].colIdx].descriptor[0], sizeof(DmacDescriptor)); eye[eyeNum].dma_busy = true; eye[eyeNum].dma.startJob(); eye[eyeNum].dmaStartTime = micros(); if(++eye[eyeNum].colNum >= DISPLAY_SIZE) { // If last line sent... eye[eyeNum].colNum = 0; // Wrap to beginning } eye[eyeNum].colIdx ^= 1; // Alternate 0/1 line structs eye[eyeNum].column_ready = false; // OK to render next line } ",12472,False,2285.944488596425,median "/* HelloWorld.ino Universal 8bit Graphics Library (https://github.com/olikraus/u8g2/) Copyright (c) 2016, olikraus@gmail.com All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #ifdef U8X8_HAVE_HW_SPI #include #endif #ifdef U8X8_HAVE_HW_I2C #include #endif /* U8g2lib Example Overview: Frame Buffer Examples: clearBuffer/sendBuffer. Fast, but may not work with all Arduino boards because of RAM consumption Page Buffer Examples: firstPage/nextPage. Less RAM usage, should work with all Arduino boards. U8x8 Text Only Example: No RAM usage, direct communication with display controller. No graphics, 8x8 Text only. */ // Please UNCOMMENT one of the contructor lines below // U8g2 Contructor List (Frame Buffer) // The complete list is available here: https://github.com/olikraus/u8g2/wiki/u8g2setupcpp // Please update the pin numbers according to your setup. Use U8X8_PIN_NONE if the reset pin is not connected //U8G2_NULL u8g2(U8G2_R0); // null device, a 8x8 pixel display which does nothing //U8G2_SSD1306_128X64_NONAME_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1306_128X64_NONAME_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 12, /* dc=*/ 4, /* reset=*/ 6); // Arduboy (Production, Kickstarter Edition) //U8G2_SSD1306_128X64_NONAME_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1306_128X64_NONAME_F_3W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* reset=*/ 8); //U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); //U8G2_SSD1306_128X64_ALT0_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); // same as the NONAME variant, but may solve the ""every 2nd line skipped"" problem //U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* reset=*/ 8); //U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // All Boards without Reset of the Display //U8G2_SSD1306_128X64_NONAME_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ 16, /* data=*/ 17, /* reset=*/ U8X8_PIN_NONE); // ESP32 Thing, pure SW emulated I2C //U8G2_SSD1306_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE, /* clock=*/ 16, /* data=*/ 17); // ESP32 Thing, HW I2C with pin remapping //U8G2_SSD1306_128X64_NONAME_F_6800 u8g2(U8G2_R0, 13, 11, 2, 3, 4, 5, 6, A4, /*enable=*/ 7, /*cs=*/ 10, /*dc=*/ 9, /*reset=*/ 8); //U8G2_SSD1306_128X64_NONAME_F_8080 u8g2(U8G2_R0, 13, 11, 2, 3, 4, 5, 6, A4, /*enable=*/ 7, /*cs=*/ 10, /*dc=*/ 9, /*reset=*/ 8); //U8G2_SSD1306_128X64_VCOMH0_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but maximizes setContrast() range //U8G2_SSD1306_128X64_ALT0_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but may solve the ""every 2nd line skipped"" problem //U8G2_SH1106_128X64_NONAME_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SH1106_128X64_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); //U8G2_SH1106_128X64_VCOMH0_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but maximizes setContrast() range //U8G2_SH1106_128X64_WINSTAR_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but uses updated SH1106 init sequence //U8G2_SH1106_72X40_WISE_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SH1107_64X128_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SH1107_128X128_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SH1107_128X128_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); //U8G2_SH1107_SEEED_96X96_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SH1108_160X160_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SH1122_256X64_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8G2_16BIT in u8g2.h //U8G2_SSD1306_128X32_UNIVISION_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ 21, /* data=*/ 20, /* reset=*/ U8X8_PIN_NONE); // Adafruit Feather M0 Basic Proto + FeatherWing OLED //U8G2_SSD1306_128X32_UNIVISION_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // Adafruit Feather ESP8266/32u4 Boards + FeatherWing OLED //U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); // Adafruit ESP8266/32u4/ARM Boards + FeatherWing OLED //U8G2_SSD1306_128X32_UNIVISION_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE, /* clock=*/ SCL, /* data=*/ SDA); // pin remapping with ESP8266 HW I2C //U8G2_SSD1306_64X48_ER_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); // EastRising 0.66"" OLED breakout board, Uno: A4=SDA, A5=SCL, 5V powered //U8G2_SSD1306_48X64_WINSTAR_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); //U8G2_SSD1306_64X32_NONAME_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); //U8G2_SSD1306_64X32_1F_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); //U8G2_SSD1306_96X16_ER_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); // EastRising 0.69"" OLED //U8G2_SSD1322_NHD_256X64_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8G2_16BIT in u8g2.h //U8G2_SSD1322_NHD_256X64_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8G2_16BIT in u8g2.h //U8G2_SSD1322_NHD_128X64_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1322_NHD_128X64_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1325_NHD_128X64_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1325_NHD_128X64_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD0323_OS128064_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD0323_OS128064_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1326_ER_256X32_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // experimental driver for ER-OLED018-1 //U8G2_SSD1327_SEEED_96X96_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // Seeedstudio Grove OLED 96x96 //U8G2_SSD1327_SEEED_96X96_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); // Seeedstudio Grove OLED 96x96 //U8G2_SSD1327_EA_W128128_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1327_EA_W128128_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1327_EA_W128128_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ 5, /* data=*/ 4, /* reset=*/ U8X8_PIN_NONE); //U8G2_SSD1327_EA_W128128_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); //U8G2_SSD1327_MIDAS_128X128_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1327_MIDAS_128X128_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1329_128X96_NONAME_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1329_128X96_NONAME_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1305_128X32_NONAME_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1305_128X32_NONAME_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1305_128X32_ADAFRUIT_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1305_128X32_ADAFRUIT_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1305_128X64_ADAFRUIT_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1305_128X64_ADAFRUIT_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1309_128X64_NONAME0_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1309_128X64_NONAME0_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1309_128X64_NONAME2_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1309_128X64_NONAME2_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1317_96X96_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1317_96X96_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_LD7032_60X32_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 11, /* data=*/ 12, /* cs=*/ 9, /* dc=*/ 10, /* reset=*/ 8); // SW SPI Nano Board //U8G2_LD7032_60X32_F_4W_SW_I2C u8g2(U8G2_R0, /* clock=*/ 11, /* data=*/ 12, /* reset=*/ U8X8_PIN_NONE); // NOT TESTED! //U8G2_UC1701_EA_DOGS102_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_UC1701_EA_DOGS102_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_PCD8544_84X48_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Nokia 5110 Display //U8G2_PCD8544_84X48_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Nokia 5110 Display //U8G2_PCF8812_96X65_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Could be also PCF8814 //U8G2_PCF8812_96X65_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Could be also PCF8814 //U8G2_HX1230_96X68_F_3W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* reset=*/ 8); //U8G2_HX1230_96X68_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_KS0108_128X64_F u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*dc=*/ 17, /*cs0=*/ 14, /*cs1=*/ 15, /*cs2=*/ U8X8_PIN_NONE, /* reset=*/ U8X8_PIN_NONE); // Set R/W to low! //U8G2_KS0108_ERM19264_F u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*dc=*/ 17, /*cs0=*/ 14, /*cs1=*/ 15, /*cs2=*/ 16, /* reset=*/ U8X8_PIN_NONE); // Set R/W to low! //U8G2_ST7920_192X32_F_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ U8X8_PIN_NONE, /*dc=*/ 17, /*reset=*/ U8X8_PIN_NONE); //U8G2_ST7920_192X32_F_SW_SPI u8g2(U8G2_R0, /* clock=*/ 18 /* A4 */ , /* data=*/ 16 /* A2 */, /* CS=*/ 17 /* A3 */, /* reset=*/ U8X8_PIN_NONE); //U8G2_ST7920_128X64_F_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18 /* A4 */, /*cs=*/ U8X8_PIN_NONE, /*dc/rs=*/ 17 /* A3 */, /*reset=*/ 15 /* A1 */); // Remember to set R/W to 0 //U8G2_ST7920_128X64_F_SW_SPI u8g2(U8G2_R0, /* clock=*/ 18 /* A4 */ , /* data=*/ 16 /* A2 */, /* CS=*/ 17 /* A3 */, /* reset=*/ U8X8_PIN_NONE); //U8G2_ST7920_128X64_F_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* CS=*/ 10, /* reset=*/ 8); //U8G2_ST7920_128X64_F_HW_SPI u8g2(U8G2_R0, /* CS=*/ 10, /* reset=*/ 8); //U8G2_ST7565_EA_DOGM128_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_EA_DOGM128_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_64128N_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_64128N_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_EA_DOGM132_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); // DOGM132 Shield //U8G2_ST7565_EA_DOGM132_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); // DOGM132 Shield //U8G2_ST7565_ZOLEN_128X64_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_ZOLEN_128X64_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_LM6059_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Adafruit ST7565 GLCD //U8G2_ST7565_LM6059_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Adafruit ST7565 GLCD //U8G2_ST7565_LX12864_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_LX12864_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_ERC12864_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_ERC12864_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_NHD_C12832_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_NHD_C12832_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_NHD_C12864_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_NHD_C12864_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_JLX12864_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_JLX12864_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7567_PI_132X64_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); // Pax Instruments Shield, LCD_BL=6 //U8G2_ST7567_PI_132X64_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); // Pax Instruments Shield, LCD_BL=6 //U8G2_ST7567_JLX12864_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7567_JLX12864_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7567_ENH_DG128064_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7567_ENH_DG128064_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7567_ENH_DG128064I_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7567_ENH_DG128064I_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7567_64X32_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); //U8G2_ST75256_JLX172104_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST75256_JLX172104_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST75256_JLX256128_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8g2 16 bit mode for this display //U8G2_ST75256_JLX256128_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8g2 16 bit mode for this display //U8G2_ST75256_JLX256128_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 9, /* data=*/ 8, /* cs=*/ 7, /* dc=*/ 6, /* reset=*/ 5); // MKR Zero, Enable U8g2 16 bit mode for this display //U8G2_ST75256_JLX256128_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 7, /* dc=*/ 6, /* reset=*/ 5); // MKR Zero, Enable U8g2 16 bit mode for this display //U8G2_ST75256_JLX256160_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8g2 16 bit mode for this display //U8G2_ST75256_JLX256160_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8g2 16 bit mode for this display //U8G2_ST75256_JLX240160_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST75256_JLX240160_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST75256_JLX25664_F_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, enable U8g2 16 bit mode for this display //U8G2_NT7534_TG12864R_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_NT7534_TG12864R_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7588_JLX12864_F_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ 5); //U8G2_ST7588_JLX12864_F_HW_I2C u8g2(U8G2_R0, /* reset=*/ 5); //U8G2_IST3020_ERC19264_F_6800 u8g2(U8G2_R0, 44, 43, 42, 41, 40, 39, 38, 37, /*enable=*/ 28, /*cs=*/ 32, /*dc=*/ 30, /*reset=*/ 31); // Connect WR pin with GND //U8G2_IST3020_ERC19264_F_8080 u8g2(U8G2_R0, 44, 43, 42, 41, 40, 39, 38, 37, /*enable=*/ 29, /*cs=*/ 32, /*dc=*/ 30, /*reset=*/ 31); // Connect RD pin with 3.3V //U8G2_IST3020_ERC19264_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_LC7981_160X80_F_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RW with GND //U8G2_LC7981_160X160_F_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RW with GND //U8G2_LC7981_240X128_F_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RW with GND //U8G2_LC7981_240X64_F_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RW with GND //U8G2_SED1520_122X32_F u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*dc=*/ A0, /*e1=*/ A3, /*e2=*/ A2, /* reset=*/ A4); // Set R/W to low! //U8G2_T6963_240X128_F_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RD with +5V, FS0 and FS1 with GND //U8G2_T6963_256X64_F_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RD with +5V, FS0 and FS1 with GND //U8G2_T6963_160X80_F_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RD with +5V, FS0 and FS1 with GND //U8G2_SED1330_240X128_F_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RD with +5V, FG with GND //U8G2_SED1330_240X128_F_6800 u8g2(U8G2_R0, 13, 11, 2, 3, 4, 5, 6, A4, /*enable=*/ 7, /*cs=*/ 10, /*dc=*/ 9, /*reset=*/ 8); // A0 is dc pin! //U8G2_RA8835_NHD_240X128_F_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect /RD = E with +5V, enable is /WR = RW, FG with GND, 14=Uno Pin A0 //U8G2_RA8835_NHD_240X128_F_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // A0 is dc pin, /WR = RW = GND, enable is /RD = E //U8G2_UC1604_JLX19264_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_UC1604_JLX19264_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_UC1608_ERC24064_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // SW SPI, Due ERC24064-1 Test Setup //U8G2_UC1608_ERC240120_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_UC1608_240X128_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // SW SPI, Due ERC24064-1 Test Setup //U8G2_UC1610_EA_DOGXL160_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8G2_UC1610_EA_DOGXL160_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8G2_UC1611_EA_DOGM240_F_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGM240 Test Board //U8G2_UC1611_EA_DOGM240_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Due, SW SPI, DOGXL240 Test Board //U8G2_UC1611_EA_DOGXL240_F_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGXL240 Test Board //U8G2_UC1611_EA_DOGXL240_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Due, SW SPI, DOGXL240 Test Board //U8G2_UC1611_EW50850_F_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 3, /*dc=*/ 16, /*reset=*/ 16); // 240x160, Connect RD/WR1 pin with 3.3V, CS is aktive high //U8G2_UC1638_160X128_F_4W_HW_SPI u8g2(U8G2_R2, /* cs=*/ 2, /* dc=*/ 3, /* reset=*/ 4); // Not tested //U8G2_SSD1606_172X72_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // eInk/ePaper Display //U8G2_SSD1607_200X200_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // eInk/ePaper Display, original LUT from embedded artists //U8G2_SSD1607_GD_200X200_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Good Display //U8G2_IL3820_296X128_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // WaveShare 2.9 inch eInk/ePaper Display, enable 16 bit mode for this display! //U8G2_IL3820_V2_296X128_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // ePaper Display, lesser flickering and faster speed, enable 16 bit mode for this display! //U8G2_MAX7219_64X8_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 11, /* data=*/ 12, /* cs=*/ 10, /* dc=*/ U8X8_PIN_NONE, /* reset=*/ U8X8_PIN_NONE); //U8G2_MAX7219_32X8_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 11, /* data=*/ 12, /* cs=*/ 10, /* dc=*/ U8X8_PIN_NONE, /* reset=*/ U8X8_PIN_NONE); //U8G2_MAX7219_8X8_F_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 11, /* data=*/ 12, /* cs=*/ 10, /* dc=*/ U8X8_PIN_NONE, /* reset=*/ U8X8_PIN_NONE); //U8G2_LS013B7DH03_128X128_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ U8X8_PIN_NONE, /* reset=*/ 8); // there is no DC line for this display //U8G2_LS027B7DH01_400X240_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ U8X8_PIN_NONE, /* reset=*/ 8); // there is no DC line for this display //U8G2_LS013B7DH05_144X168_F_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ U8X8_PIN_NONE, /* reset=*/ 8); // there is no DC line for this display // End of constructor list void setup(void) { u8g2.begin(); } void loop(void) { u8g2.clearBuffer(); // clear the internal memory u8g2.setFont(u8g2_font_ncenB08_tr); // choose a suitable font u8g2.drawStr(0,10,""Hello World!""); // write something to the internal memory u8g2.sendBuffer(); // transfer internal memory to the display delay(1000); } ",12412,True,3855.875803996889,median "CLASS zcl_abapgit_ajson DEFINITION PUBLIC CREATE PRIVATE . PUBLIC SECTION. INTERFACES zif_abapgit_ajson . ALIASES: exists FOR zif_abapgit_ajson~exists, members FOR zif_abapgit_ajson~members, get FOR zif_abapgit_ajson~get, get_boolean FOR zif_abapgit_ajson~get_boolean, get_integer FOR zif_abapgit_ajson~get_integer, get_number FOR zif_abapgit_ajson~get_number, get_date FOR zif_abapgit_ajson~get_date, get_timestamp FOR zif_abapgit_ajson~get_timestamp, get_string FOR zif_abapgit_ajson~get_string, slice FOR zif_abapgit_ajson~slice, to_abap FOR zif_abapgit_ajson~to_abap, array_to_string_table FOR zif_abapgit_ajson~array_to_string_table. ALIASES: clear FOR zif_abapgit_ajson~clear, set FOR zif_abapgit_ajson~set, set_boolean FOR zif_abapgit_ajson~set_boolean, set_string FOR zif_abapgit_ajson~set_string, set_integer FOR zif_abapgit_ajson~set_integer, set_date FOR zif_abapgit_ajson~set_date, set_timestamp FOR zif_abapgit_ajson~set_timestamp, set_null FOR zif_abapgit_ajson~set_null, delete FOR zif_abapgit_ajson~delete, touch_array FOR zif_abapgit_ajson~touch_array, push FOR zif_abapgit_ajson~push, stringify FOR zif_abapgit_ajson~stringify. ALIASES: mt_json_tree FOR zif_abapgit_ajson~mt_json_tree, keep_item_order FOR zif_abapgit_ajson~keep_item_order, freeze FOR zif_abapgit_ajson~freeze. CLASS-METHODS parse IMPORTING !iv_json TYPE string !iv_freeze TYPE abap_bool DEFAULT abap_false !ii_custom_mapping TYPE REF TO zif_abapgit_ajson_mapping OPTIONAL RETURNING VALUE(ro_instance) TYPE REF TO zcl_abapgit_ajson RAISING zcx_abapgit_ajson_error . CLASS-METHODS create_empty IMPORTING !ii_custom_mapping TYPE REF TO zif_abapgit_ajson_mapping OPTIONAL RETURNING VALUE(ro_instance) TYPE REF TO zcl_abapgit_ajson. "" Experimental ! May change CLASS-METHODS create_from IMPORTING !ii_source_json TYPE REF TO zif_abapgit_ajson !ii_filter TYPE REF TO zif_abapgit_ajson_filter OPTIONAL RETURNING VALUE(ro_instance) TYPE REF TO zcl_abapgit_ajson RAISING zcx_abapgit_ajson_error . PROTECTED SECTION. PRIVATE SECTION. TYPES: tty_node_stack TYPE STANDARD TABLE OF REF TO zif_abapgit_ajson=>ty_node WITH DEFAULT KEY. DATA mv_read_only TYPE abap_bool. DATA mi_custom_mapping TYPE REF TO zif_abapgit_ajson_mapping. DATA mv_keep_item_order TYPE abap_bool. METHODS get_item IMPORTING iv_path TYPE string RETURNING VALUE(rv_item) TYPE REF TO zif_abapgit_ajson=>ty_node. METHODS prove_path_exists IMPORTING iv_path TYPE string RETURNING VALUE(rt_node_stack) TYPE tty_node_stack RAISING zcx_abapgit_ajson_error. METHODS delete_subtree IMPORTING iv_path TYPE string iv_name TYPE string RETURNING VALUE(rv_deleted) TYPE abap_bool. ENDCLASS. CLASS zcl_abapgit_ajson IMPLEMENTATION. METHOD create_empty. CREATE OBJECT ro_instance. ro_instance->mi_custom_mapping = ii_custom_mapping. ENDMETHOD. METHOD create_from. DATA lo_filter_runner TYPE REF TO lcl_filter_runner. IF ii_source_json IS NOT BOUND. zcx_abapgit_ajson_error=>raise( 'Source not bound' ). ENDIF. CREATE OBJECT ro_instance. IF ii_filter IS BOUND. CREATE OBJECT lo_filter_runner. lo_filter_runner->run( EXPORTING ii_filter = ii_filter it_source_tree = ii_source_json->mt_json_tree CHANGING ct_dest_tree = ro_instance->mt_json_tree ). ELSE. ro_instance->mt_json_tree = ii_source_json->mt_json_tree. "" Copy keep order and custom mapping ??? ENDIF. ENDMETHOD. METHOD delete_subtree. DATA lv_parent_path TYPE string. DATA lv_parent_path_len TYPE i. FIELD-SYMBOLS LIKE LINE OF mt_json_tree. READ TABLE mt_json_tree ASSIGNING WITH KEY path = iv_path name = iv_name. IF sy-subrc = 0. "" Found ? delete ! IF -children > 0. "" only for objects and arrays lv_parent_path = iv_path && iv_name && '/'. lv_parent_path_len = strlen( lv_parent_path ). LOOP AT mt_json_tree ASSIGNING . IF strlen( -path ) >= lv_parent_path_len AND substring( val = -path len = lv_parent_path_len ) = lv_parent_path. DELETE mt_json_tree INDEX sy-tabix. ENDIF. ENDLOOP. ENDIF. DELETE mt_json_tree WHERE path = iv_path AND name = iv_name. rv_deleted = abap_true. DATA ls_path TYPE zif_abapgit_ajson=>ty_path_name. ls_path = lcl_utils=>split_path( iv_path ). READ TABLE mt_json_tree ASSIGNING WITH KEY path = ls_path-path name = ls_path-name. IF sy-subrc = 0. -children = -children - 1. ENDIF. ENDIF. ENDMETHOD. METHOD get_item. FIELD-SYMBOLS LIKE LINE OF mt_json_tree. DATA ls_path_name TYPE zif_abapgit_ajson=>ty_path_name. ls_path_name = lcl_utils=>split_path( iv_path ). READ TABLE mt_json_tree ASSIGNING WITH KEY path = ls_path_name-path name = ls_path_name-name. IF sy-subrc = 0. GET REFERENCE OF INTO rv_item. ENDIF. ENDMETHOD. METHOD parse. DATA lo_parser TYPE REF TO lcl_json_parser. CREATE OBJECT ro_instance. CREATE OBJECT lo_parser. ro_instance->mt_json_tree = lo_parser->parse( iv_json ). ro_instance->mi_custom_mapping = ii_custom_mapping. IF iv_freeze = abap_true. ro_instance->freeze( ). ENDIF. ENDMETHOD. METHOD prove_path_exists. DATA lt_path TYPE string_table. DATA lr_node LIKE LINE OF rt_node_stack. DATA lr_node_parent LIKE LINE OF rt_node_stack. DATA lv_cur_path TYPE string. DATA lv_cur_name TYPE string. DATA ls_new_node LIKE LINE OF mt_json_tree. SPLIT iv_path AT '/' INTO TABLE lt_path. DELETE lt_path WHERE table_line IS INITIAL. DO. lr_node_parent = lr_node. READ TABLE mt_json_tree REFERENCE INTO lr_node WITH KEY path = lv_cur_path name = lv_cur_name. IF sy-subrc <> 0. "" New node, assume it is always object as it has a named child, use touch_array to init array CLEAR ls_new_node. IF lr_node_parent IS NOT INITIAL. "" if has parent lr_node_parent->children = lr_node_parent->children + 1. IF lr_node_parent->type = zif_abapgit_ajson=>node_type-array. ls_new_node-index = lcl_utils=>validate_array_index( iv_path = lv_cur_path iv_index = lv_cur_name ). ENDIF. ENDIF. ls_new_node-path = lv_cur_path. ls_new_node-name = lv_cur_name. ls_new_node-type = zif_abapgit_ajson=>node_type-object. INSERT ls_new_node INTO TABLE mt_json_tree REFERENCE INTO lr_node. ENDIF. INSERT lr_node INTO rt_node_stack INDEX 1. lv_cur_path = lv_cur_path && lv_cur_name && '/'. READ TABLE lt_path INDEX sy-index INTO lv_cur_name. IF sy-subrc <> 0. EXIT. "" no more segments ENDIF. ENDDO. ASSERT lv_cur_path = iv_path. "" Just in case ENDMETHOD. METHOD zif_abapgit_ajson~array_to_string_table. DATA lv_normalized_path TYPE string. DATA lr_node TYPE REF TO zif_abapgit_ajson=>ty_node. FIELD-SYMBOLS LIKE LINE OF mt_json_tree. lv_normalized_path = lcl_utils=>normalize_path( iv_path ). lr_node = get_item( iv_path ). IF lr_node IS INITIAL. zcx_abapgit_ajson_error=>raise( |Path not found: { iv_path }| ). ENDIF. IF lr_node->type <> zif_abapgit_ajson=>node_type-array. zcx_abapgit_ajson_error=>raise( |Array expected at: { iv_path }| ). ENDIF. LOOP AT mt_json_tree ASSIGNING WHERE path = lv_normalized_path. CASE -type. WHEN zif_abapgit_ajson=>node_type-number OR zif_abapgit_ajson=>node_type-string. APPEND -value TO rt_string_table. WHEN zif_abapgit_ajson=>node_type-null. APPEND '' TO rt_string_table. WHEN zif_abapgit_ajson=>node_type-boolean. DATA lv_tmp TYPE string. IF -value = 'true'. lv_tmp = abap_true. ELSE. CLEAR lv_tmp. ENDIF. APPEND lv_tmp TO rt_string_table. WHEN OTHERS. zcx_abapgit_ajson_error=>raise( |Cannot convert [{ -type }] to string at [{ -path }{ -name }]| ). ENDCASE. ENDLOOP. ENDMETHOD. METHOD zif_abapgit_ajson~clear. IF mv_read_only = abap_true. zcx_abapgit_ajson_error=>raise( 'This json instance is read only' ). ENDIF. CLEAR mt_json_tree. ENDMETHOD. METHOD zif_abapgit_ajson~delete. IF mv_read_only = abap_true. zcx_abapgit_ajson_error=>raise( 'This json instance is read only' ). ENDIF. DATA ls_split_path TYPE zif_abapgit_ajson=>ty_path_name. ls_split_path = lcl_utils=>split_path( iv_path ). delete_subtree( iv_path = ls_split_path-path iv_name = ls_split_path-name ). ri_json = me. ENDMETHOD. METHOD zif_abapgit_ajson~exists. DATA lv_item TYPE REF TO zif_abapgit_ajson=>ty_node. lv_item = get_item( iv_path ). IF lv_item IS NOT INITIAL. rv_exists = abap_true. ENDIF. ENDMETHOD. METHOD zif_abapgit_ajson~freeze. mv_read_only = abap_true. ENDMETHOD. METHOD zif_abapgit_ajson~get. DATA lv_item TYPE REF TO zif_abapgit_ajson=>ty_node. lv_item = get_item( iv_path ). IF lv_item IS NOT INITIAL. rv_value = lv_item->value. ENDIF. ENDMETHOD. METHOD zif_abapgit_ajson~get_boolean. DATA lv_item TYPE REF TO zif_abapgit_ajson=>ty_node. lv_item = get_item( iv_path ). IF lv_item IS INITIAL OR lv_item->type = zif_abapgit_ajson=>node_type-null. RETURN. ELSEIF lv_item->type = zif_abapgit_ajson=>node_type-boolean. rv_value = boolc( lv_item->value = 'true' ). ELSEIF lv_item->value IS NOT INITIAL. rv_value = abap_true. ENDIF. ENDMETHOD. METHOD zif_abapgit_ajson~get_date. DATA lv_item TYPE REF TO zif_abapgit_ajson=>ty_node. DATA lv_y TYPE c LENGTH 4. DATA lv_m TYPE c LENGTH 2. DATA lv_d TYPE c LENGTH 2. lv_item = get_item( iv_path ). IF lv_item IS NOT INITIAL AND lv_item->type = zif_abapgit_ajson=>node_type-string. FIND FIRST OCCURRENCE OF REGEX '^(\\d{4})-(\\d{2})-(\\d{2})(T|$)' IN lv_item->value SUBMATCHES lv_y lv_m lv_d. CONCATENATE lv_y lv_m lv_d INTO rv_value. ENDIF. ENDMETHOD. METHOD zif_abapgit_ajson~get_integer. DATA lv_item TYPE REF TO zif_abapgit_ajson=>ty_node. lv_item = get_item( iv_path ). IF lv_item IS NOT INITIAL AND lv_item->type = zif_abapgit_ajson=>node_type-number. rv_value = lv_item->value. ENDIF. ENDMETHOD. METHOD zif_abapgit_ajson~get_node_type. DATA lv_item TYPE REF TO zif_abapgit_ajson=>ty_node. lv_item = get_item( iv_path ). IF lv_item IS NOT INITIAL. rv_node_type = lv_item->type. ENDIF. ENDMETHOD. METHOD zif_abapgit_ajson~get_number. DATA lv_item TYPE REF TO zif_abapgit_ajson=>ty_node. lv_item = get_item( iv_path ). IF lv_item IS NOT INITIAL AND lv_item->type = zif_abapgit_ajson=>node_type-number. rv_value = lv_item->value. ENDIF. ENDMETHOD. METHOD zif_abapgit_ajson~get_string. DATA lv_item TYPE REF TO zif_abapgit_ajson=>ty_node. lv_item = get_item( iv_path ). IF lv_item IS NOT INITIAL AND lv_item->type <> zif_abapgit_ajson=>node_type-null. rv_value = lv_item->value. ENDIF. ENDMETHOD. METHOD zif_abapgit_ajson~get_timestamp. DATA lo_to_abap TYPE REF TO lcl_json_to_abap. DATA lr_item TYPE REF TO zif_abapgit_ajson=>ty_node. lr_item = get_item( iv_path ). IF lr_item IS INITIAL. RETURN. ENDIF. CREATE OBJECT lo_to_abap. TRY. rv_value = lo_to_abap->to_timestamp( is_path = lr_item->* ). CATCH zcx_abapgit_ajson_error. RETURN. ENDTRY. ENDMETHOD. METHOD zif_abapgit_ajson~keep_item_order. mv_keep_item_order = abap_true. ri_json = me. ENDMETHOD. METHOD zif_abapgit_ajson~members. DATA lv_normalized_path TYPE string. FIELD-SYMBOLS LIKE LINE OF mt_json_tree. lv_normalized_path = lcl_utils=>normalize_path( iv_path ). LOOP AT mt_json_tree ASSIGNING WHERE path = lv_normalized_path. APPEND -name TO rt_members. ENDLOOP. ENDMETHOD. METHOD zif_abapgit_ajson~push. DATA lr_parent TYPE REF TO zif_abapgit_ajson=>ty_node. DATA lr_new_node TYPE REF TO zif_abapgit_ajson=>ty_node. IF mv_read_only = abap_true. zcx_abapgit_ajson_error=>raise( 'This json instance is read only' ). ENDIF. lr_parent = get_item( iv_path ). IF lr_parent IS INITIAL. zcx_abapgit_ajson_error=>raise( |Path [{ iv_path }] does not exist| ). ENDIF. IF lr_parent->type <> zif_abapgit_ajson=>node_type-array. zcx_abapgit_ajson_error=>raise( |Path [{ iv_path }] is not array| ). ENDIF. DATA lt_new_nodes TYPE zif_abapgit_ajson=>ty_nodes_tt. DATA ls_new_path TYPE zif_abapgit_ajson=>ty_path_name. DATA lv_new_index TYPE i. lv_new_index = lr_parent->children + 1. ls_new_path-path = lcl_utils=>normalize_path( iv_path ). ls_new_path-name = |{ lv_new_index }|. lt_new_nodes = lcl_abap_to_json=>convert( iv_keep_item_order = mv_keep_item_order iv_data = iv_val is_prefix = ls_new_path ). READ TABLE lt_new_nodes INDEX 1 REFERENCE INTO lr_new_node. "" assume first record is the array item - not ideal ! ASSERT sy-subrc = 0. lr_new_node->index = lv_new_index. "" update data lr_parent->children = lv_new_index. INSERT LINES OF lt_new_nodes INTO TABLE mt_json_tree. ri_json = me. ENDMETHOD. METHOD zif_abapgit_ajson~set. DATA ls_split_path TYPE zif_abapgit_ajson=>ty_path_name. DATA lr_parent TYPE REF TO zif_abapgit_ajson=>ty_node. DATA lt_node_stack TYPE tty_node_stack. IF mv_read_only = abap_true. zcx_abapgit_ajson_error=>raise( 'This json instance is read only' ). ENDIF. ri_json = me. IF iv_val IS INITIAL AND iv_ignore_empty = abap_true AND iv_node_type IS INITIAL. RETURN. "" nothing to assign ENDIF. IF iv_node_type IS NOT INITIAL AND iv_node_type <> zif_abapgit_ajson=>node_type-boolean AND iv_node_type <> zif_abapgit_ajson=>node_type-null AND iv_node_type <> zif_abapgit_ajson=>node_type-number AND iv_node_type <> zif_abapgit_ajson=>node_type-string. zcx_abapgit_ajson_error=>raise( |Unexpected type { iv_node_type }| ). ENDIF. ls_split_path = lcl_utils=>split_path( iv_path ). IF ls_split_path IS INITIAL. "" Assign root, exceptional processing IF iv_node_type IS NOT INITIAL. mt_json_tree = lcl_abap_to_json=>insert_with_type( iv_keep_item_order = mv_keep_item_order iv_data = iv_val iv_type = iv_node_type is_prefix = ls_split_path ii_custom_mapping = mi_custom_mapping ). ELSE. mt_json_tree = lcl_abap_to_json=>convert( iv_keep_item_order = mv_keep_item_order iv_data = iv_val is_prefix = ls_split_path ii_custom_mapping = mi_custom_mapping ). ENDIF. RETURN. ENDIF. "" Ensure whole path exists lt_node_stack = prove_path_exists( ls_split_path-path ). READ TABLE lt_node_stack INDEX 1 INTO lr_parent. ASSERT sy-subrc = 0. "" delete if exists with subtree delete_subtree( iv_path = ls_split_path-path iv_name = ls_split_path-name ). "" convert to json DATA lt_new_nodes TYPE zif_abapgit_ajson=>ty_nodes_tt. DATA lv_array_index TYPE i. IF lr_parent->type = zif_abapgit_ajson=>node_type-array. lv_array_index = lcl_utils=>validate_array_index( iv_path = ls_split_path-path iv_index = ls_split_path-name ). ENDIF. IF iv_node_type IS NOT INITIAL. lt_new_nodes = lcl_abap_to_json=>insert_with_type( iv_keep_item_order = mv_keep_item_order iv_data = iv_val iv_type = iv_node_type iv_array_index = lv_array_index is_prefix = ls_split_path ii_custom_mapping = mi_custom_mapping ). ELSE. lt_new_nodes = lcl_abap_to_json=>convert( iv_keep_item_order = mv_keep_item_order iv_data = iv_val iv_array_index = lv_array_index is_prefix = ls_split_path ii_custom_mapping = mi_custom_mapping ). ENDIF. "" update data IF lines( lt_new_nodes ) > 0. lr_parent->children = lr_parent->children + 1. INSERT LINES OF lt_new_nodes INTO TABLE mt_json_tree. ENDIF. ENDMETHOD. METHOD zif_abapgit_ajson~set_boolean. ri_json = me. DATA lv_bool TYPE abap_bool. lv_bool = boolc( iv_val IS NOT INITIAL ). zif_abapgit_ajson~set( iv_ignore_empty = abap_false iv_path = iv_path iv_val = lv_bool ). ENDMETHOD. METHOD zif_abapgit_ajson~set_date. ri_json = me. DATA lv_val TYPE string. IF iv_val IS NOT INITIAL. lv_val = iv_val+0(4) && '-' && iv_val+4(2) && '-' && iv_val+6(2). ENDIF. zif_abapgit_ajson~set( iv_ignore_empty = abap_false iv_path = iv_path iv_val = lv_val ). ENDMETHOD. METHOD zif_abapgit_ajson~set_integer. ri_json = me. zif_abapgit_ajson~set( iv_ignore_empty = abap_false iv_path = iv_path iv_val = iv_val ). ENDMETHOD. METHOD zif_abapgit_ajson~set_null. ri_json = me. DATA lv_null_ref TYPE REF TO data. zif_abapgit_ajson~set( iv_ignore_empty = abap_false iv_path = iv_path iv_val = lv_null_ref ). ENDMETHOD. METHOD zif_abapgit_ajson~set_string. ri_json = me. DATA lv_val TYPE string. lv_val = iv_val. zif_abapgit_ajson~set( iv_ignore_empty = abap_false iv_path = iv_path iv_val = lv_val ). ENDMETHOD. METHOD zif_abapgit_ajson~set_timestamp. CONSTANTS lc_utc TYPE c LENGTH 6 VALUE 'UTC'. DATA: lv_date TYPE d, lv_time TYPE t, lv_timestamp_iso TYPE string. ri_json = me. IF iv_val IS INITIAL. "" The zero value is January 1, year 1, 00:00:00.000000000 UTC. lv_date = '00010101'. ELSE. CONVERT TIME STAMP iv_val TIME ZONE lc_utc INTO DATE lv_date TIME lv_time. ENDIF. lv_timestamp_iso = lv_date+0(4) && '-' && lv_date+4(2) && '-' && lv_date+6(2) && 'T' && lv_time+0(2) && '-' && lv_time+2(2) && '-' && lv_time+4(2) && 'Z'. zif_abapgit_ajson~set( iv_ignore_empty = abap_false iv_path = iv_path iv_val = lv_timestamp_iso ). ENDMETHOD. METHOD zif_abapgit_ajson~slice. DATA lo_section TYPE REF TO zcl_abapgit_ajson. DATA ls_item LIKE LINE OF mt_json_tree. DATA lv_normalized_path TYPE string. DATA ls_path_parts TYPE zif_abapgit_ajson=>ty_path_name. DATA lv_path_len TYPE i. CREATE OBJECT lo_section. lv_normalized_path = lcl_utils=>normalize_path( iv_path ). lv_path_len = strlen( lv_normalized_path ). ls_path_parts = lcl_utils=>split_path( lv_normalized_path ). LOOP AT mt_json_tree INTO ls_item. "" TODO potentially improve performance due to sorted tree (all path started from same prefix go in a row) IF strlen( ls_item-path ) >= lv_path_len AND substring( val = ls_item-path len = lv_path_len ) = lv_normalized_path. ls_item-path = substring( val = ls_item-path off = lv_path_len - 1 ). "" less closing '/' INSERT ls_item INTO TABLE lo_section->mt_json_tree. ELSEIF ls_item-path = ls_path_parts-path AND ls_item-name = ls_path_parts-name. CLEAR: ls_item-path, ls_item-name. "" this becomes a new root INSERT ls_item INTO TABLE lo_section->mt_json_tree. ENDIF. ENDLOOP. ri_json = lo_section. ENDMETHOD. METHOD zif_abapgit_ajson~stringify. rv_json = lcl_json_serializer=>stringify( it_json_tree = mt_json_tree iv_keep_item_order = mv_keep_item_order iv_indent = iv_indent ). ENDMETHOD. METHOD zif_abapgit_ajson~touch_array. DATA lr_node TYPE REF TO zif_abapgit_ajson=>ty_node. DATA ls_new_node LIKE LINE OF mt_json_tree. DATA ls_split_path TYPE zif_abapgit_ajson=>ty_path_name. IF mv_read_only = abap_true. zcx_abapgit_ajson_error=>raise( 'This json instance is read only' ). ENDIF. ls_split_path = lcl_utils=>split_path( iv_path ). IF ls_split_path IS INITIAL. "" Assign root, exceptional processing ls_new_node-path = ls_split_path-path. ls_new_node-name = ls_split_path-name. ls_new_node-type = 'array'. INSERT ls_new_node INTO TABLE mt_json_tree. RETURN. ENDIF. IF iv_clear = abap_true. delete_subtree( iv_path = ls_split_path-path iv_name = ls_split_path-name ). ELSE. lr_node = get_item( iv_path ). ENDIF. IF lr_node IS INITIAL. "" Or node was cleared DATA lr_parent TYPE REF TO zif_abapgit_ajson=>ty_node. DATA lt_node_stack TYPE tty_node_stack. lt_node_stack = prove_path_exists( ls_split_path-path ). READ TABLE lt_node_stack INDEX 1 INTO lr_parent. ASSERT sy-subrc = 0. lr_parent->children = lr_parent->children + 1. ls_new_node-path = ls_split_path-path. ls_new_node-name = ls_split_path-name. ls_new_node-type = zif_abapgit_ajson=>node_type-array. INSERT ls_new_node INTO TABLE mt_json_tree. ELSEIF lr_node->type <> zif_abapgit_ajson=>node_type-array. zcx_abapgit_ajson_error=>raise( |Path [{ iv_path }] already used and is not array| ). ENDIF. ri_json = me. ENDMETHOD. METHOD zif_abapgit_ajson~to_abap. DATA lo_to_abap TYPE REF TO lcl_json_to_abap. CLEAR ev_container. lcl_json_to_abap=>bind( EXPORTING ii_custom_mapping = mi_custom_mapping CHANGING c_obj = ev_container co_instance = lo_to_abap ). lo_to_abap->to_abap( mt_json_tree ). ENDMETHOD. ENDCLASS. ",6351,False,1469.108458387759,median "#include ""ui_arp.h"" #include ""ui_cfg.h"" #include ""arp.h"" #include ""seq.h"" #include ""oner.h"" /////////////////////////////////////////////////////////// // Globales variables /////////////////////////////////////////////////////////// //extern byte mClock; // clock tick byte seqPushedKey = 255; // key pushed while Seq played bool SetAB; byte aSplit; // split note A/B = C4 (3rd octave on Matrix 6 keyboard) /////////////////////////////////////////////////////////// // routing midi note off msg /////////////////////////////////////////////////////////// void HandleNoteOff(byte channel, byte pitch, byte velocity) { if (inTest && booting) { Serial.println(F(""Note Off"")); lcd.setCursor(18, 0); lcd.write(254); return; } MIDI_Incoming = true; // show that we receive midi message // MIDI THRU in software : MIDI IN A -> MIDI OUT CORE if (softMIDITHRU) { if (channel == MIDI_CHANNEL) MIDI3.sendNoteOff(pitch, velocity, channel + 4); } // sending notes off to synths if (channel == MIDI_CHANNEL) { // update split point: done in NoteOn SetAB = ui_SetAB; aSplit = ui_aSplit; // holds notesOff or pass thru: // if (ui_aHold) // previous version if (ui_aHold && SetAB && (pitch > aSplit)) Feed_aChordLatch(pitch, velocity, channel); else if (ui_aHold && (SetAB == false) && (pitch < aSplit)) Feed_aChordLatch(pitch, velocity, channel); else // if(1)// ((arpN >= 7-1)||(arpN==0)) MIDI1.sendNoteOff(pitch, velocity, channel); // let pass last noteOff after arpegio *** if (SetAB) { if ((pitch > aSplit) && router_arp_tag && (arpN - 1 < 7)) // ARP { // send to arp buffer Update_Arp(pitch, velocity, channel, 0); //if (arpN == 0) MIDI1.sendNoteOff(pitch, velocity, channel); // kill last note Play_Arp(pitch, velocity, channel, 0); #if DEBUG_ARP Serial.println(F(""ArpegiateOption false"")); #endif } else if ((pitch <= aSplit) && (ui_seqRec || ui_seqPlay)) // SEQ { if (ui_seqRec) // if we record a seq { //don't call the seqREC() with noteOff, only noteOn are useful MIDI1.sendNoteOff(pitch, velocity, channel); // to listen what you rec ! } if (ui_seqPlay && seqMonoMode && (pitch == seqPushedKey)) // if we play a seq and we release the pushed key of NoteOn used before to trig the sequence // CA MARCHE TROP BIEN ! :) { // play notesOff from the sequence following midi clock and gate time and pattern and speed : // TO DO : it' done in SEQ() of seq.ino if (ui_toggleSeq) { return; } else { seqTrig = false; // stop trigging the sequence // send last note off of when we stopped the sequence : that must be done here // sends parameters to the Seq.ino Play_Seq(pitch, velocity, channel, false); // reset the event step count of Sequence : can be an option // reset seqPushedKey : seqPushedKey = 255; } } if (ui_seqPlay && seqMonoMode && (pitch != seqPushedKey)) // availability to play others notes while seq is running on the same keyboard { MIDI1.sendNoteOff(pitch, velocity, channel); } #if DEBUG_ARP Serial.println(F(""arpegiateOption FALSE"")); #endif } else // normal behaviour : play notes thru //MIDI1.sendNoteOff(pitch, velocity, channel); // *** return; } else { if ((pitch <= aSplit) && (router_arp_tag) && (arpN - 1 < 7)) // ARP { // send to arp buffer Update_Arp(pitch, velocity, channel, 0); //if (arpN == 0) MIDI1.sendNoteOff(pitch, velocity, channel); // kill last note Play_Arp(pitch, velocity, channel, 0); #if DEBUG_ARP Serial.println(F(""ArpegiateOption false"")); #endif } else if ((pitch > aSplit) && (ui_seqRec || ui_seqPlay)) // SEQ { if (ui_seqRec) // if we record a seq { //don't call the seqREC() with noteOff, only noteOn are useful MIDI1.sendNoteOff(pitch, velocity, channel); // to listen what you rec ! } if (ui_seqPlay && seqMonoMode && (pitch == seqPushedKey)) // if we play a seq and we release the pushed key of NoteOn used before to trig the sequence // CA MARCHE TROP BIEN ! :) { // play notesOff from the sequence following midi clock and gate time and pattern and speed : // TO DO : it' done in SEQ() of seq.ino if (ui_toggleSeq) { return; } else { seqTrig = false; // stop trigging the sequence // send last note off of when we stopped the sequence : that must be done here // sends parameters to the Seq.ino Play_Seq(pitch, velocity, channel, false); // reset the event step count of Sequence : can be an option // reset seqPushedKey : seqPushedKey = 255; } } if (ui_seqPlay && seqMonoMode && (pitch != seqPushedKey)) // availability to play others notes while seq is running on the same keyboard { MIDI1.sendNoteOff(pitch, velocity, channel); } #if DEBUG_ARP Serial.println(F(""arpegiateOption FALSE"")); #endif } else // normal behaviour : play notes thru //MIDI1.sendNoteOff(pitch, velocity, channel); // *** double noteoff dans midimonitor donc commentaire necessaire (voir*** plus haut) return; } } if (channel == MIDI_CHANNEL + 1) MIDI2.sendNoteOff(pitch, velocity, channel); #if SOFTSERIAL_ENABLED if (channel == MIDI_CHANNEL + 2) MIDI4.sendNoteOff(pitch, velocity, channel); if (channel == MIDI_CHANNEL + 3) MIDI5.sendNoteOff(pitch, velocity, channel); #endif #if DEBUG_router Serial.print(F(""Note OFF handled and sent : "")); Serial.print(channel, DEC); Serial.print(F("" "")); Serial.print(pitch, DEC); Serial.print(F("" "")); Serial.println(velocity, DEC); #endif // external midi note trigger (e.g rimshot, note=37, channel=10) if (systmClock == MTRGCLK && channel == MIDI_DRUMS_CHANNEL && pitch == MIDI_TRIGGER_NOTE) { ARP3(true); SEQ2(true); DOUT_PinSet(DOUT_ACTIVITY2, false); // tempo led } } /////////////////////////////////////////////////////////// // routing midi note on msg /////////////////////////////////////////////////////////// void HandleNoteOn(byte channel, byte pitch, byte velocity) { if (inTest && booting) { // test mode Serial.println(F(""Note On"")); // display lcd.setCursor(18, 0); lcd.write((byte)5); return; } // rimshot = 37 MIDI_Incoming = true; // MIDI THRU in software : MIDI IN A -> MIDI OUT CORE if (softMIDITHRU) { if (channel == MIDI_CHANNEL) MIDI3.sendNoteOn(pitch, velocity, channel + 4); } // learn split pitch A/S if we are in ARP menu page4 : if ( ui_aSplitLearning && channel == MIDI_CHANNEL && SoftPanel.Mode == Arp && SoftPanel.Page == SOFT_PAGE4) { ui_aSplit = pitch; // pitch note on received learned UI_Display_Arp(); // update displayed value ui_aSplitLearning = false; // stop learning // notice we hear the note. if we don't want to listen it/ problem with arp[] activated, do quit using return: return; } // sending notes On to synths if (velocity == 0) { // This acts like a NoteOff: HandleNoteOff(channel, pitch, velocity); } else { if (channel == MIDI_CHANNEL) { // update split point: SetAB = ui_SetAB; aSplit = ui_aSplit; // TrspA = ui_TrspA; // 3 // pitchA = pitch + ((TrspA << 2) + (TrspA << 3) - 36); // 12*x = 4*x+8*x = x<<2 + x<<3 if (SetAB) { // ARPEGIO if ((pitch > aSplit) && (router_arp_tag) && (arpN < 7 - 1)) // was only 'if(active_arp)' { Update_Arp(pitch, velocity, channel, 1); Play_Arp(pitch, velocity, channel, 1); #if DEBUG_ARP Serial.println(F(""ArpegiateOption TRUE"")); #endif } // SEQUENCER else if ((pitch <= aSplit) && ((ui_seqRec == 1) || (ui_seqPlay == 1))) { if (ui_seqRec) // if we record a seq { Rec_Seq(pitch, velocity, channel, 0); // opt = 0 for the moment TO IMPROVE MIDI1.sendNoteOn(pitch, velocity, channel); // to listen what you rec ! #if DEBUG_SEQ Serial.println(F(""we are in Rec_Seq() inside router"")); #endif return; } if (ui_seqPlay && seqMonoMode && (pitch != seqPushedKey)) // availability to play others notes while seq is running on the same keyboard { MIDI1.sendNoteOn(pitch, velocity, channel); } if (ui_seqPlay && (seqMonoMode == false)) // if we play a seq { seqPushedKey = pitch; // key you just pushed to trigger the sequence // play notes from the sequence following midi clock and gate time and pattern and speed : // TO DO seqTrig = true; // trig the sequence // sends parameters to the Seq.ino Play_Seq(pitch, velocity, channel, seqTrig); #if DEBUG_SEQ Serial.println(F(""we are in Play_Seq() inside router"")); Serial.print(F(""pitch/velo/chnl : $"")); Serial.print(pitch, HEX); Serial.print(F("" "")); Serial.print(velocity, HEX); Serial.print(F("" "")); Serial.println(channel, HEX); Serial.println(); #endif return; // stop here and return } #if DEBUG_ARP Serial.println(F(""arpegiateOption FALSE"")); #endif } else // normal behabviour : play notes MIDI1.sendNoteOn(pitch, velocity, channel); return; } else { // ARPEGIO if ((pitch <= aSplit) && (router_arp_tag) && (arpN < 7 - 1)) // was only 'if(active_arp)' { Update_Arp(pitch, velocity, channel, 1); Play_Arp(pitch, velocity, channel, 1); #if DEBUG_ARP Serial.println(F(""ArpegiateOption TRUE"")); #endif } // SEQUENCER else if ((pitch > aSplit) && ((ui_seqRec == 1) || (ui_seqPlay == 1))) { if (ui_seqRec) // if we record a seq { Rec_Seq(pitch, velocity, channel, 0); // opt = 0 for the moment TO IMPROVE MIDI1.sendNoteOn(pitch, velocity, channel); // to listen what you rec ! #if DEBUG_SEQ Serial.println(F(""we are in Rec_Seq() inside router"")); #endif return; } if (ui_seqPlay && seqMonoMode && (pitch != seqPushedKey)) // availability to play others notes while seq is running on the same keyboard { MIDI1.sendNoteOn(pitch, velocity, channel); } if (ui_seqPlay && (seqMonoMode == false)) // if we play a seq { seqPushedKey = pitch; // key you just pushed to trigger the sequence // play notes from the sequence following midi clock and gate time and pattern and speed : // TO DO seqTrig = true; // trig the sequence // sends parameters to the Seq.ino Play_Seq(pitch, velocity, channel, seqTrig); #if DEBUG_SEQ Serial.println(F(""we are in Play_Seq() inside router"")); Serial.print(F(""pitch/velo/chnl : $"")); Serial.print(pitch, HEX); Serial.print(F("" "")); Serial.print(velocity, HEX); Serial.print(F("" "")); Serial.println(channel, HEX); Serial.println(); #endif return; // stop here and return } #if DEBUG_ARP Serial.println(F(""arpegiateOption FALSE"")); #endif } else // normal behabviour : play notes MIDI1.sendNoteOn(pitch, velocity, channel); return; } } if (channel == (MIDI_CHANNEL + 1)) MIDI2.sendNoteOn(pitch, velocity, channel); //if(channel == (MIDI_CHANNEL+8)) // MIDI3.sendNoteOn(pitch,velocity,channel); #if SOFTSERIAL_ENABLED if (channel == MIDI_CHANNEL + 2) MIDI4.sendNoteOn(pitch, velocity, channel); if (channel == MIDI_CHANNEL + 3) MIDI5.sendNoteOn(pitch, velocity, channel); #endif } #if DEBUG_router Serial.print(F(""Note ON handled and sent : "")); Serial.print(channel, DEC); Serial.print(F("" "")); Serial.print(pitch, DEC); Serial.print(F("" "")); Serial.println(velocity, DEC); #endif // external midi note trigger (e.g rimshot, note=37, channel=10) if (systmClock == MTRGCLK && channel == MIDI_DRUMS_CHANNEL && pitch == MIDI_TRIGGER_NOTE) { ARP3(false); SEQ2(false); DOUT_PinSet(DOUT_ACTIVITY2, true); // tempo led } } ///////////////////////////////////////////////////////////////////////// // CC router handler //////////////////////////////////////////////////////////////////////// void HandleControlChange(byte channel, byte controlNumber, byte value) { MIDI_Incoming = true; // Here are managed Control change messages : Control change recognized by Matrix 1000 (named as Active Controllers in operating manual) are // directly forwarded to the appropriate Serial port selected by the device function. Control change not recognized by Matrix 1000 but // generated by DAW are forwarded to the appropriate serial port regarding channel. directly recorded by a DAW. // Notice than the Arduino Matrix Controller does generate CC messages when sending param sysex messages for being // Notice that bank select (CC=00) is moreover differently managed as it commands the bank select for the Arduino Matrix Controller. // pseudo code : // if(CC == message classiques (breath, modwheel, etc)) // sendControlChange(controlNumber, value, channel) // // else // MIDI_SendVoiceParam(interface,param, value, state mThru_XCc) / interface defined by channel number (1 or 2) // (mThru_XCc == true) if Sysex/CC enabled. #if DEBUG_router Serial.print(F(""ControlChange handled: "")); Serial.print(channel, DEC); Serial.print(F("" "")); Serial.print(controlNumber, DEC); Serial.print(F("" "")); Serial.println(value, DEC); #endif if ((channel >= MIDI_CHANNEL) && (channel <= (MIDI_CHANNEL + 3)) && (controlNumber < 128) && (value < 128)) { switch (controlNumber) { case 0: // bank select case 31: // bank change if (value < 10) // limits to 9 banks { uBank[device] = value; SoftPanel.Mode = Patch; SoftPanel_DisplayHandler(); return; // then handleProgramchange() will do the rest } break; // manage Sustain (pedal 2) when arp is running to (de)activate arpHold (15 MARS 2021) // MIDI CC 64 Damper Pedal /Sustain Pedal On/Off switch that controls sustain. (See also Sostenuto CC 66) // 0 to 63 = Off, 64 to 127 = On case 64: // Sustain (pedal 2) if (channel == MIDI_CHANNEL && router_arp_tag) { // active_arp /*if (value > 63) ui_aHold = true; else ui_aHold = false; */ // compliqué au relachment de la pédale } else { if (channel == MIDI_CHANNEL + 0) MIDI1.sendControlChange(controlNumber, value, channel); if (channel == MIDI_CHANNEL + 1) MIDI2.sendControlChange(controlNumber, value, channel); #if SOFTSERIAL_ENABLED if (channel == MIDI_CHANNEL + 2) MIDI4.sendControlChange(controlNumber, value, channel); if (channel == MIDI_CHANNEL + 3) MIDI5.sendControlChange(controlNumber, value, channel); #endif } break; case 1: // Modwheel = LEVER2 case 2: // breath control = LEVER3 case 4: // footcontrol = PEDAL1 case 6: // data entry case 7: // midi Volume //case 64: // Sustain (pedal 2) case 96: // data increment case 97: // data decrement case 98: // NRPN LSB case 99: // NRPN MSB case 100: // RPN LSB case 101: // RPN MSB case 120: // all sounds off case 121: // (All Controllers Off) case 122: // local on/off case 123: // all notes off case 124: // omni off case 125: // omni on case 126: // mode mono case 127: // mode poly if (channel == MIDI_CHANNEL + 0) MIDI1.sendControlChange(controlNumber, value, channel); if (channel == MIDI_CHANNEL + 1) MIDI2.sendControlChange(controlNumber, value, channel); #if SOFTSERIAL_ENABLED if (channel == MIDI_CHANNEL + 2) MIDI4.sendControlChange(controlNumber, value, channel); if (channel == MIDI_CHANNEL + 3) MIDI5.sendControlChange(controlNumber, value, channel); #endif //return; break; case 94: // GliGli Unison Detune UnisonDetune[channel + MIDI_CHANNEL - 1] = value; // transmit stuff if (channel == MIDI_CHANNEL + 0) MIDI1.sendControlChange(94, value, channel); if (channel == MIDI_CHANNEL + 1) MIDI2.sendControlChange(94, value, channel); #if SOFTSERIAL_ENABLED if (channel == MIDI_CHANNEL + 2) MIDI4.sendControlChange(94, value, channel); if (channel == MIDI_CHANNEL + 3) MIDI5.sendControlChange(94, value, channel); #endif break; default: if (channel == MIDI_CHANNEL && mThru_XCc) // case A { MIDI_SendVoiceParam(INTERFACE_SERIAL1, Translate_CC_SX(controlNumber), value, false); update_EditBuffer(Matrix_Device_A, Translate_CC_SX(controlNumber), value); UpdateDinStates(); } else if (channel == (MIDI_CHANNEL + 1) && mThru_XCc) // case B { MIDI_SendVoiceParam(INTERFACE_SERIAL2, Translate_CC_SX(controlNumber), value, false); update_EditBuffer(Matrix_Device_B, Translate_CC_SX(controlNumber), value); UpdateDinStates(); } else if (channel == (MIDI_CHANNEL + 2) && mThru_XCc) // case C { MIDI_SendVoiceParam(INTERFACE_SERIAL4, Translate_CC_SX(controlNumber), value, false); update_EditBuffer(Matrix_Device_C, Translate_CC_SX(controlNumber), value); UpdateDinStates(); } else if (channel == (MIDI_CHANNEL + 3) && mThru_XCc) // case D { MIDI_SendVoiceParam(INTERFACE_SERIAL5, Translate_CC_SX(controlNumber), value, false); update_EditBuffer(Matrix_Device_D, Translate_CC_SX(controlNumber), value); UpdateDinStates(); } else { // echo (optional) if (localControl) MIDI3.sendControlChange(controlNumber, value, channel); } // legacy code : // MIDI_SendVoiceParam(channel - MIDI_CHANNEL + 1, pgm_read_word_near(&singlePatchDataFormatX[controlNumber][2]), value, false); // WORKING !!! 0.99r // update_EditBuffer(device, pgm_read_word_near(&singlePatchDataFormatX[controlNumber][3]), value); // //EditBuffer[device][pgm_read_word_near(&singlePatchDataFormatX[controlNumber][3])] = value; // update the edit buffer ! ^^ // UpdateDinStates(); break; #if DEBUG_router Serial.print(F(""ControlChange MIDI_SendVoiceParam/EditBuffer[device] : "")); Serial.print(channel, DEC); Serial.print(F("" "")); Serial.print(controlNumber, DEC); Serial.print(F("" "")); Serial.println(value, DEC); Serial.print(F(""EditBuffer[device]["")); Serial.print(controlNumber, HEX); Serial.print(F(""] = "")); Serial.println(value, HEX); #endif } } else { // not concerned, so quit return; } } ///////////////////////////////////////////////////////////////////////// // CC router handler //////////////////////////////////////////////////////////////////////// void HandleProgramChange(byte channel, byte program) { MIDI_Incoming = true; if ((channel >= MIDI_CHANNEL) && (channel <= MIDI_CHANNEL + 4) && (program < 100)) { //if you want to display stuff received : // // device = channel + 0x09; /// pas bon P.M bug M1000 26.2.17 device = channel + Matrix_Device_A - MIDI_CHANNEL; uPatch[channel + Matrix_Device_A - MIDI_CHANNEL] = program; Show_Selected_Device(device); //INTERFACE_SERIAL = channel; #if DEBUG_midi Serial.print(F(""channel = "")); Serial.println(channel, DEC); Serial.print(F(""program = "")); Serial.println(program, DEC); Serial.print(F(""device = "")); Serial.println(channel + Matrix_Device_A - MIDI_CHANNEL, DEC); Serial.print(F(""INTERFACE_SERIAL = "")); Serial.println(INTERFACE_SERIAL, DEC); Serial.print(F(""uPatch[device] = "")); Serial.println(uPatch[device], DEC); #endif // Read_Patch_From_BS(channel + Matrix_Device_A - MIDI_CHANNEL, uBank[channel + Matrix_Device_A - MIDI_CHANNEL], uPatch[channel + Matrix_Device_A - MIDI_CHANNEL]); switch (device) { case Matrix_Device_A: ARP_GLOBAL_INIT(device); Reset_UI_ARP(); // stop arp parameters Read_Patch_From_BS(device, uBank[device], uPatch[device]); // read into BS UpdateDinStates(); // mise à jour des Leds SendEditBuffer(device, INTERFACE_SERIAL1); MIDI_Send_UNISONDETUNE(INTERFACE_SERIAL1, UnisonDetune[device]); // send Unison detune value ArpParameters_Load(device); // load arp parameters break; case Matrix_Device_B: Read_Patch_From_BS(device, uBank[device], uPatch[device]); // read into BS UpdateDinStates(); // mise à jour des Leds SendEditBuffer(device, INTERFACE_SERIAL2); MIDI_Send_UNISONDETUNE(INTERFACE_SERIAL2, UnisonDetune[device]); // send Unison detune value break; case Matrix_Device_C: Read_Patch_From_BS(device, uBank[device], uPatch[device]); // read into BS UpdateDinStates(); // mise à jour des Leds SendEditBuffer(device, INTERFACE_SERIAL4); MIDI_Send_UNISONDETUNE(INTERFACE_SERIAL4, UnisonDetune[device]); // send Unison detune value break; case Matrix_Device_D: Read_Patch_From_BS(device, uBank[device], uPatch[device]); // read into BS UpdateDinStates(); // mise à jour des Leds SendEditBuffer(device, INTERFACE_SERIAL5); MIDI_Send_UNISONDETUNE(INTERFACE_SERIAL5, UnisonDetune[device]); // send Unison detune value break; } SoftPanel.Mode = Patch; SoftPanel_DisplayHandler(); // else delete all above except read patch from BS return; } else { // not concerned return; } } ///////////////////////////////////////////////////////////////////////// // aftertouch router handler //////////////////////////////////////////////////////////////////////// void HandleAfterTouchChannel(byte channel, byte pressure) { MIDI_Incoming = true; if (channel == MIDI_CHANNEL + 0) MIDI1.sendAfterTouch(pressure, channel); if (channel == MIDI_CHANNEL + 1) MIDI2.sendAfterTouch(pressure, channel); //if(channel == MIDI_CHANNEL+8) // MIDI3.sendAfterTouch(pressure, channel); #if SOFTSERIAL_ENABLED if (channel == MIDI_CHANNEL + 2) MIDI4.sendAfterTouch(pressure, channel); if (channel == MIDI_CHANNEL + 3) MIDI5.sendAfterTouch(pressure, channel); #endif #if DEBUG_router Serial.print(F(""Aftertouch handled and sent : "")); Serial.print(channel, DEC); Serial.print(F("" aftertouch "")); Serial.println(pressure); #endif } ///////////////////////////////////////////////////////////////////////// // pitchbend router handler //////////////////////////////////////////////////////////////////////// void HandlePitchBend(byte channel, int pitchValue) { MIDI_Incoming = true; // ça merdouille :/ if (channel == MIDI_CHANNEL + 0) MIDI1.sendPitchBend(pitchValue, channel); if (channel == MIDI_CHANNEL + 1) MIDI2.sendPitchBend(pitchValue, channel); //if(channel == MIDI_CHANNEL+8) // MIDI3.sendPitchBend(pitchValue, channel); #if SOFTSERIAL_ENABLED if (channel == MIDI_CHANNEL + 2) MIDI4.sendPitchBend(pitchValue, channel); if (channel == MIDI_CHANNEL + 3) MIDI5.sendPitchBend(pitchValue, channel); #endif #if DEBUG_router Serial.print(F(""Pitchbend handled and sent : "")); Serial.print(channel, DEC); Serial.print(F("" pitchbend = "")); Serial.println(pitchValue, DEC); #endif } ///////////////////////////////////////////////////////////////////////// // F8 clock router handler //////////////////////////////////////////////////////////////////////// void HandleClock(void) { // don't show midi here : the heartbeat LED does // MIDI_Incoming = true; if (systmClock == MIDCLK) { ARP2(); // we always call ARP2() SEQ(); // we always call seq() // each time a clock message 0xf8 is received on MIDI3 Input port we increment mClock : ++mClock; if (mClock > 23) // 24 ppqn mClock = 0; // reset // Flash on each beat during a half quarter (métronome) : 6 pulses x 4 = 24 ppqn // || 0 1 2 3 4 5 | 6 7 8 9 10 11 | 12 13 14 15 16 17 | 18 19 20 21 22 23 || // if (mClock > 5) DOUT_PinSet(DOUT_ACTIVITY2, 0); // heartbeat led else DOUT_PinSet(DOUT_ACTIVITY2, 1); } #if DEBUG_router Serial.print(F(""midi Clock handled. "")); Serial.print(F(""mClock = "")); Serial.println(mClock); #endif } ///////////////////////////////////////////////////////////////////////// // FA start router handler //////////////////////////////////////////////////////////////////////// void HandleStart(void) { MIDI_Incoming = true; if (systmClock == MIDCLK) { mClock = -1; // reset bar (= 255) } #if DEBUG_router Serial.print(F(""midi Start handled. "")); Serial.print(F(""mClock = "")); Serial.println(mClock); Serial.println(); #endif } ///////////////////////////////////////////////////////////////////////// // FC stop router handler //////////////////////////////////////////////////////////////////////// void HandleStop(void) { MIDI_Incoming = true; if (systmClock == MIDCLK) { mClock = 24; // end bar DOUT_PinSet(DOUT_ARP, 0); // light off Arp LED } #if DEBUG_router Serial.print(F(""midi Stop handled. "")); Serial.print(F(""mClock = "")); Serial.println(mClock); Serial.println(); #endif } ///////////////////////////////////////////////////////////////////////// // FB continue router handler //////////////////////////////////////////////////////////////////////// void HandleContinue(void) { MIDI_Incoming = true; // ... what to do :/ ??? nop #if DEBUG_router Serial.print(F(""midi Continue handled. "")); Serial.print(F(""mClock = "")); Serial.println(mClock); Serial.println(); #endif } /////////////////////////////////////////////////////// // Midi SysEx handler //////////////////////////////////////////////////////// void HandleSystemExclusive(byte *sysex, unsigned int length) { // thanks to this forum topic : // https://forum.arduino.cc/index.php?topic=344674.0 #if DEBUG_sysexhandler Serial.println(millis()); #endif SR.Led_Pin_Write(DOUT_ACTIVITY, 1); // midi led ON #if DEBUG_sysexhandler //Print Sysex on Serial0 on serial monitor window : Serial.println(F(""HandleSystemExclusive : "")); for (unsigned int i = 0; i < length; ++i) { Serial.print(sysex[i], HEX); Serial.print("" ""); } Serial.println(F(""EOX "")); Serial.print(F(""length = "")); Serial.println(length, DEC); Serial.println(); #endif // disableMidiCallbacks(); // NRT : stable 2/4/2016 HandleReceivedSysEx(sysex, length); // NRT : stable 2/4/2016 // Serial3.flush();// NRT : stable 2/4/2016 // enableMidiCallbacks(); // NRT : stable 2/4/2016 SR.Led_Pin_Write(DOUT_ACTIVITY, 0); // midi led Off } /////////////////////////////////////////////////////// // received SysEx handler //////////////////////////////////////////////////////// unsigned int HandleReceivedSysEx(byte *sysex, unsigned int length) { if ((sysex[1] == 0x10) && (sysex[2] == 0x06)) // for matrix synths and Matrix Ctrlr units { switch (length) { case 7: // MIDI_RequestMastersParameters if (sysex[3] == 0x04 && sysex[4] == 0x03) { // requete sur Ctrlr + envoi Core out SendGlobalParameters(INTERFACE_SERIAL3); } // MIDI_RequestEditBuffer if (sysex[3] == 0x04 && sysex[4] == 0x04) { // requete sur Ctrlr + envoi core out SendEditBuffer( device, INTERFACE_SERIAL3); } // parameter sysex if (sysex[3] = 0x06) { // get parameter and its value -> sysex[4] & sysex[5] // update editbuffer & UI (dout) of the selected device, update_EditBuffer(device, sysex[4], sysex[5]); UpdateDinStates(); // send parameter's value to the selected device MIDI_SendVoiceParam(INTERFACE_SERIAL, sysex[4], sysex[5], mThru_XCc); } return sysex[3]; break; case 275: switch (sysex[3]) { case 0x01: // sysex[4]: numéro de patch 0-99 // EXTRATRICK here : scoot patch 0, next will be 1 then delay, then 3 etc. // Initiate a second pass manually accepting zero, delay, 2, delay, 4 etc : if (sysex[4] > 99) return sysex[4]; // not concerned so quit if (MIDI_ReceivingBank) // asking bank to the Matrix ""GET"" { SR.Led_Pin_Write(DOUT_F1, 1); // f1 led ON for (unsigned char i = 0; i < 134; ++i) { EditBuffer[device][i] = (sysex[5 + 2 * i + 1] << 4) + (sysex[5 + 2 * i] & 0x0f); } Write_Bank_To_BS2(device, uBank[device], sysex[4]); //last patch received : // reset receivig bank status // create iterative name, default apr and seq and uni and write them to mem2 & mem4 if (sysex[4] == 99) { MIDI_ReceivingBank = false; lcd.setCursor(0, 1); lcd.print(F(""Bank received ! "")); elapsedTime = 0; //reset tmpMessage Write_Default_Patchname(device, uBank[device], BankNumberDump); } SR.Led_Pin_Write(DOUT_F1, 0); return sysex[4]; } else // classic behaviour { SR.Led_Pin_Write(DOUT_SHIFT, 1); // shift led ON for (unsigned char i = 0; i < 134; ++i) { EditBuffer[device][i] = (sysex[5 + 2 * i + 1] << 4) + (sysex[5 + 2 * i] & 0x0f); } UpdateDinStates(); // update LEDs at the end of the sysex // print temp message on display //LCD_Clear(); lcd.setCursor(0, 1); lcd.print(F(""Patch received : "")); LCD_PrintBCD3(sysex[4]); //lcd.print(F("" "")); elapsedTime = 0; //reset tmpMessage Write_Bank_To_BS(device, uBank[device], sysex[4]); // write received patch without setting its number bankpatch in internal EEPROM ! // Wire.h de l'arduino n'est pas assez rapide et n'arrive pas à faire cette fonction v0.96 : introduction dun delai de 300ms lors de l upload // corrigé dans 1.00c avec MINIBUFFER 128 et delay(1). corrigé encore mieux avec extratrick dans 1.02 #if (DEBUG_sysexhandler) Serial.print(F(""sysex[4]=patch num : "")); Serial.println(sysex[4], DEC); for (unsigned int i = 0; i < length; ++i) { Serial.print(sysex[i], HEX); Serial.print(F("" "")); } Serial.println(F("" "")); Serial.println(F(""EditBuffer[device] : "")); for (unsigned char i = 0; i < 134; ++i) { Serial.print(EditBuffer[device][i], HEX); Serial.print(F("" "")); } Serial.println(); Serial.println(); Serial.print(F(""END_MIDI_HandleBank "")); Serial.println(sysex[4], DEC); Serial.println(); Serial.println(); #endif #if DEBUG_factory Serial.print(F(""{"")); for (unsigned char i = 0; i < 133; ++i) { Serial.print(F(""0x"")); if (EditBuffer[device][i] < 0x10) Serial.print(F(""0"")); Serial.print(EditBuffer[device][i], HEX); Serial.print(F("", "")); } Serial.print(F(""0x"")); if (EditBuffer[device][133] < 0x10) Serial.print(F(""0"")); Serial.print(EditBuffer[device][133], HEX); Serial.print(F(""},"")); Serial.print(F("" // patch "")); Serial.println(sysex[4], DEC); #endif SR.Led_Pin_Write(DOUT_SHIFT, 0); // shift led Off return sysex[4]; } break; case 0x0d: //EditBuffer[device] SR.Led_Pin_Write(DOUT_EDIT, 1); // Shift LED ON // update EditBuffer[device] for (unsigned char i = 0; i < 134; ++i) { EditBuffer[device][i] = (sysex[5 + 2 * i + 1] << 4) + (sysex[5 + 2 * i] & 0x0f); } UpdateDinStates(); // print temp message on display lcd.setCursor(0, 1); lcd.print(F(""EditBuffer received "")); elapsedTime = 0; //reset tmpMessage // update matrix SendEditBuffer(device, INTERFACE_SERIAL); SR.Led_Pin_Write(DOUT_EDIT, 0); // Shift LED Off #if DEBUG_sysexhandler Serial.println(F(""EditBuffer[device] sysex msg type (received from DAW) !"")); Serial.println(F(""EditBuffer[device] sent to Mx : "")); for (unsigned char i = 0; i < 134; ++i) { Serial.print(EditBuffer[device][i], HEX); Serial.print(F("" "")); } Serial.println(); #endif return 1; break; default: return sysex[4]; break; } break; case 351: if ((sysex[3] == 0x03) && (sysex[4] == 0x03)) { SR.Led_Pin_Write(DOUT_SHIFT, 1); // shift led ON SR.Led_Pin_Write(DOUT_CFG, 1); //SR.Led_Pin_Write(DOUT_MATRIXMOD, 1); for (unsigned char i = 0; i < 172; ++i) { // define buffer GlobalParameters[i] = (sysex[5 + 2 * i + 1] << 4) + (sysex[5 + 2 * i] & 0x0f); // write master parameters in internal EEPROM here : EEPROM.update(EEPROM_GLOBALPARAMETERS + i, GlobalParameters[i]); #if DEBUG_inteeprom Serial.print(F(""writing GlobalParameter["")); Serial.print(i, DEC); Serial.print(F(""] on internal EEPROM addr : $"")); Serial.println(EEPROM_GLOBALPARAMETERS + i, HEX); #endif } #if DEBUG_sysexhandler Serial.println(F(""Master Parameters[ ] = { "")); for (unsigned char i = 0; i < 172; ++i) { Serial.print(GlobalParameters[i], DEC); Serial.print(F("", "")); // to get it via serial debug and put into arduino IDE code easily ;) } Serial.println(F("" }"")); #endif // print temp message on display LCD_Clear(); lcd.setCursor(0, 1); lcd.print(F(""Master received "")); elapsedTime = 0; //reset tmpMessage SR.Led_Pin_Write(DOUT_SHIFT, 0); // shift led Off SR.Led_Pin_Write(DOUT_CFG, 0); //SR.Led_Pin_Write(DOUT_ARP, 0); return 3; // code3 = master parameters sysex } else return 350; break; case 6: if (sysex[3] == 0x0a) { uBank[device] = sysex[4]; return 0x0a; } else return sysex[3]; break; case 143: if (sysex[3] == 0x09) // arp sysex { SR.Led_Pin_Write(DOUT_ARP, 1); // arp led ON SR.Led_Pin_Write(DOUT_EDIT, 1); // get arrays for (unsigned char i = 0; i < 20; ++i) { ArpParametersOrig[i] = (sysex[5 + 2 * i + 1] << 4) + (sysex[5 + 2 * i] & 0x0f); } for (unsigned char j = 0; j < 32; j++) { sequenceOrig[j][0] = (sysex[46 + (2 * j)] << 4) + (sysex[45 + (2 * j)] & 0x0f); } for (unsigned char k = 0; k < 32; k++) { sequenceOrig[k][1] = (sysex[78 + (2 * k)] << 4) + (sysex[77 + (2 * k)] & 0x0f); } //saving is done by the Bank dump, //so upload arpsysex BEFORE PatchData SR.Led_Pin_Write(DOUT_ARP, 0); // arp led ON SR.Led_Pin_Write(DOUT_EDIT, 0); return 0x09; } else return sysex[3]; break; case 9: if (sysex[3] == 0x08) // Unison sysex { SR.Led_Pin_Write(DOUT_EDIT, 1); UnisonDetuneOrig = (sysex[6] << 4) + (sysex[5] & 0x0f); //saving is done by the Bank dump, //so upload Unisonsysex BEFORE PatchData SR.Led_Pin_Write(DOUT_EDIT, 0); return 6; } else return sysex[3]; break; case 52: // SystemCfg if (sysex[3] == 0x0f) // // SystemCfg { SR.Led_Pin_Write(DOUT_CFG, 1); // update system cfg parameters in RAM MIDI_CHANNEL = sysex[4]; FilterSustainMode = sysex[5]; uBank[Matrix_Device_A] = sysex[6]; uPatch[Matrix_Device_A] = sysex[7]; uBank[Matrix_Device_B] = sysex[8]; uPatch[Matrix_Device_B] = sysex[9]; uBank[Matrix_Device_C] = sysex[10]; uPatch[Matrix_Device_C] = sysex[11]; uBank[Matrix_Device_D] = sysex[12]; uPatch[Matrix_Device_D] = sysex[13]; device = sysex[14]; matrix_model_A = sysex[15]; matrix_model_B = sysex[16]; matrix_model_C = sysex[17]; matrix_model_D = sysex[18]; encoder_inverted = sysex[19]; mThru_XCc = sysex[20]; // dummy sysex[21] EEPROM.read(EEPROM_EXTCLOCK) -> not used for (unsigned char i = 0; i < 4; ++i) { for (unsigned char j = 0; j < 5; ++j) { ZONE[i][j] = sysex[22 + 5 * i + j]; } } zActive = sysex[42]; localControl = sysex[43]; #if DEBUG_sysexhandler Serial.println(F(""SystemCfg msg received "")); for (unsigned char i = 0; i < 52; ++i) { Serial.print(sysex[i], HEX); Serial.print(F("" "")); // to get it via serial debug and put into code easily ;) } Serial.println(); #endif // print temp message on display lcd.setCursor(0, 1); lcd.print(F(""System received "")); elapsedTime = 0; //reset tmpMessage // http://www.locoduino.org/spip.php?article72 // update system cfg parameters in ROM EEPROM.update(EEPROM_MIDI_CHANNEL, MIDI_CHANNEL); EEPROM.update(EEPROM_FILTERSUSTAIN_MODE, FilterSustainMode); // save this EEPROM.update(EEPROM_LASTBANKA, uBank[Matrix_Device_A]); EEPROM.update(EEPROM_LASTPATCHA, uPatch[Matrix_Device_A]); EEPROM.update(EEPROM_LASTBANKB, uBank[Matrix_Device_B]); EEPROM.update(EEPROM_LASTPATCHB, uPatch[Matrix_Device_B]); EEPROM.update(EEPROM_LASTBANKC, uBank[Matrix_Device_C]); EEPROM.update(EEPROM_LASTPATCHC, uPatch[Matrix_Device_C]); EEPROM.update(EEPROM_LASTBANKD, uBank[Matrix_Device_D]); EEPROM.update(EEPROM_LASTPATCHD, uPatch[Matrix_Device_D]); EEPROM.update(EEPROM_DEVICE, device); // save last device used (note : don't use too much write eeprom) EEPROM.update(EEPROM_MATRIX_MODELE_A, matrix_model_A); EEPROM.update(EEPROM_MATRIX_MODELE_B, matrix_model_B); EEPROM.update(EEPROM_MATRIX_MODELE_C, matrix_model_C); EEPROM.update(EEPROM_MATRIX_MODELE_D, matrix_model_D); EEPROM.update(EEPROM_ENCODER_INVERTED, encoder_inverted); EEPROM.update(EEPROM_MTHRU_XCC, mThru_XCc); ZONE_Save(); EEPROM.update(EEPROM_LOCAL_CONTROL, localControl); #if DEBUG_inteeprom Serial.print(F(""writing SystemCfg, "")); Serial.print(F(""sysex type $"")); Serial.println(sysex[3], HEX); #endif // reboot system software_Reboot(); return 52; } else return sysex[3]; break; case 8: // diagnostics if (sysex[3] == 0x0f && sysex[4] == 0x01) // echo on core out ONLY { MIDI_Rcv_Diagnostics(INTERFACE_SERIAL3, sysex[5], sysex[6]); return 8; } else if (sysex[3] == 0x0f && sysex[4] == 0x01) // echo on all midi outputs { MIDI_Rcv_Diagnostics(INTERFACE_SERIAL3, sysex[5], sysex[6]); MIDI_Rcv_Diagnostics(INTERFACE_SERIAL1, sysex[5], sysex[6]); MIDI_Rcv_Diagnostics(INTERFACE_SERIAL2, sysex[5], sysex[6]); MIDI_Rcv_Diagnostics(INTERFACE_SERIAL4, sysex[5], sysex[6]); MIDI_Rcv_Diagnostics(INTERFACE_SERIAL5, sysex[5], sysex[6]); return 8; } // other messages below // etc ... else return sysex[4]; break; default: return 0x10; break; } } else { // not matrix, it is something else, so return. return 0; } #if DEBUG_sysexhandler Serial.println(F(""END of MIDI_HandleBank() "")); #endif } /////////////////////////////////////////////////////////////////////////////////// // Activate all necessary MIDI callbacks // Connect the midi callbacks to the library /////////////////////////////////////////////////////////////////////////////////// void enableMidiCallbacks(void) { /////// Midi CORE IN ////////////////// MIDI3.setHandleNoteOff(ZoneNoteOff); MIDI3.setHandleNoteOn(ZoneNoteOn); MIDI3.setHandleControlChange(HandleControlChange); MIDI3.setHandleProgramChange(HandleProgramChange); MIDI3.setHandleAfterTouchChannel(HandleAfterTouchChannel); MIDI3.setHandlePitchBend(HandlePitchBend); MIDI3.setHandleSystemExclusive(HandleSystemExclusive); MIDI3.setHandleClock(HandleClock); MIDI3.setHandleStart(HandleStart); MIDI3.setHandleContinue(HandleContinue); MIDI3.setHandleStop(HandleStop); /////// Midi IN A ///////////////////// MIDI1.setHandleNoteOff(ZoneNoteOff); MIDI1.setHandleNoteOn(ZoneNoteOn); MIDI1.setHandleControlChange(HandleControlChange); MIDI1.setHandleProgramChange(HandleProgramChange); MIDI1.setHandleAfterTouchChannel(HandleAfterTouchChannel); MIDI1.setHandlePitchBend(HandlePitchBend); MIDI1.setHandleSystemExclusive(HandleSystemExclusive); } //////////////////////////////////////////////////////////////////////////////////// // Deactivate all activated MIDI callbacks //////////////////////////////////////////////////////////////////////////////////// void disableMidiCallbacks(void) { /////// Midi CORE IN ////////////////// MIDI3.disconnectCallbackFromType(midi::NoteOn); MIDI3.disconnectCallbackFromType(midi::NoteOff); MIDI3.disconnectCallbackFromType(midi::ControlChange); MIDI3.disconnectCallbackFromType(midi::ProgramChange); MIDI3.disconnectCallbackFromType(midi::AfterTouchChannel); MIDI3.disconnectCallbackFromType(midi::PitchBend); MIDI3.disconnectCallbackFromType(midi::SystemExclusive); MIDI3.disconnectCallbackFromType(midi::Clock); MIDI3.disconnectCallbackFromType(midi::Start); MIDI3.disconnectCallbackFromType(midi::Continue); MIDI3.disconnectCallbackFromType(midi::Stop); /////// Midi IN A ///////////////////// MIDI1.disconnectCallbackFromType(midi::NoteOn); MIDI1.disconnectCallbackFromType(midi::NoteOff); MIDI1.disconnectCallbackFromType(midi::ControlChange); MIDI1.disconnectCallbackFromType(midi::ProgramChange); // can be removed MIDI1.disconnectCallbackFromType(midi::AfterTouchChannel); MIDI1.disconnectCallbackFromType(midi::PitchBend); //MIDI1.disconnectCallbackFromType(midi::SystemExclusive); } /* // // // A VOIR SI ON LA GARDE, un peu débile comme fonction // void GetBank(unsigned char interface, unsigned char bankRequested) { unsigned char programRequested; unsigned long startTime; // byte sysex_patch[] = {0xf0, 0x10,0x06,0x04,0x01,programRequested,0xf7}; // set bank to request if (matrix_modele == matrix_6) { bankRequested = 0; } else { bankRequested = bankRequested; MIDI_SetBank(interface, bankRequested); programRequested = 0; } #if DEBUG_sysexbankhandler Serial.print(F(""GetBank : "")); Serial.println(bankRequested); Serial.println(); #endif for (unsigned char i = 0; i < 101; ++i) { startTime = millis(); // sysex_patch[5] = programRequested; // request a program, start at 0 switch (interface) // sending program change as the polling doesn""t work :( { case INTERFACE_SERIAL1: MIDI1.sendProgramChange(programRequested, MIDI_CHANNEL); break; case INTERFACE_SERIAL2: MIDI2.sendProgramChange(programRequested, MIDI_CHANNEL + 1); break; // case INTERFACE_SERIAL3: // MIDI3.sendProgramChange(programRequested,MIDI_CHANNEL+8); // break; #if SOFTSERIAL_ENABLED case INTERFACE_SERIAL4: MIDI4.sendProgramChange(programRequested, MIDI_CHANNEL + 3); break; case INTERFACE_SERIAL5: MIDI5.sendProgramChange(programRequested, MIDI_CHANNEL + 4); break; #endif default: break; } lcd.setCursor(11, 1); lcd.print(programRequested, DEC); //MIDI_RequestEditBuffer[device](interface, programRequested); //MIDI1.sendSysEx(sizeof(sysex_patch), sysex_patch, true); // enfin ! ça marche !! MIDI_RequestSinglePatch(interface, programRequested); while (millis() < (startTime + 150)) // Matrix6 uses 133 msec to request and send his patchbuffer !!! { // wait ... to get EditBuffer[device] thanks to MIDI_HandleBank() } // so write it onto extEEPROM : NE PAS CHANGER delay(5) dans la lib 24LC512 sinon ça marche plus ! delayMicroseconds useless !! Write_Patch_To_BS(device, bankRequested, programRequested - 1); // trick is here : -1 // then wait as this process is long :/ while (millis() < (startTime + 700)) // at least 670 msec { // wait ... wait ... wait ... have a smoke :v } ++programRequested; // i2c is free so we can increment again and reloop ! // last = 101 } if (programRequested == 101) { // 0,...,99, end. (program was 100 at the end of the loop) lcd.setCursor(8, 1); lcd.print(F(""DONE! "")); delay(800); #if DEBUG_sysexbankhandler Serial.println(F(""GetBank() finished !"")); #endif return; // finished ! } else { lcd.setCursor(8, 1); lcd.print(F(""error "")); delay(2000); #if DEBUG_sysexbankhandler Serial.println(); Serial.println(F(""GetBank error !!!"")); Serial.println(); #endif return; } } */ ",12285,False,2053.8762405437997,median "CLASS zcl_gtt_mia_tp_reader_shh DEFINITION PUBLIC CREATE PUBLIC . PUBLIC SECTION. INTERFACES zif_gtt_mia_tp_reader . METHODS constructor IMPORTING !io_ef_parameters TYPE REF TO zif_gtt_mia_ef_parameters . PROTECTED SECTION. PRIVATE SECTION. TYPES: tt_trobj_res_id TYPE STANDARD TABLE OF zif_gtt_mia_app_types=>tv_trobj_res_id WITH EMPTY KEY . TYPES: tt_trobj_res_val TYPE STANDARD TABLE OF zif_gtt_mia_app_types=>tv_trobj_res_val WITH EMPTY KEY . TYPES: tt_resrc_cnt TYPE STANDARD TABLE OF zif_gtt_mia_app_types=>tv_resrc_cnt WITH EMPTY KEY . TYPES: tt_resrc_tp_id TYPE STANDARD TABLE OF zif_gtt_mia_app_types=>tv_resrc_tp_id WITH EMPTY KEY . TYPES: tt_crdoc_ref_typ TYPE STANDARD TABLE OF zif_gtt_mia_app_types=>tv_crdoc_ref_typ WITH EMPTY KEY . TYPES: tt_crdoc_ref_val TYPE STANDARD TABLE OF zif_gtt_mia_app_types=>tv_crdoc_ref_val WITH EMPTY KEY . TYPES: BEGIN OF ts_sh_header, tknum TYPE vttkvb-tknum, bu_id_num TYPE /saptrx/paramval200, cont_dg TYPE vttkvb-cont_dg, tndr_trkid TYPE vttkvb-tndr_trkid, ship_type TYPE zif_gtt_mia_app_types=>tv_ship_type, trans_mode TYPE zif_gtt_mia_app_types=>tv_trans_mode, ship_kind TYPE zif_gtt_mia_app_types=>tv_shipment_kind, departure_dt TYPE zif_gtt_mia_app_types=>tv_departure_dt, departure_tz TYPE zif_gtt_mia_app_types=>tv_departure_tz, departure_locid TYPE zif_gtt_mia_app_types=>tv_locid, departure_loctype TYPE zif_gtt_mia_app_types=>tv_loctype, arrival_dt TYPE zif_gtt_mia_app_types=>tv_arrival_dt, arrival_tz TYPE zif_gtt_mia_app_types=>tv_arrival_tz, arrival_locid TYPE zif_gtt_mia_app_types=>tv_locid, arrival_loctype TYPE zif_gtt_mia_app_types=>tv_loctype, tdlnr TYPE vttkvb-tdlnr, deliv_cnt TYPE STANDARD TABLE OF zif_gtt_mia_app_types=>tv_deliv_cnt WITH EMPTY KEY, deliv_no TYPE STANDARD TABLE OF vbeln WITH EMPTY KEY, trobj_res_id TYPE tt_trobj_res_id, trobj_res_val TYPE tt_trobj_res_val, resrc_cnt TYPE tt_resrc_cnt, resrc_tp_id TYPE tt_resrc_tp_id, crdoc_ref_typ TYPE tt_crdoc_ref_typ, crdoc_ref_val TYPE tt_crdoc_ref_val, stpid_stopid TYPE STANDARD TABLE OF zif_gtt_mia_app_types=>tv_stopid WITH EMPTY KEY, stpid_stopcnt TYPE STANDARD TABLE OF zif_gtt_mia_app_types=>tv_stopcnt WITH EMPTY KEY, stpid_loctype TYPE STANDARD TABLE OF zif_gtt_mia_app_types=>tv_loctype WITH EMPTY KEY, stpid_locid TYPE STANDARD TABLE OF zif_gtt_mia_app_types=>tv_locid WITH EMPTY KEY, END OF ts_sh_header . DATA mo_ef_parameters TYPE REF TO zif_gtt_mia_ef_parameters . CONSTANTS: BEGIN OF cs_mapping, tknum TYPE /saptrx/paramname VALUE 'YN_SHP_NO', bu_id_num TYPE /saptrx/paramname VALUE 'YN_SHP_SA_LBN_ID', cont_dg TYPE /saptrx/paramname VALUE 'YN_SHP_CONTAIN_DGOODS', tndr_trkid TYPE /saptrx/paramname VALUE 'YN_SHP_FA_TRACKING_ID', ship_type TYPE /saptrx/paramname VALUE 'YN_SHP_SHIPPING_TYPE', trans_mode TYPE /saptrx/paramname VALUE 'YN_SHP_TRANSPORTATION_MODE', ship_kind TYPE /saptrx/paramname VALUE 'YN_SHP_SHIPMENT_TYPE', departure_dt TYPE /saptrx/paramname VALUE 'YN_SHP_PLN_DEP_BUS_DATETIME', departure_tz TYPE /saptrx/paramname VALUE 'YN_SHP_PLN_DEP_BUS_TIMEZONE', departure_locid TYPE /saptrx/paramname VALUE 'YN_SHP_PLN_DEP_LOC_ID', departure_loctype TYPE /saptrx/paramname VALUE 'YN_SHP_PLN_DEP_LOC_TYPE', arrival_dt TYPE /saptrx/paramname VALUE 'YN_SHP_PLN_AR_BUS_DATETIME', arrival_tz TYPE /saptrx/paramname VALUE 'YN_SHP_PLN_AR_BUS_TIMEZONE', arrival_locid TYPE /saptrx/paramname VALUE 'YN_SHP_PLN_AR_LOC_ID', arrival_loctype TYPE /saptrx/paramname VALUE 'YN_SHP_PLN_AR_LOC_TYPE', tdlnr TYPE /saptrx/paramname VALUE 'YN_SHP_SA_ERP_ID', deliv_cnt TYPE /saptrx/paramname VALUE 'YN_SHP_HDR_DLV_LINE_COUNT', deliv_no TYPE /saptrx/paramname VALUE 'YN_SHP_HDR_DLV_NO', trobj_res_id TYPE /saptrx/paramname VALUE 'YN_SHP_TRACKED_RESOURCE_ID', trobj_res_val TYPE /saptrx/paramname VALUE 'YN_SHP_TRACKED_RESOURCE_VALUE', resrc_cnt TYPE /saptrx/paramname VALUE 'YN_SHP_RESOURCE_TP_LINE_COUNT', resrc_tp_id TYPE /saptrx/paramname VALUE 'YN_SHP_RESOURCE_TP_ID', crdoc_ref_typ TYPE /saptrx/paramname VALUE 'YN_SHP_CARRIER_REF_TYPE', crdoc_ref_val TYPE /saptrx/paramname VALUE 'YN_SHP_CARRIER_REF_VALUE', stpid_stopid TYPE /saptrx/paramname VALUE 'YN_SHP_VP_STOP_ID', stpid_stopcnt TYPE /saptrx/paramname VALUE 'YN_SHP_VP_STOP_ORD_NO', stpid_loctype TYPE /saptrx/paramname VALUE 'YN_SHP_VP_STOP_LOC_TYPE', stpid_locid TYPE /saptrx/paramname VALUE 'YN_SHP_VP_STOP_LOC_ID', END OF cs_mapping . METHODS fill_header_from_vttk IMPORTING !ir_vttk TYPE REF TO data !iv_vttp_cnt TYPE i CHANGING !cs_header TYPE ts_sh_header RAISING cx_udm_message . METHODS fill_header_from_vttp IMPORTING !ir_vttk TYPE REF TO data !ir_vttp TYPE REF TO data CHANGING !cs_header TYPE ts_sh_header RAISING cx_udm_message . METHODS fill_header_from_vtts IMPORTING !ir_vttk TYPE REF TO data !ir_vttp TYPE REF TO data !ir_vtts TYPE REF TO data !ir_vtsp TYPE REF TO data OPTIONAL CHANGING !cs_header TYPE ts_sh_header RAISING cx_udm_message . METHODS fill_tracked_object_tables IMPORTING !is_vttk TYPE vttkvb EXPORTING !et_res_id TYPE tt_trobj_res_id !et_res_val TYPE tt_trobj_res_val . METHODS fill_resource_tables IMPORTING !is_vttk TYPE vttkvb EXPORTING !et_ref_cnt TYPE tt_resrc_cnt !et_tp_id TYPE tt_resrc_tp_id . METHODS fill_carrier_ref_doc_tables IMPORTING !is_vttk TYPE vttkvb EXPORTING !et_ref_typ TYPE tt_crdoc_ref_typ !et_ref_val TYPE tt_crdoc_ref_val . METHODS get_forwarding_agent_id_number IMPORTING !iv_tdlnr TYPE tdlnr RETURNING VALUE(rv_id_num) TYPE /saptrx/paramval200 . METHODS get_resource_tracking_id IMPORTING !is_vttk TYPE vttkvb RETURNING VALUE(rv_tracking_id) TYPE /saptrx/trxid . METHODS get_shippment_header IMPORTING !is_app_object TYPE trxas_appobj_ctab_wa !ir_vttk TYPE REF TO data RETURNING VALUE(rr_vttk) TYPE REF TO data RAISING cx_udm_message . METHODS get_shippment_item_count IMPORTING !ir_vttp TYPE REF TO data RETURNING VALUE(rv_count) TYPE i RAISING cx_udm_message . METHODS get_shippment_type IMPORTING !iv_vsart TYPE clike !iv_vttp_cnt TYPE i RETURNING VALUE(rv_ship_type) TYPE zif_gtt_mia_app_types=>tv_ship_type . METHODS get_transportation_mode IMPORTING !iv_vsart TYPE clike RETURNING VALUE(rv_trans_mode) TYPE zif_gtt_mia_app_types=>tv_trans_mode . METHODS is_object_changed IMPORTING !is_app_object TYPE trxas_appobj_ctab_wa RETURNING VALUE(rv_result) TYPE abap_bool RAISING cx_udm_message . ENDCLASS. CLASS zcl_gtt_mia_tp_reader_shh IMPLEMENTATION. METHOD constructor. mo_ef_parameters = io_ef_parameters. ENDMETHOD. METHOD fill_carrier_ref_doc_tables. zcl_gtt_mia_sh_tools=>get_carrier_reference_document( EXPORTING is_vttk = is_vttk IMPORTING ev_ref_typ = DATA(lv_ref_typ) ev_ref_val = DATA(lv_ref_val) ). IF lv_ref_typ IS NOT INITIAL AND lv_ref_val IS NOT INITIAL. et_ref_typ = VALUE #( ( lv_ref_typ ) ). et_ref_val = VALUE #( ( lv_ref_val ) ). ELSE. CLEAR: et_ref_typ[], et_ref_val[]. ENDIF. ENDMETHOD. METHOD fill_header_from_vttk. FIELD-SYMBOLS: TYPE vttkvb. ASSIGN ir_vttk->* TO . IF sy-subrc = 0. cs_header-tknum = -tknum. cs_header-bu_id_num = get_forwarding_agent_id_number( iv_tdlnr = -tdlnr ). cs_header-cont_dg = -cont_dg. cs_header-tndr_trkid = -tndr_trkid. cs_header-ship_type = get_shippment_type( iv_vsart = -vsart iv_vttp_cnt = iv_vttp_cnt ). cs_header-trans_mode = get_transportation_mode( iv_vsart = -vsart ) . cs_header-ship_kind = zif_gtt_mia_app_constants=>cs_shipment_kind-shipment. cs_header-tdlnr = -tdlnr. fill_tracked_object_tables( EXPORTING is_vttk = IMPORTING et_res_id = cs_header-trobj_res_id et_res_val = cs_header-trobj_res_val ). fill_resource_tables( EXPORTING is_vttk = IMPORTING et_ref_cnt = cs_header-resrc_cnt et_tp_id = cs_header-resrc_tp_id ). fill_carrier_ref_doc_tables( EXPORTING is_vttk = IMPORTING et_ref_typ = cs_header-crdoc_ref_typ et_ref_val = cs_header-crdoc_ref_val ). ELSE. MESSAGE e002(zgtt_mia) WITH 'VTTK' INTO DATA(lv_dummy). zcl_gtt_mia_tools=>throw_exception( ). ENDIF. ENDMETHOD. METHOD fill_header_from_vttp. TYPES: tt_vttp TYPE STANDARD TABLE OF vttpvb. DATA: lv_count TYPE i VALUE 0. FIELD-SYMBOLS: TYPE vttkvb, TYPE tt_vttp. ASSIGN ir_vttk->* TO . ASSIGN ir_vttp->* TO . IF sy-subrc = 0. LOOP AT ASSIGNING FIELD-SYMBOL() WHERE tknum = -tknum. ADD 1 TO lv_count. APPEND lv_count TO cs_header-deliv_cnt. APPEND -vbeln TO cs_header-deliv_no. ENDLOOP. ELSEIF IS NOT ASSIGNED. MESSAGE e002(zgtt_mia) WITH 'VTTK' INTO DATA(lv_dummy). zcl_gtt_mia_tools=>throw_exception( ). ELSE. MESSAGE e002(zgtt_mia) WITH 'VTTP' INTO lv_dummy. zcl_gtt_mia_tools=>throw_exception( ). ENDIF. ENDMETHOD. METHOD fill_header_from_vtts. TYPES: BEGIN OF ts_stop_id, stopid TYPE zif_gtt_mia_app_types=>tv_stopid, stopcnt TYPE zif_gtt_mia_app_types=>tv_stopcnt, loctype TYPE zif_gtt_mia_app_types=>tv_loctype, locid TYPE zif_gtt_mia_app_types=>tv_locid, END OF ts_stop_id. DATA(lv_tknum) = CONV tknum( zcl_gtt_mia_tools=>get_field_of_structure( ir_struct_data = ir_vttk iv_field_name = 'TKNUM' ) ). DATA: lt_vtts TYPE vttsvb_tab, lt_stops TYPE zif_gtt_mia_app_types=>tt_stops, lt_stop_ids TYPE STANDARD TABLE OF ts_stop_id, lv_datetime TYPE zif_gtt_mia_app_types=>tv_pln_evt_datetime, lv_locid TYPE zif_gtt_mia_app_types=>tv_locid, lv_count TYPE i. FIELD-SYMBOLS: TYPE vttpvb_tab, TYPE vttsvb_tab, TYPE vtspvb_tab, TYPE zif_gtt_mia_app_types=>ts_stops. ASSIGN ir_vtts->* TO . ASSIGN ir_vttp->* TO . ASSIGN ir_vtsp->* TO . IF IS ASSIGNED AND IS ASSIGNED AND IS ASSIGNED. lt_vtts[] = []. SORT lt_vtts BY tsrfo. zcl_gtt_mia_sh_tools=>get_stops_from_shipment( EXPORTING iv_tknum = lv_tknum it_vtts = lt_vtts it_vtsp = it_vttp = IMPORTING et_stops = lt_stops ). CLEAR: lv_count. SORT lt_stops BY stopid. MOVE-CORRESPONDING lt_stops TO lt_stop_ids. DELETE ADJACENT DUPLICATES FROM lt_stop_ids. LOOP AT lt_stop_ids ASSIGNING FIELD-SYMBOL(). lv_locid = zcl_gtt_mia_tools=>get_pretty_location_id( iv_locid = -locid iv_loctype = -loctype ). APPEND -stopid TO cs_header-stpid_stopid. APPEND -stopcnt TO cs_header-stpid_stopcnt. APPEND -loctype TO cs_header-stpid_loctype. APPEND lv_locid TO cs_header-stpid_locid. ENDLOOP. READ TABLE lt_stops ASSIGNING INDEX 1. IF sy-subrc = 0. cs_header-departure_dt = zcl_gtt_mia_tools=>convert_datetime_to_utc( iv_datetime = -pln_evt_datetime iv_timezone = -pln_evt_timezone ). cs_header-departure_tz = -pln_evt_timezone. cs_header-departure_locid = zcl_gtt_mia_tools=>get_pretty_location_id( iv_locid = -locid iv_loctype = -loctype ). cs_header-departure_loctype = -loctype. ENDIF. READ TABLE lt_stops ASSIGNING INDEX lines( lt_stops ). IF sy-subrc = 0. cs_header-arrival_dt = zcl_gtt_mia_tools=>convert_datetime_to_utc( iv_datetime = -pln_evt_datetime iv_timezone = -pln_evt_timezone ). cs_header-arrival_tz = -pln_evt_timezone. cs_header-arrival_locid = zcl_gtt_mia_tools=>get_pretty_location_id( iv_locid = -locid iv_loctype = -loctype ). cs_header-arrival_loctype = -loctype. ENDIF. ELSE. MESSAGE e002(zgtt_mia) WITH 'VTTS' INTO DATA(lv_dummy). zcl_gtt_mia_tools=>throw_exception( ). ENDIF. ENDMETHOD. METHOD fill_resource_tables. DATA(lv_res_tid) = get_resource_tracking_id( is_vttk = is_vttk ). IF lv_res_tid IS NOT INITIAL. et_ref_cnt = VALUE #( ( 1 ) ). et_tp_id = VALUE #( ( CONV #( lv_res_tid ) ) ). ENDIF. ENDMETHOD. METHOD fill_tracked_object_tables. IF is_vttk-exti1 IS NOT INITIAL AND is_vttk-vsart = '01'. et_res_id = VALUE #( ( 'NA' ) ). et_res_val = VALUE #( ( is_vttk-exti1 ) ). ELSEIF is_vttk-vsart = '04' AND is_vttk-signi IS NOT INITIAL. et_res_id = VALUE #( ( 'CONTAINER_ID' ) ). et_res_val = VALUE #( ( is_vttk-signi ) ). ELSEIF is_vttk-exti1 IS NOT INITIAL AND ( is_vttk-vsart = '05' OR is_vttk-vsart = '15' ). et_res_id = VALUE #( ( 'FLIGHT_NUMBER' ) ). et_res_val = VALUE #( ( is_vttk-exti1 ) ). ELSE. CLEAR: et_res_id[], et_res_val[]. ENDIF. ENDMETHOD. METHOD get_forwarding_agent_id_number. DATA: lv_forward_agt TYPE bu_partner, lt_bpdetail TYPE STANDARD TABLE OF bapibus1006_id_details. CALL METHOD cl_site_bp_assignment=>select_bp_via_cvi_link EXPORTING i_lifnr = iv_tdlnr IMPORTING e_bp = lv_forward_agt. CALL FUNCTION 'BAPI_IDENTIFICATIONDETAILS_GET' EXPORTING businesspartner = lv_forward_agt TABLES identificationdetail = lt_bpdetail. READ TABLE lt_bpdetail ASSIGNING FIELD-SYMBOL() WITH KEY identificationtype = zif_gtt_mia_app_constants=>cv_agent_id_type BINARY SEARCH. rv_id_num = COND #( WHEN sy-subrc = 0 THEN zif_gtt_mia_app_constants=>cv_agent_id_prefix && -identificationnumber ). ENDMETHOD. METHOD get_resource_tracking_id. rv_tracking_id = COND #( WHEN is_vttk-exti1 IS NOT INITIAL AND ( is_vttk-vsart = '01' OR is_vttk-vsart = '05' OR is_vttk-vsart = '15' ) THEN |{ is_vttk-tknum }{ is_vttk-exti1 }| WHEN is_vttk-signi IS NOT INITIAL AND is_vttk-vsart = '04' THEN |{ is_vttk-tknum }{ is_vttk-signi }| ). ENDMETHOD. METHOD get_shippment_header. TYPES: tt_vttk TYPE STANDARD TABLE OF vttkvb. FIELD-SYMBOLS: TYPE tt_vttk. DATA(lv_tknum) = zcl_gtt_mia_tools=>get_field_of_structure( ir_struct_data = is_app_object-maintabref iv_field_name = 'TKNUM' ). ASSIGN ir_vttk->* TO . IF IS ASSIGNED. READ TABLE ASSIGNING FIELD-SYMBOL() WITH KEY tknum = lv_tknum. IF sy-subrc = 0. rr_vttk = REF #( ). ELSE. MESSAGE e005(zgtt_mia) WITH 'VTTK OLD' lv_tknum INTO DATA(lv_dummy). zcl_gtt_mia_tools=>throw_exception( ). ENDIF. ELSE. MESSAGE e002(zgtt_mia) WITH 'VTTK' INTO lv_dummy. zcl_gtt_mia_tools=>throw_exception( ). ENDIF. ENDMETHOD. METHOD get_shippment_item_count. FIELD-SYMBOLS: TYPE ANY TABLE. ASSIGN ir_vttp->* TO . rv_count = lines( ). ENDMETHOD. METHOD get_shippment_type. rv_ship_type = COND #( WHEN iv_vttp_cnt <= 1 THEN SWITCH #( iv_vsart WHEN '01' THEN '18' WHEN '04' THEN '3' ) ELSE SWITCH #( iv_vsart WHEN '01' THEN '17' WHEN '04' THEN '2' ) ). ENDMETHOD. METHOD get_transportation_mode. rv_trans_mode = SWITCH #( iv_vsart WHEN '04' THEN '01' ""Sea WHEN '03' THEN '02' ""Rail WHEN '01' THEN '03' ""Road WHEN '05' THEN '04' ""Air WHEN '15' THEN '04' ""Air WHEN '02' THEN '05' ""Mail WHEN '' THEN '00' ""Not specified ELSE '09'). ""Not applicable ENDMETHOD. METHOD is_object_changed. rv_result = zcl_gtt_mia_tools=>is_object_changed( is_app_object = is_app_object io_ef_parameters = mo_ef_parameters it_check_tables = VALUE #( ( zif_gtt_mia_app_constants=>cs_tabledef-sh_item_new ) ( zif_gtt_mia_app_constants=>cs_tabledef-sh_item_new ) ( zif_gtt_mia_app_constants=>cs_tabledef-sh_stage_new ) ( zif_gtt_mia_app_constants=>cs_tabledef-sh_stage_old ) ( zif_gtt_mia_app_constants=>cs_tabledef-sh_item_stage_new ) ( zif_gtt_mia_app_constants=>cs_tabledef-sh_item_stage_old ) ) iv_key_field = 'TKNUM' iv_upd_field = 'UPDKZ' ). ENDMETHOD. METHOD zif_gtt_mia_tp_reader~check_relevance. DATA(lr_vttp) = mo_ef_parameters->get_appl_table( iv_tabledef = zif_gtt_mia_app_constants=>cs_tabledef-sh_item_new ). rv_result = zif_gtt_mia_ef_constants=>cs_condition-false. IF zcl_gtt_mia_sh_tools=>is_appropriate_type( ir_vttk = is_app_object-maintabref ) = abap_true AND zcl_gtt_mia_sh_tools=>is_delivery_assigned( ir_vttp = lr_vttp ) = abap_true AND is_object_changed( is_app_object = is_app_object ) = abap_true. CASE is_app_object-update_indicator. WHEN zif_gtt_mia_ef_constants=>cs_change_mode-insert. rv_result = zif_gtt_mia_ef_constants=>cs_condition-true. WHEN zif_gtt_mia_ef_constants=>cs_change_mode-update OR zif_gtt_mia_ef_constants=>cs_change_mode-undefined. rv_result = zcl_gtt_mia_tools=>are_structures_different( ir_data1 = zif_gtt_mia_tp_reader~get_data( is_app_object = is_app_object ) ir_data2 = zif_gtt_mia_tp_reader~get_data_old( is_app_object = is_app_object ) ). ENDCASE. ENDIF. ENDMETHOD. METHOD zif_gtt_mia_tp_reader~get_data. FIELD-SYMBOLS: TYPE ts_sh_header. rr_data = NEW ts_sh_header( ). ASSIGN rr_data->* TO . DATA(lr_vttp) = mo_ef_parameters->get_appl_table( iv_tabledef = zif_gtt_mia_app_constants=>cs_tabledef-sh_item_new ). fill_header_from_vttk( EXPORTING ir_vttk = is_app_object-maintabref iv_vttp_cnt = get_shippment_item_count( ir_vttp = lr_vttp ) CHANGING cs_header = ). fill_header_from_vttp( EXPORTING ir_vttk = is_app_object-maintabref ir_vttp = lr_vttp CHANGING cs_header = ). fill_header_from_vtts( EXPORTING ir_vttk = is_app_object-maintabref ir_vttp = lr_vttp ir_vtts = mo_ef_parameters->get_appl_table( iv_tabledef = zif_gtt_mia_app_constants=>cs_tabledef-sh_stage_new ) ir_vtsp = mo_ef_parameters->get_appl_table( iv_tabledef = zif_gtt_mia_app_constants=>cs_tabledef-sh_item_stage_new ) CHANGING cs_header = ). ENDMETHOD. METHOD zif_gtt_mia_tp_reader~get_data_old. FIELD-SYMBOLS: TYPE ts_sh_header. DATA(lo_sh_data) = NEW zcl_gtt_mia_sh_data_old( io_ef_parameters = mo_ef_parameters ). DATA(lr_vttk) = get_shippment_header( is_app_object = is_app_object ir_vttk = lo_sh_data->get_vttk( ) ). rr_data = NEW ts_sh_header( ). ASSIGN rr_data->* TO . fill_header_from_vttk( EXPORTING ir_vttk = lr_vttk iv_vttp_cnt = get_shippment_item_count( ir_vttp = lo_sh_data->get_vttp( ) ) CHANGING cs_header = ). fill_header_from_vttp( EXPORTING ir_vttk = lr_vttk ir_vttp = lo_sh_data->get_vttp( ) CHANGING cs_header = ). fill_header_from_vtts( EXPORTING ir_vttk = lr_vttk ir_vttp = lo_sh_data->get_vttp( ) ir_vtts = lo_sh_data->get_vtts( ) ir_vtsp = lo_sh_data->get_vtsp( ) CHANGING cs_header = ). ENDMETHOD. METHOD zif_gtt_mia_tp_reader~get_field_parameter. CASE iv_parameter. WHEN zif_gtt_mia_ef_constants=>cs_parameter_id-key_field. rv_result = boolc( iv_field_name = cs_mapping-deliv_cnt OR iv_field_name = cs_mapping-trobj_res_val OR iv_field_name = cs_mapping-resrc_cnt OR iv_field_name = cs_mapping-crdoc_ref_val OR iv_field_name = cs_mapping-stpid_stopcnt ). WHEN zif_gtt_mia_ef_constants=>cs_parameter_id-no_empty_tag. rv_result = boolc( iv_field_name = cs_mapping-departure_dt OR iv_field_name = cs_mapping-departure_tz OR iv_field_name = cs_mapping-departure_locid OR iv_field_name = cs_mapping-departure_loctype OR iv_field_name = cs_mapping-arrival_dt OR iv_field_name = cs_mapping-arrival_tz OR iv_field_name = cs_mapping-arrival_locid OR iv_field_name = cs_mapping-arrival_loctype ). WHEN OTHERS. CLEAR: rv_result. ENDCASE. ENDMETHOD. METHOD zif_gtt_mia_tp_reader~get_mapping_structure. rr_data = REF #( cs_mapping ). ENDMETHOD. METHOD zif_gtt_mia_tp_reader~get_track_id_data. ""another tip is that: for tracking ID type 'SHIPMENT_ORDER' of delivery header, ""and for tracking ID type 'RESOURCE' of shipment header, ""DO NOT enable START DATE and END DATE DATA: lv_dummy TYPE string. FIELD-SYMBOLS: TYPE vttkvb, TYPE vttkvb. ASSIGN is_app_object-maintabref->* TO . IF IS ASSIGNED. "" SHIPMENT Tracking ID et_track_id_data = VALUE #( ( appsys = mo_ef_parameters->get_appsys( ) appobjtype = is_app_object-appobjtype appobjid = is_app_object-appobjid trxcod = zif_gtt_mia_app_constants=>cs_trxcod-sh_number trxid = |{ -tknum }| timzon = zcl_gtt_mia_tools=>get_system_time_zone( ) ) ). DATA(lv_res_tid_new) = get_resource_tracking_id( is_vttk = ). "" is shipment created? IF -updkz = zif_gtt_mia_ef_constants=>cs_change_mode-insert AND lv_res_tid_new IS NOT INITIAL. "" add RESOURCE Tracking ID for the new Shipment et_track_id_data = VALUE #( BASE et_track_id_data ( appsys = mo_ef_parameters->get_appsys( ) appobjtype = is_app_object-appobjtype appobjid = is_app_object-appobjid trxcod = zif_gtt_mia_app_constants=>cs_trxcod-sh_resource trxid = lv_res_tid_new ) ). "" is shipment updated? ELSEIF -updkz = zif_gtt_mia_ef_constants=>cs_change_mode-update. DATA(lr_vttk_old) = get_shippment_header( is_app_object = is_app_object ir_vttk = mo_ef_parameters->get_appl_table( iv_tabledef = zif_gtt_mia_app_constants=>cs_tabledef-sh_header_old ) ). ASSIGN lr_vttk_old->* TO . IF IS ASSIGNED. DATA(lv_res_tid_old) = get_resource_tracking_id( is_vttk = ). "" is RESOURCE Tracking ID changed? IF lv_res_tid_old <> lv_res_tid_new. "" add new RESOURCE Tracking ID IF lv_res_tid_new IS NOT INITIAL. et_track_id_data = VALUE #( BASE et_track_id_data ( appsys = mo_ef_parameters->get_appsys( ) appobjtype = is_app_object-appobjtype appobjid = is_app_object-appobjid trxcod = zif_gtt_mia_app_constants=>cs_trxcod-sh_resource trxid = lv_res_tid_new ) ). ENDIF. "" delete old RESOURCE Tracking ID IF lv_res_tid_old IS NOT INITIAL. et_track_id_data = VALUE #( BASE et_track_id_data ( appsys = mo_ef_parameters->get_appsys( ) appobjtype = is_app_object-appobjtype appobjid = is_app_object-appobjid trxcod = zif_gtt_mia_app_constants=>cs_trxcod-sh_resource trxid = lv_res_tid_old action = zif_gtt_mia_ef_constants=>cs_change_mode-delete ) ). ENDIF. ENDIF. ELSE. MESSAGE e002(zgtt_mia) WITH 'VTTK' INTO lv_dummy. zcl_gtt_mia_tools=>throw_exception( ). ENDIF. ENDIF. ELSE. MESSAGE e002(zgtt_mia) WITH 'VTTK' INTO lv_dummy. zcl_gtt_mia_tools=>throw_exception( ). ENDIF. ENDMETHOD. ENDCLASS. ",7734,False,1384.3677520449007,median "cmd_mm/mmu_context.o := aarch64-xilinx-linux-gcc -fuse-ld=bfd -fdebug-prefix-map=/home/zw/share/ultra96/mipitest/build/tmp/work/ultra96_zynqmp-xilinx-linux/linux-xlnx/4.19-xilinx-v2019.1+git999-r0=/usr/src/debug/linux-xlnx/4.19-xilinx-v2019.1+git999-r0 -fdebug-prefix-map=/home/zw/share/ultra96/mipitest/build/tmp/work/ultra96_zynqmp-xilinx-linux/linux-xlnx/4.19-xilinx-v2019.1+git999-r0/recipe-sysroot= -fdebug-prefix-map=/home/zw/share/ultra96/mipitest/build/tmp/work/ultra96_zynqmp-xilinx-linux/linux-xlnx/4.19-xilinx-v2019.1+git999-r0/recipe-sysroot-native= -fdebug-prefix-map=/home/zw/share/ultra96/mipitest/build/tmp/work-shared/ultra96-zynqmp/kernel-source=/usr/src/kernel --sysroot=/home/zw/share/ultra96/mipitest/build/tmp/work/ultra96_zynqmp-xilinx-linux/linux-xlnx/4.19-xilinx-v2019.1+git999-r0/recipe-sysroot -Wp,-MD,mm/.mmu_context.o.d -nostdinc -isystem /home/zw/share/ultra96/mipitest/build/tmp/work/ultra96_zynqmp-xilinx-linux/linux-xlnx/4.19-xilinx-v2019.1+git999-r0/recipe-sysroot-native/usr/bin/aarch64-xilinx-linux/../../lib/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/8.2.0/include -I/home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include -I./arch/arm64/include/generated -I/home/zw/share/ultra96/mipitest/linux-xlnx/include -I./include -I/home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi -I./arch/arm64/include/generated/uapi -I/home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi -I./include/generated/uapi -include /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kconfig.h -include /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/compiler_types.h -I/home/zw/share/ultra96/mipitest/linux-xlnx/mm -Imm -D__KERNEL__ -mlittle-endian -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -DCC_HAVE_ASM_GOTO -mgeneral-regs-only -DCONFIG_AS_LSE=1 -fno-asynchronous-unwind-tables -mabi=lp64 -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-int-in-bool-context -O2 --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -g -Wdeclaration-after-statement -Wno-pointer-sign -Wno-stringop-truncation -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -fmacro-prefix-map=/home/zw/share/ultra96/mipitest/linux-xlnx/= -Wno-packed-not-aligned -DKBUILD_BASENAME='""mmu_context""' -DKBUILD_MODNAME='""mmu_context""' -c -o mm/mmu_context.o /home/zw/share/ultra96/mipitest/linux-xlnx/mm/mmu_context.c source_mm/mmu_context.o := /home/zw/share/ultra96/mipitest/linux-xlnx/mm/mmu_context.c deps_mm/mmu_context.o := \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kconfig.h \\ $(wildcard include/config/cpu/big/endian.h) \\ $(wildcard include/config/booger.h) \\ $(wildcard include/config/foo.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/compiler_types.h \\ $(wildcard include/config/have/arch/compiler/h.h) \\ $(wildcard include/config/enable/must/check.h) \\ $(wildcard include/config/arch/supports/optimized/inlining.h) \\ $(wildcard include/config/optimize/inlining.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/compiler-gcc.h \\ $(wildcard include/config/arch/use/builtin/bswap.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/mm.h \\ $(wildcard include/config/need/multiple/nodes.h) \\ $(wildcard include/config/sysctl.h) \\ $(wildcard include/config/have/arch/mmap/rnd/bits.h) \\ $(wildcard include/config/have/arch/mmap/rnd/compat/bits.h) \\ $(wildcard include/config/mmu.h) \\ $(wildcard include/config/mem/soft/dirty.h) \\ $(wildcard include/config/arch/uses/high/vma/flags.h) \\ $(wildcard include/config/arch/has/pkeys.h) \\ $(wildcard include/config/ppc.h) \\ $(wildcard include/config/x86.h) \\ $(wildcard include/config/parisc.h) \\ $(wildcard include/config/ia64.h) \\ $(wildcard include/config/sparc64.h) \\ $(wildcard include/config/x86/intel/mpx.h) \\ $(wildcard include/config/stack/growsup.h) \\ $(wildcard include/config/numa.h) \\ $(wildcard include/config/transparent/hugepage.h) \\ $(wildcard include/config/hugetlb/page.h) \\ $(wildcard include/config/zone/device.h) \\ $(wildcard include/config/dev/pagemap/ops.h) \\ $(wildcard include/config/sparsemem.h) \\ $(wildcard include/config/sparsemem/vmemmap.h) \\ $(wildcard include/config/numa/balancing.h) \\ $(wildcard include/config/memcg.h) \\ $(wildcard include/config/highmem.h) \\ $(wildcard include/config/fs/dax.h) \\ $(wildcard include/config/shmem.h) \\ $(wildcard include/config/have/memblock/node/map.h) \\ $(wildcard include/config/have/arch/early/pfn/to/nid.h) \\ $(wildcard include/config/have/memblock.h) \\ $(wildcard include/config/flat/node/mem/map.h) \\ $(wildcard include/config/debug/vm/rb.h) \\ $(wildcard include/config/page/poisoning.h) \\ $(wildcard include/config/debug/pagealloc.h) \\ $(wildcard include/config/hibernation.h) \\ $(wildcard include/config/memory/hotplug.h) \\ $(wildcard include/config/hugetlbfs.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/errno.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/errno.h \\ arch/arm64/include/generated/uapi/asm/errno.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/errno.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/errno-base.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/mmdebug.h \\ $(wildcard include/config/debug/vm.h) \\ $(wildcard include/config/debug/virtual.h) \\ $(wildcard include/config/debug/vm/pgflags.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/bug.h \\ $(wildcard include/config/generic/bug.h) \\ $(wildcard include/config/bug/on/data/corruption.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/bug.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/stringify.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/asm-bug.h \\ $(wildcard include/config/debug/bugverbose.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/brk-imm.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bug.h \\ $(wildcard include/config/bug.h) \\ $(wildcard include/config/generic/bug/relative/pointers.h) \\ $(wildcard include/config/smp.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/compiler.h \\ $(wildcard include/config/trace/branch/profiling.h) \\ $(wildcard include/config/profile/all/branches.h) \\ $(wildcard include/config/stack/validation.h) \\ $(wildcard include/config/kasan.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/compiler_types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/types.h \\ arch/arm64/include/generated/uapi/asm/types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/int-ll64.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/int-ll64.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/bitsperlong.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitsperlong.h \\ $(wildcard include/config/64bit.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/bitsperlong.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/posix_types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/stddef.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/stddef.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/posix_types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/posix_types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/barrier.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/barrier.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kasan-checks.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kernel.h \\ $(wildcard include/config/lbdaf.h) \\ $(wildcard include/config/preempt/voluntary.h) \\ $(wildcard include/config/debug/atomic/sleep.h) \\ $(wildcard include/config/prove/locking.h) \\ $(wildcard include/config/arch/has/refcount.h) \\ $(wildcard include/config/panic/timeout.h) \\ $(wildcard include/config/tracing.h) \\ $(wildcard include/config/ftrace/mcount/record.h) \\ /home/zw/share/ultra96/mipitest/build/tmp/work/ultra96_zynqmp-xilinx-linux/linux-xlnx/4.19-xilinx-v2019.1+git999-r0/recipe-sysroot-native/usr/lib/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/8.2.0/include/stdarg.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/linkage.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/export.h \\ $(wildcard include/config/modules.h) \\ $(wildcard include/config/modversions.h) \\ $(wildcard include/config/module/rel/crcs.h) \\ $(wildcard include/config/have/arch/prel32/relocations.h) \\ $(wildcard include/config/trim/unused/ksyms.h) \\ $(wildcard include/config/unused/symbols.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/linkage.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/types.h \\ $(wildcard include/config/have/uid16.h) \\ $(wildcard include/config/uid16.h) \\ $(wildcard include/config/arch/dma/addr/t/64bit.h) \\ $(wildcard include/config/phys/addr/t/64bit.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/bitops.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/bits.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/bitops.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/builtin-__ffs.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/builtin-ffs.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/builtin-__fls.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/builtin-fls.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/ffz.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/fls64.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/find.h \\ $(wildcard include/config/generic/find/first/bit.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/sched.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/hweight.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/arch_hweight.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/const_hweight.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/atomic.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/atomic.h \\ $(wildcard include/config/generic/atomic64.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/atomic.h \\ $(wildcard include/config/arm64/lse/atomics.h) \\ $(wildcard include/config/as/lse.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/lse.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/alternative.h \\ $(wildcard include/config/arm64/uao.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/cpucaps.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/insn.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/init.h \\ $(wildcard include/config/strict/kernel/rwx.h) \\ $(wildcard include/config/strict/module/rwx.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/atomic_lse.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/cmpxchg.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/build_bug.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/atomic-long.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/lock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/non-atomic.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/le.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/byteorder.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/byteorder/little_endian.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/byteorder/little_endian.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/swab.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/swab.h \\ arch/arm64/include/generated/uapi/asm/swab.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/swab.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/byteorder/generic.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/ext2-atomic-setbit.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/log2.h \\ $(wildcard include/config/arch/has/ilog2/u32.h) \\ $(wildcard include/config/arch/has/ilog2/u64.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/typecheck.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/printk.h \\ $(wildcard include/config/message/loglevel/default.h) \\ $(wildcard include/config/console/loglevel/default.h) \\ $(wildcard include/config/console/loglevel/quiet.h) \\ $(wildcard include/config/early/printk.h) \\ $(wildcard include/config/printk/nmi.h) \\ $(wildcard include/config/printk.h) \\ $(wildcard include/config/dynamic/debug.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kern_levels.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/cache.h \\ $(wildcard include/config/arch/has/cache/line/size.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/kernel.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/sysinfo.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/cache.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/cputype.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/sysreg.h \\ $(wildcard include/config/broken/gas/inst.h) \\ $(wildcard include/config/arm64/pa/bits/52.h) \\ $(wildcard include/config/arm64/4k/pages.h) \\ $(wildcard include/config/arm64/16k/pages.h) \\ $(wildcard include/config/arm64/64k/pages.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/compiler.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/gfp.h \\ $(wildcard include/config/lockdep.h) \\ $(wildcard include/config/zone/dma.h) \\ $(wildcard include/config/zone/dma32.h) \\ $(wildcard include/config/pm/sleep.h) \\ $(wildcard include/config/memory/isolation.h) \\ $(wildcard include/config/compaction.h) \\ $(wildcard include/config/cma.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/mmzone.h \\ $(wildcard include/config/force/max/zoneorder.h) \\ $(wildcard include/config/zsmalloc.h) \\ $(wildcard include/config/discontigmem.h) \\ $(wildcard include/config/page/extension.h) \\ $(wildcard include/config/no/bootmem.h) \\ $(wildcard include/config/deferred/struct/page/init.h) \\ $(wildcard include/config/have/memory/present.h) \\ $(wildcard include/config/have/memoryless/nodes.h) \\ $(wildcard include/config/flatmem.h) \\ $(wildcard include/config/sparsemem/extreme.h) \\ $(wildcard include/config/memory/hotremove.h) \\ $(wildcard include/config/have/arch/pfn/valid.h) \\ $(wildcard include/config/holes/in/zone.h) \\ $(wildcard include/config/arch/has/holes/memorymodel.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/spinlock.h \\ $(wildcard include/config/debug/spinlock.h) \\ $(wildcard include/config/preempt.h) \\ $(wildcard include/config/debug/lock/alloc.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/preempt.h \\ $(wildcard include/config/preempt/count.h) \\ $(wildcard include/config/debug/preempt.h) \\ $(wildcard include/config/trace/preempt/toggle.h) \\ $(wildcard include/config/preempt/notifiers.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/list.h \\ $(wildcard include/config/debug/list.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/poison.h \\ $(wildcard include/config/illegal/pointer/value.h) \\ $(wildcard include/config/page/poisoning/zero.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/const.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/const.h \\ arch/arm64/include/generated/asm/preempt.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/preempt.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/thread_info.h \\ $(wildcard include/config/thread/info/in/task.h) \\ $(wildcard include/config/have/arch/within/stack/frames.h) \\ $(wildcard include/config/hardened/usercopy.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/restart_block.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/time64.h \\ $(wildcard include/config/64bit/time.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/math64.h \\ $(wildcard include/config/arch/supports/int128.h) \\ arch/arm64/include/generated/asm/div64.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/div64.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/time.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/current.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/thread_info.h \\ $(wildcard include/config/arm64/sw/ttbr0/pan.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/memory.h \\ $(wildcard include/config/arm64/va/bits.h) \\ $(wildcard include/config/vmap/stack.h) \\ $(wildcard include/config/debug/align/rodata.h) \\ $(wildcard include/config/blk/dev/initrd.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/page-def.h \\ $(wildcard include/config/arm64/page/shift.h) \\ $(wildcard include/config/arm64/cont/shift.h) \\ arch/arm64/include/generated/asm/sizes.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/sizes.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sizes.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/memory_model.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/pfn.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/stack_pointer.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/irqflags.h \\ $(wildcard include/config/trace/irqflags.h) \\ $(wildcard include/config/irqsoff/tracer.h) \\ $(wildcard include/config/preempt/tracer.h) \\ $(wildcard include/config/trace/irqflags/support.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/irqflags.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/ptrace.h \\ $(wildcard include/config/compat.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/ptrace.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/hwcap.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/hwcap.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/sigcontext.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/prctl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/ptrace.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/bottom_half.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/spinlock_types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/spinlock_types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/qspinlock_types.h \\ $(wildcard include/config/paravirt.h) \\ $(wildcard include/config/nr/cpus.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/qrwlock_types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/lockdep.h \\ $(wildcard include/config/lock/stat.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rwlock_types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/spinlock.h \\ arch/arm64/include/generated/asm/qrwlock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/qrwlock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/processor.h \\ $(wildcard include/config/have/hw/breakpoint.h) \\ $(wildcard include/config/gcc/plugin/stackleak.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/string.h \\ $(wildcard include/config/binary/printf.h) \\ $(wildcard include/config/fortify/source.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/string.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/string.h \\ $(wildcard include/config/arch/has/uaccess/flushcache.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/cpufeature.h \\ $(wildcard include/config/arm64/sve.h) \\ $(wildcard include/config/arm64/ssbd.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/jump_label.h \\ $(wildcard include/config/jump/label.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/hw_breakpoint.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/virt.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/sections.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/sections.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/pgtable-hwdef.h \\ $(wildcard include/config/pgtable/levels.h) \\ $(wildcard include/config/arm64/pa/bits.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/fpsimd.h \\ arch/arm64/include/generated/asm/qspinlock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/qspinlock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rwlock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/spinlock_api_smp.h \\ $(wildcard include/config/inline/spin/lock.h) \\ $(wildcard include/config/inline/spin/lock/bh.h) \\ $(wildcard include/config/inline/spin/lock/irq.h) \\ $(wildcard include/config/inline/spin/lock/irqsave.h) \\ $(wildcard include/config/inline/spin/trylock.h) \\ $(wildcard include/config/inline/spin/trylock/bh.h) \\ $(wildcard include/config/uninline/spin/unlock.h) \\ $(wildcard include/config/inline/spin/unlock/bh.h) \\ $(wildcard include/config/inline/spin/unlock/irq.h) \\ $(wildcard include/config/inline/spin/unlock/irqrestore.h) \\ $(wildcard include/config/generic/lockbreak.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rwlock_api_smp.h \\ $(wildcard include/config/inline/read/lock.h) \\ $(wildcard include/config/inline/write/lock.h) \\ $(wildcard include/config/inline/read/lock/bh.h) \\ $(wildcard include/config/inline/write/lock/bh.h) \\ $(wildcard include/config/inline/read/lock/irq.h) \\ $(wildcard include/config/inline/write/lock/irq.h) \\ $(wildcard include/config/inline/read/lock/irqsave.h) \\ $(wildcard include/config/inline/write/lock/irqsave.h) \\ $(wildcard include/config/inline/read/trylock.h) \\ $(wildcard include/config/inline/write/trylock.h) \\ $(wildcard include/config/inline/read/unlock.h) \\ $(wildcard include/config/inline/write/unlock.h) \\ $(wildcard include/config/inline/read/unlock/bh.h) \\ $(wildcard include/config/inline/write/unlock/bh.h) \\ $(wildcard include/config/inline/read/unlock/irq.h) \\ $(wildcard include/config/inline/write/unlock/irq.h) \\ $(wildcard include/config/inline/read/unlock/irqrestore.h) \\ $(wildcard include/config/inline/write/unlock/irqrestore.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/wait.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/wait.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/threads.h \\ $(wildcard include/config/base/small.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/numa.h \\ $(wildcard include/config/nodes/shift.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/seqlock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/nodemask.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/bitmap.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/pageblock-flags.h \\ $(wildcard include/config/hugetlb/page/size/variable.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/page-flags-layout.h \\ include/generated/bounds.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/sparsemem.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/page.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/personality.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/personality.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/pgtable-types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/pgtable-nopud.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/pgtable-nop4d-hack.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/5level-fixup.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/getorder.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/memory_hotplug.h \\ $(wildcard include/config/arch/has/add/pages.h) \\ $(wildcard include/config/have/arch/nodedata/extension.h) \\ $(wildcard include/config/have/bootmem/info/node.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/notifier.h \\ $(wildcard include/config/tree/srcu.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/mutex.h \\ $(wildcard include/config/mutex/spin/on/owner.h) \\ $(wildcard include/config/debug/mutexes.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/osq_lock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/debug_locks.h \\ $(wildcard include/config/debug/locking/api/selftests.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rwsem.h \\ $(wildcard include/config/rwsem/spin/on/owner.h) \\ $(wildcard include/config/rwsem/generic/spinlock.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/err.h \\ arch/arm64/include/generated/asm/rwsem.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/rwsem.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/srcu.h \\ $(wildcard include/config/tiny/srcu.h) \\ $(wildcard include/config/srcu.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rcupdate.h \\ $(wildcard include/config/preempt/rcu.h) \\ $(wildcard include/config/rcu/stall/common.h) \\ $(wildcard include/config/no/hz/full.h) \\ $(wildcard include/config/rcu/nocb/cpu.h) \\ $(wildcard include/config/tasks/rcu.h) \\ $(wildcard include/config/tree/rcu.h) \\ $(wildcard include/config/tiny/rcu.h) \\ $(wildcard include/config/debug/objects/rcu/head.h) \\ $(wildcard include/config/hotplug/cpu.h) \\ $(wildcard include/config/prove/rcu.h) \\ $(wildcard include/config/rcu/boost.h) \\ $(wildcard include/config/arch/weak/release/acquire.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/cpumask.h \\ $(wildcard include/config/cpumask/offstack.h) \\ $(wildcard include/config/debug/per/cpu/maps.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rcutree.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/workqueue.h \\ $(wildcard include/config/debug/objects/work.h) \\ $(wildcard include/config/freezer.h) \\ $(wildcard include/config/sysfs.h) \\ $(wildcard include/config/wq/watchdog.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/timer.h \\ $(wildcard include/config/debug/objects/timers.h) \\ $(wildcard include/config/no/hz/common.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/ktime.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/time.h \\ $(wildcard include/config/arch/uses/gettimeoffset.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/time32.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/jiffies.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/timex.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/timex.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/param.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/param.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/param.h \\ $(wildcard include/config/hz.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/param.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/timex.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/arch_timer.h \\ $(wildcard include/config/arm/arch/timer/ool/workaround.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/smp.h \\ $(wildcard include/config/up/late/init.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/llist.h \\ $(wildcard include/config/arch/have/nmi/safe/cmpxchg.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/smp.h \\ $(wildcard include/config/arm64/acpi/parking/protocol.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/percpu.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/percpu.h \\ $(wildcard include/config/have/setup/per/cpu/area.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/percpu-defs.h \\ $(wildcard include/config/debug/force/weak/per/cpu.h) \\ $(wildcard include/config/virtualization.h) \\ $(wildcard include/config/amd/mem/encrypt.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/clocksource/arm_arch_timer.h \\ $(wildcard include/config/arm/arch/timer.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/timecounter.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/timex.h \\ include/generated/timeconst.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/timekeeping.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/timekeeping32.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/debugobjects.h \\ $(wildcard include/config/debug/objects.h) \\ $(wildcard include/config/debug/objects/free.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rcu_segcblist.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/srcutree.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rcu_node_tree.h \\ $(wildcard include/config/rcu/fanout.h) \\ $(wildcard include/config/rcu/fanout/leaf.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/completion.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/topology.h \\ $(wildcard include/config/use/percpu/numa/node/id.h) \\ $(wildcard include/config/sched/smt.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/percpu.h \\ $(wildcard include/config/need/per/cpu/embed/first/chunk.h) \\ $(wildcard include/config/need/per/cpu/page/first/chunk.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/topology.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/arch_topology.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/topology.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rbtree.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/mm_types.h \\ $(wildcard include/config/have/aligned/struct/page.h) \\ $(wildcard include/config/userfaultfd.h) \\ $(wildcard include/config/have/arch/compat/mmap/bases.h) \\ $(wildcard include/config/membarrier.h) \\ $(wildcard include/config/aio.h) \\ $(wildcard include/config/mmu/notifier.h) \\ $(wildcard include/config/arch/want/batched/unmap/tlb/flush.h) \\ $(wildcard include/config/hmm.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/mm_types_task.h \\ $(wildcard include/config/split/ptlock/cpus.h) \\ $(wildcard include/config/arch/enable/split/pmd/ptlock.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/auxvec.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/auxvec.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/auxvec.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/uprobes.h \\ $(wildcard include/config/uprobes.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/mmu.h \\ $(wildcard include/config/unmap/kernel/at/el0.h) \\ $(wildcard include/config/harden/branch/predictor.h) \\ $(wildcard include/config/harden/el2/vectors.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/range.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/percpu-refcount.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/bit_spinlock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/shrinker.h \\ $(wildcard include/config/memcg/kmem.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/resource.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/resource.h \\ arch/arm64/include/generated/uapi/asm/resource.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/resource.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/resource.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/page_ext.h \\ $(wildcard include/config/idle/page/tracking.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/stacktrace.h \\ $(wildcard include/config/stacktrace.h) \\ $(wildcard include/config/user/stacktrace/support.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/stackdepot.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/page_ref.h \\ $(wildcard include/config/debug/page/ref.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/page-flags.h \\ $(wildcard include/config/arch/uses/pg/uncached.h) \\ $(wildcard include/config/memory/failure.h) \\ $(wildcard include/config/swap.h) \\ $(wildcard include/config/thp/swap.h) \\ $(wildcard include/config/ksm.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/tracepoint-defs.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/static_key.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/memremap.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/ioport.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/pgtable.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/proc-fns.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/pgtable-prot.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/fixmap.h \\ $(wildcard include/config/acpi/apei/ghes.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/boot.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/fixmap.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sched.h \\ $(wildcard include/config/virt/cpu/accounting/native.h) \\ $(wildcard include/config/sched/info.h) \\ $(wildcard include/config/schedstats.h) \\ $(wildcard include/config/fair/group/sched.h) \\ $(wildcard include/config/rt/group/sched.h) \\ $(wildcard include/config/cgroup/sched.h) \\ $(wildcard include/config/blk/dev/io/trace.h) \\ $(wildcard include/config/compat/brk.h) \\ $(wildcard include/config/cgroups.h) \\ $(wildcard include/config/blk/cgroup.h) \\ $(wildcard include/config/stackprotector.h) \\ $(wildcard include/config/arch/has/scaled/cputime.h) \\ $(wildcard include/config/virt/cpu/accounting/gen.h) \\ $(wildcard include/config/posix/timers.h) \\ $(wildcard include/config/sysvipc.h) \\ $(wildcard include/config/detect/hung/task.h) \\ $(wildcard include/config/auditsyscall.h) \\ $(wildcard include/config/rt/mutexes.h) \\ $(wildcard include/config/ubsan.h) \\ $(wildcard include/config/block.h) \\ $(wildcard include/config/task/xacct.h) \\ $(wildcard include/config/cpusets.h) \\ $(wildcard include/config/intel/rdt.h) \\ $(wildcard include/config/futex.h) \\ $(wildcard include/config/perf/events.h) \\ $(wildcard include/config/rseq.h) \\ $(wildcard include/config/task/delay/acct.h) \\ $(wildcard include/config/fault/injection.h) \\ $(wildcard include/config/latencytop.h) \\ $(wildcard include/config/function/graph/tracer.h) \\ $(wildcard include/config/kcov.h) \\ $(wildcard include/config/bcache.h) \\ $(wildcard include/config/livepatch.h) \\ $(wildcard include/config/security.h) \\ $(wildcard include/config/arch/task/struct/on/stack.h) \\ $(wildcard include/config/debug/rseq.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/sched.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/pid.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rculist.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sem.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/sem.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/ipc.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/uidgid.h \\ $(wildcard include/config/multiuser.h) \\ $(wildcard include/config/user/ns.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/highuid.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rhashtable-types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/ipc.h \\ arch/arm64/include/generated/uapi/asm/ipcbuf.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/ipcbuf.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/refcount.h \\ $(wildcard include/config/refcount/full.h) \\ arch/arm64/include/generated/uapi/asm/sembuf.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/sembuf.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/shm.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/shm.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/hugetlb_encode.h \\ arch/arm64/include/generated/uapi/asm/shmbuf.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/shmbuf.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/shmparam.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/shmparam.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kcov.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/kcov.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/plist.h \\ $(wildcard include/config/debug/pi/list.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/hrtimer.h \\ $(wildcard include/config/high/res/timers.h) \\ $(wildcard include/config/time/low/res.h) \\ $(wildcard include/config/timerfd.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/timerqueue.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/seccomp.h \\ $(wildcard include/config/seccomp.h) \\ $(wildcard include/config/have/arch/seccomp/filter.h) \\ $(wildcard include/config/seccomp/filter.h) \\ $(wildcard include/config/checkpoint/restore.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/seccomp.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/latencytop.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sched/prio.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/signal_types.h \\ $(wildcard include/config/old/sigaction.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/signal.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/signal.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/signal.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/signal.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/signal-defs.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/siginfo.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/siginfo.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/task_io_accounting.h \\ $(wildcard include/config/task/io/accounting.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/rseq.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/pgtable.h \\ $(wildcard include/config/have/arch/transparent/hugepage/pud.h) \\ $(wildcard include/config/have/arch/soft/dirty.h) \\ $(wildcard include/config/arch/enable/thp/migration.h) \\ $(wildcard include/config/have/arch/huge/vmap.h) \\ $(wildcard include/config/x86/espfix64.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/overflow.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/huge_mm.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sched/coredump.h \\ $(wildcard include/config/core/dump/default/elf/headers.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/fs.h \\ $(wildcard include/config/fs/posix/acl.h) \\ $(wildcard include/config/cgroup/writeback.h) \\ $(wildcard include/config/ima.h) \\ $(wildcard include/config/fsnotify.h) \\ $(wildcard include/config/fs/encryption.h) \\ $(wildcard include/config/epoll.h) \\ $(wildcard include/config/file/locking.h) \\ $(wildcard include/config/quota.h) \\ $(wildcard include/config/mandatory/file/locking.h) \\ $(wildcard include/config/migration.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/wait_bit.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kdev_t.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/kdev_t.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/dcache.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rculist_bl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/list_bl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/lockref.h \\ $(wildcard include/config/arch/use/cmpxchg/lockref.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/stringhash.h \\ $(wildcard include/config/dcache/word/access.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/hash.h \\ $(wildcard include/config/have/arch/hash.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/path.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/stat.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/stat.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/stat.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/stat.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/compat_time.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/compat.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sched/task_stack.h \\ $(wildcard include/config/debug/stack/usage.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/magic.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/stat.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/list_lru.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/radix-tree.h \\ $(wildcard include/config/radix/tree/multiorder.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/xarray.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/capability.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/capability.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/semaphore.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/fcntl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/fcntl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/fcntl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/fcntl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/fiemap.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/migrate_mode.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/percpu-rwsem.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rcuwait.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rcu_sync.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/delayed_call.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/uuid.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/uuid.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/errseq.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/ioprio.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sched/rt.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/iocontext.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/fs.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/limits.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/ioctl.h \\ arch/arm64/include/generated/uapi/asm/ioctl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/ioctl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/ioctl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/quota.h \\ $(wildcard include/config/quota/netlink/interface.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/percpu_counter.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/dqblk_xfs.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/dqblk_v1.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/dqblk_v2.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/dqblk_qtree.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/projid.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/quota.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/nfs_fs_i.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/vmstat.h \\ $(wildcard include/config/vm/event/counters.h) \\ $(wildcard include/config/debug/tlbflush.h) \\ $(wildcard include/config/debug/vm/vmacache.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/vm_event_item.h \\ $(wildcard include/config/memory/balloon.h) \\ $(wildcard include/config/balloon/compaction.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sched/mm.h \\ $(wildcard include/config/arch/has/membarrier/callbacks.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sync_core.h \\ $(wildcard include/config/arch/has/sync/core/before/usermode.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sched/task.h \\ $(wildcard include/config/have/copy/thread/tls.h) \\ $(wildcard include/config/have/exit/thread.h) \\ $(wildcard include/config/arch/wants/dynamic/task/struct.h) \\ $(wildcard include/config/have/arch/thread/struct/whitelist.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/mmu_context.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/mmu_context.h \\ $(wildcard include/config/pid/in/contextidr.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sched/hotplug.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/cacheflush.h \\ $(wildcard include/config/kgdb.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kgdb.h \\ $(wildcard include/config/have/arch/kgdb.h) \\ $(wildcard include/config/serial/kgdb/nmi.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/kgdb.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/ptrace.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sched/signal.h \\ $(wildcard include/config/sched/autogroup.h) \\ $(wildcard include/config/bsd/process/acct.h) \\ $(wildcard include/config/taskstats.h) \\ $(wildcard include/config/audit.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/signal.h \\ $(wildcard include/config/proc/fs.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sched/jobctl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/cred.h \\ $(wildcard include/config/debug/credentials.h) \\ $(wildcard include/config/keys.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/key.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sysctl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/sysctl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/assoc_array.h \\ $(wildcard include/config/associative/array.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/selinux.h \\ $(wildcard include/config/security/selinux.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sched/user.h \\ $(wildcard include/config/fanotify.h) \\ $(wildcard include/config/posix/mqueue.h) \\ $(wildcard include/config/bpf/syscall.h) \\ $(wildcard include/config/net.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/ratelimit.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/pid_namespace.h \\ $(wildcard include/config/pid/ns.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/nsproxy.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kref.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/ns_common.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/idr.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/ptrace.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/debug-monitors.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/esr.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/mm_hooks.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/tlbflush.h \\ $(wildcard include/config/qcom/falkor/erratum/1009.h) \\ mm/mmu_context.o: $(deps_mm/mmu_context.o) $(deps_mm/mmu_context.o): ",16356,True,5375.633243919781,median "cmd_/home/zrd/openvswitch-2.5.0/datapath/linux/ip_tunnels_core.o := gcc -Wp,-MD,/home/zrd/openvswitch-2.5.0/datapath/linux/.ip_tunnels_core.o.d -nostdinc -isystem /usr/lib/gcc/i686-linux-gnu/5/include -I/home/zrd/openvswitch-2.5.0/include -I/home/zrd/openvswitch-2.5.0/datapath/linux/compat -I/home/zrd/openvswitch-2.5.0/datapath/linux/compat/include -I./arch/x86/include -Iarch/x86/include/generated/uapi -Iarch/x86/include/generated -Iinclude -I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -Iubuntu/include -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -m32 -msoft-float -mregparm=3 -freg-struct-return -fno-pic -mpreferred-stack-boundary=2 -march=i686 -mtune=generic -maccumulate-outgoing-args -Wa,-mtune=generic32 -ffreestanding -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fno-delete-null-pointer-checks -O2 --param=allow-store-data-races=0 -Wframe-larger-than=1024 -fstack-protector-strong -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -pg -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -DCC_HAVE_ASM_GOTO -DVERSION=\\""2.5.0\\"" -I/home/zrd/openvswitch-2.5.0/datapath/linux/.. -I/home/zrd/openvswitch-2.5.0/datapath/linux/.. -g -include /home/zrd/openvswitch-2.5.0/datapath/linux/kcompat.h -DMODULE -D""KBUILD_STR(s)=\\#s"" -D""KBUILD_BASENAME=KBUILD_STR(ip_tunnels_core)"" -D""KBUILD_MODNAME=KBUILD_STR(openvswitch)"" -c -o /home/zrd/openvswitch-2.5.0/datapath/linux/.tmp_ip_tunnels_core.o /home/zrd/openvswitch-2.5.0/datapath/linux/ip_tunnels_core.c source_/home/zrd/openvswitch-2.5.0/datapath/linux/ip_tunnels_core.o := /home/zrd/openvswitch-2.5.0/datapath/linux/ip_tunnels_core.c deps_/home/zrd/openvswitch-2.5.0/datapath/linux/ip_tunnels_core.o := \\ /home/zrd/openvswitch-2.5.0/datapath/linux/kcompat.h \\ include/generated/uapi/linux/version.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/in.h \\ include/linux/in.h \\ include/linux/errno.h \\ include/uapi/linux/errno.h \\ arch/x86/include/uapi/asm/errno.h \\ include/uapi/asm-generic/errno.h \\ include/uapi/asm-generic/errno-base.h \\ include/uapi/linux/in.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/types.h \\ include/linux/types.h \\ $(wildcard include/config/uid16.h) \\ $(wildcard include/config/lbdaf.h) \\ $(wildcard include/config/arch/dma/addr/t/64bit.h) \\ $(wildcard include/config/phys/addr/t/64bit.h) \\ $(wildcard include/config/64bit.h) \\ include/uapi/linux/types.h \\ arch/x86/include/uapi/asm/types.h \\ include/uapi/asm-generic/types.h \\ include/asm-generic/int-ll64.h \\ include/uapi/asm-generic/int-ll64.h \\ arch/x86/include/uapi/asm/bitsperlong.h \\ include/asm-generic/bitsperlong.h \\ include/uapi/asm-generic/bitsperlong.h \\ include/uapi/linux/posix_types.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/stddef.h \\ include/linux/stddef.h \\ include/uapi/linux/stddef.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/compiler.h \\ include/linux/compiler.h \\ $(wildcard include/config/sparse/rcu/pointer.h) \\ $(wildcard include/config/trace/branch/profiling.h) \\ $(wildcard include/config/profile/all/branches.h) \\ $(wildcard include/config/enable/must/check.h) \\ $(wildcard include/config/enable/warn/deprecated.h) \\ $(wildcard include/config/kprobes.h) \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/compiler-gcc.h \\ include/linux/compiler-gcc.h \\ $(wildcard include/config/arch/supports/optimized/inlining.h) \\ $(wildcard include/config/optimize/inlining.h) \\ $(wildcard include/config/gcov/kernel.h) \\ $(wildcard include/config/arch/use/builtin/bswap.h) \\ arch/x86/include/asm/posix_types.h \\ $(wildcard include/config/x86/32.h) \\ arch/x86/include/uapi/asm/posix_types_32.h \\ include/uapi/asm-generic/posix_types.h \\ include/uapi/linux/libc-compat.h \\ include/linux/socket.h \\ $(wildcard include/config/proc/fs.h) \\ $(wildcard include/config/compat.h) \\ arch/x86/include/uapi/asm/socket.h \\ include/uapi/asm-generic/socket.h \\ arch/x86/include/uapi/asm/sockios.h \\ include/uapi/asm-generic/sockios.h \\ include/uapi/linux/sockios.h \\ include/linux/uio.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/kernel.h \\ include/linux/kernel.h \\ $(wildcard include/config/preempt/voluntary.h) \\ $(wildcard include/config/debug/atomic/sleep.h) \\ $(wildcard include/config/mmu.h) \\ $(wildcard include/config/prove/locking.h) \\ $(wildcard include/config/panic/timeout.h) \\ $(wildcard include/config/tracing.h) \\ $(wildcard include/config/ftrace/mcount/record.h) \\ /usr/lib/gcc/i686-linux-gnu/5/include/stdarg.h \\ include/linux/linkage.h \\ include/linux/stringify.h \\ include/linux/export.h \\ $(wildcard include/config/have/underscore/symbol/prefix.h) \\ $(wildcard include/config/modules.h) \\ $(wildcard include/config/modversions.h) \\ $(wildcard include/config/unused/symbols.h) \\ arch/x86/include/asm/linkage.h \\ $(wildcard include/config/x86/64.h) \\ $(wildcard include/config/x86/alignment/16.h) \\ include/linux/bitops.h \\ arch/x86/include/asm/bitops.h \\ $(wildcard include/config/x86/cmov.h) \\ arch/x86/include/asm/alternative.h \\ $(wildcard include/config/smp.h) \\ $(wildcard include/config/paravirt.h) \\ arch/x86/include/asm/asm.h \\ arch/x86/include/asm/ptrace.h \\ $(wildcard include/config/x86/debugctlmsr.h) \\ arch/x86/include/asm/segment.h \\ $(wildcard include/config/cc/stackprotector.h) \\ $(wildcard include/config/x86/32/lazy/gs.h) \\ include/uapi/linux/const.h \\ arch/x86/include/asm/page_types.h \\ $(wildcard include/config/physical/start.h) \\ $(wildcard include/config/physical/align.h) \\ arch/x86/include/asm/page_32_types.h \\ $(wildcard include/config/highmem4g.h) \\ $(wildcard include/config/highmem64g.h) \\ $(wildcard include/config/page/offset.h) \\ $(wildcard include/config/x86/pae.h) \\ arch/x86/include/uapi/asm/ptrace.h \\ arch/x86/include/uapi/asm/ptrace-abi.h \\ arch/x86/include/asm/processor-flags.h \\ $(wildcard include/config/vm86.h) \\ arch/x86/include/uapi/asm/processor-flags.h \\ arch/x86/include/asm/paravirt_types.h \\ $(wildcard include/config/x86/local/apic.h) \\ $(wildcard include/config/pgtable/levels.h) \\ $(wildcard include/config/queued/spinlocks.h) \\ $(wildcard include/config/paravirt/debug.h) \\ arch/x86/include/asm/desc_defs.h \\ arch/x86/include/asm/kmap_types.h \\ $(wildcard include/config/debug/highmem.h) \\ include/asm-generic/kmap_types.h \\ arch/x86/include/asm/pgtable_types.h \\ $(wildcard include/config/kmemcheck.h) \\ $(wildcard include/config/mem/soft/dirty.h) \\ arch/x86/include/asm/pgtable_32_types.h \\ $(wildcard include/config/highmem.h) \\ arch/x86/include/asm/pgtable-3level_types.h \\ include/asm-generic/pgtable-nopud.h \\ arch/x86/include/asm/spinlock_types.h \\ $(wildcard include/config/paravirt/spinlocks.h) \\ $(wildcard include/config/nr/cpus.h) \\ include/asm-generic/qspinlock_types.h \\ include/asm-generic/qrwlock_types.h \\ include/asm-generic/ptrace.h \\ arch/x86/include/asm/cpufeature.h \\ $(wildcard include/config/x86/feature/names.h) \\ $(wildcard include/config/x86/debug/static/cpu/has.h) \\ arch/x86/include/asm/required-features.h \\ $(wildcard include/config/x86/minimum/cpu/family.h) \\ $(wildcard include/config/math/emulation.h) \\ $(wildcard include/config/x86/cmpxchg64.h) \\ $(wildcard include/config/x86/use/3dnow.h) \\ $(wildcard include/config/x86/p6/nop.h) \\ $(wildcard include/config/matom.h) \\ arch/x86/include/asm/disabled-features.h \\ $(wildcard include/config/x86/intel/mpx.h) \\ arch/x86/include/asm/rmwcc.h \\ arch/x86/include/asm/barrier.h \\ $(wildcard include/config/x86/ppro/fence.h) \\ arch/x86/include/asm/nops.h \\ $(wildcard include/config/mk7.h) \\ include/asm-generic/bitops/fls64.h \\ include/asm-generic/bitops/find.h \\ $(wildcard include/config/generic/find/first/bit.h) \\ include/asm-generic/bitops/sched.h \\ arch/x86/include/asm/arch_hweight.h \\ include/asm-generic/bitops/const_hweight.h \\ include/asm-generic/bitops/le.h \\ arch/x86/include/uapi/asm/byteorder.h \\ include/linux/byteorder/little_endian.h \\ include/uapi/linux/byteorder/little_endian.h \\ include/linux/swab.h \\ include/uapi/linux/swab.h \\ arch/x86/include/uapi/asm/swab.h \\ include/linux/byteorder/generic.h \\ include/asm-generic/bitops/ext2-atomic-setbit.h \\ include/linux/log2.h \\ $(wildcard include/config/arch/has/ilog2/u32.h) \\ $(wildcard include/config/arch/has/ilog2/u64.h) \\ include/linux/typecheck.h \\ include/linux/printk.h \\ $(wildcard include/config/message/loglevel/default.h) \\ $(wildcard include/config/early/printk.h) \\ $(wildcard include/config/printk.h) \\ $(wildcard include/config/dynamic/debug.h) \\ include/linux/init.h \\ $(wildcard include/config/broken/rodata.h) \\ $(wildcard include/config/lto.h) \\ include/linux/kern_levels.h \\ include/linux/cache.h \\ $(wildcard include/config/arch/has/cache/line/size.h) \\ include/uapi/linux/kernel.h \\ include/uapi/linux/sysinfo.h \\ arch/x86/include/asm/cache.h \\ $(wildcard include/config/x86/l1/cache/shift.h) \\ $(wildcard include/config/x86/internode/cache/shift.h) \\ $(wildcard include/config/x86/vsmp.h) \\ include/linux/dynamic_debug.h \\ arch/x86/include/asm/div64.h \\ include/uapi/linux/uio.h \\ include/uapi/linux/socket.h \\ include/linux/module.h \\ $(wildcard include/config/sysfs.h) \\ $(wildcard include/config/module/sig.h) \\ $(wildcard include/config/modules/tree/lookup.h) \\ $(wildcard include/config/generic/bug.h) \\ $(wildcard include/config/kallsyms.h) \\ $(wildcard include/config/tracepoints.h) \\ $(wildcard include/config/event/tracing.h) \\ $(wildcard include/config/livepatch.h) \\ $(wildcard include/config/module/unload.h) \\ $(wildcard include/config/constructors.h) \\ $(wildcard include/config/debug/set/module/ronx.h) \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/list.h \\ include/linux/list.h \\ $(wildcard include/config/debug/list.h) \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/poison.h \\ include/linux/poison.h \\ $(wildcard include/config/illegal/pointer/value.h) \\ include/linux/stat.h \\ arch/x86/include/uapi/asm/stat.h \\ include/uapi/linux/stat.h \\ include/linux/time.h \\ $(wildcard include/config/arch/uses/gettimeoffset.h) \\ include/linux/seqlock.h \\ $(wildcard include/config/debug/lock/alloc.h) \\ include/linux/spinlock.h \\ $(wildcard include/config/debug/spinlock.h) \\ $(wildcard include/config/generic/lockbreak.h) \\ $(wildcard include/config/preempt.h) \\ include/linux/preempt.h \\ $(wildcard include/config/preempt/count.h) \\ $(wildcard include/config/debug/preempt.h) \\ $(wildcard include/config/preempt/tracer.h) \\ $(wildcard include/config/preempt/notifiers.h) \\ arch/x86/include/asm/preempt.h \\ arch/x86/include/asm/percpu.h \\ $(wildcard include/config/x86/64/smp.h) \\ include/asm-generic/percpu.h \\ $(wildcard include/config/have/setup/per/cpu/area.h) \\ include/linux/threads.h \\ $(wildcard include/config/base/small.h) \\ include/linux/percpu-defs.h \\ $(wildcard include/config/debug/force/weak/per/cpu.h) \\ include/linux/thread_info.h \\ $(wildcard include/config/debug/stack/usage.h) \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/bug.h \\ include/linux/bug.h \\ arch/x86/include/asm/bug.h \\ $(wildcard include/config/debug/bugverbose.h) \\ include/asm-generic/bug.h \\ $(wildcard include/config/bug.h) \\ $(wildcard include/config/generic/bug/relative/pointers.h) \\ arch/x86/include/asm/thread_info.h \\ $(wildcard include/config/ia32/emulation.h) \\ arch/x86/include/asm/page.h \\ arch/x86/include/asm/page_32.h \\ $(wildcard include/config/debug/virtual.h) \\ $(wildcard include/config/flatmem.h) \\ $(wildcard include/config/x86/3dnow.h) \\ include/linux/string.h \\ $(wildcard include/config/binary/printf.h) \\ include/uapi/linux/string.h \\ arch/x86/include/asm/string.h \\ arch/x86/include/asm/string_32.h \\ include/linux/range.h \\ include/asm-generic/memory_model.h \\ $(wildcard include/config/discontigmem.h) \\ $(wildcard include/config/sparsemem/vmemmap.h) \\ $(wildcard include/config/sparsemem.h) \\ include/asm-generic/getorder.h \\ arch/x86/include/asm/processor.h \\ $(wildcard include/config/m486.h) \\ $(wildcard include/config/xen.h) \\ arch/x86/include/asm/math_emu.h \\ arch/x86/include/asm/sigcontext.h \\ arch/x86/include/uapi/asm/sigcontext.h \\ arch/x86/include/asm/current.h \\ arch/x86/include/asm/msr.h \\ arch/x86/include/asm/msr-index.h \\ arch/x86/include/asm/cpumask.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/cpumask.h \\ include/linux/cpumask.h \\ $(wildcard include/config/cpumask/offstack.h) \\ $(wildcard include/config/hotplug/cpu.h) \\ $(wildcard include/config/debug/per/cpu/maps.h) \\ include/linux/bitmap.h \\ arch/x86/include/uapi/asm/msr.h \\ include/uapi/linux/ioctl.h \\ arch/x86/include/uapi/asm/ioctl.h \\ include/asm-generic/ioctl.h \\ include/uapi/asm-generic/ioctl.h \\ arch/x86/include/asm/paravirt.h \\ arch/x86/include/asm/special_insns.h \\ arch/x86/include/asm/fpu/types.h \\ include/linux/personality.h \\ include/uapi/linux/personality.h \\ include/linux/math64.h \\ $(wildcard include/config/arch/supports/int128.h) \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/err.h \\ include/linux/err.h \\ include/linux/irqflags.h \\ $(wildcard include/config/trace/irqflags.h) \\ $(wildcard include/config/irqsoff/tracer.h) \\ $(wildcard include/config/trace/irqflags/support.h) \\ arch/x86/include/asm/irqflags.h \\ include/linux/atomic.h \\ $(wildcard include/config/arch/has/atomic/or.h) \\ $(wildcard include/config/generic/atomic64.h) \\ arch/x86/include/asm/atomic.h \\ arch/x86/include/asm/cmpxchg.h \\ arch/x86/include/asm/cmpxchg_32.h \\ arch/x86/include/asm/atomic64_32.h \\ include/asm-generic/atomic-long.h \\ include/linux/bottom_half.h \\ include/linux/spinlock_types.h \\ include/linux/lockdep.h \\ $(wildcard include/config/lockdep.h) \\ $(wildcard include/config/lock/stat.h) \\ include/linux/rwlock_types.h \\ arch/x86/include/asm/spinlock.h \\ include/linux/jump_label.h \\ $(wildcard include/config/jump/label.h) \\ arch/x86/include/asm/jump_label.h \\ arch/x86/include/asm/qspinlock.h \\ include/asm-generic/qspinlock.h \\ arch/x86/include/asm/qrwlock.h \\ include/asm-generic/qrwlock.h \\ include/linux/rwlock.h \\ include/linux/spinlock_api_smp.h \\ $(wildcard include/config/inline/spin/lock.h) \\ $(wildcard include/config/inline/spin/lock/bh.h) \\ $(wildcard include/config/inline/spin/lock/irq.h) \\ $(wildcard include/config/inline/spin/lock/irqsave.h) \\ $(wildcard include/config/inline/spin/trylock.h) \\ $(wildcard include/config/inline/spin/trylock/bh.h) \\ $(wildcard include/config/uninline/spin/unlock.h) \\ $(wildcard include/config/inline/spin/unlock/bh.h) \\ $(wildcard include/config/inline/spin/unlock/irq.h) \\ $(wildcard include/config/inline/spin/unlock/irqrestore.h) \\ include/linux/rwlock_api_smp.h \\ $(wildcard include/config/inline/read/lock.h) \\ $(wildcard include/config/inline/write/lock.h) \\ $(wildcard include/config/inline/read/lock/bh.h) \\ $(wildcard include/config/inline/write/lock/bh.h) \\ $(wildcard include/config/inline/read/lock/irq.h) \\ $(wildcard include/config/inline/write/lock/irq.h) \\ $(wildcard include/config/inline/read/lock/irqsave.h) \\ $(wildcard include/config/inline/write/lock/irqsave.h) \\ $(wildcard include/config/inline/read/trylock.h) \\ $(wildcard include/config/inline/write/trylock.h) \\ $(wildcard include/config/inline/read/unlock.h) \\ $(wildcard include/config/inline/write/unlock.h) \\ $(wildcard include/config/inline/read/unlock/bh.h) \\ $(wildcard include/config/inline/write/unlock/bh.h) \\ $(wildcard include/config/inline/read/unlock/irq.h) \\ $(wildcard include/config/inline/write/unlock/irq.h) \\ $(wildcard include/config/inline/read/unlock/irqrestore.h) \\ $(wildcard include/config/inline/write/unlock/irqrestore.h) \\ include/linux/time64.h \\ include/uapi/linux/time.h \\ include/linux/uidgid.h \\ $(wildcard include/config/multiuser.h) \\ $(wildcard include/config/user/ns.h) \\ include/linux/highuid.h \\ include/linux/kmod.h \\ include/linux/gfp.h \\ $(wildcard include/config/zone/dma.h) \\ $(wildcard include/config/zone/dma32.h) \\ $(wildcard include/config/numa.h) \\ $(wildcard include/config/deferred/struct/page/init.h) \\ $(wildcard include/config/pm/sleep.h) \\ $(wildcard include/config/cma.h) \\ include/linux/mmdebug.h \\ $(wildcard include/config/debug/vm.h) \\ include/linux/mmzone.h \\ $(wildcard include/config/force/max/zoneorder.h) \\ $(wildcard include/config/memory/isolation.h) \\ $(wildcard include/config/memcg.h) \\ $(wildcard include/config/memory/hotplug.h) \\ $(wildcard include/config/compaction.h) \\ $(wildcard include/config/have/memblock/node/map.h) \\ $(wildcard include/config/flat/node/mem/map.h) \\ $(wildcard include/config/page/extension.h) \\ $(wildcard include/config/no/bootmem.h) \\ $(wildcard include/config/numa/balancing.h) \\ $(wildcard include/config/have/memory/present.h) \\ $(wildcard include/config/have/memoryless/nodes.h) \\ $(wildcard include/config/need/node/memmap/size.h) \\ $(wildcard include/config/need/multiple/nodes.h) \\ $(wildcard include/config/have/arch/early/pfn/to/nid.h) \\ $(wildcard include/config/sparsemem/extreme.h) \\ $(wildcard include/config/have/arch/pfn/valid.h) \\ $(wildcard include/config/holes/in/zone.h) \\ $(wildcard include/config/arch/has/holes/memorymodel.h) \\ include/linux/wait.h \\ include/uapi/linux/wait.h \\ include/linux/numa.h \\ $(wildcard include/config/nodes/shift.h) \\ include/linux/nodemask.h \\ $(wildcard include/config/movable/node.h) \\ include/linux/pageblock-flags.h \\ $(wildcard include/config/hugetlb/page.h) \\ $(wildcard include/config/hugetlb/page/size/variable.h) \\ include/linux/page-flags-layout.h \\ include/generated/bounds.h \\ arch/x86/include/asm/sparsemem.h \\ include/linux/memory_hotplug.h \\ $(wildcard include/config/memory/hotremove.h) \\ $(wildcard include/config/have/arch/nodedata/extension.h) \\ $(wildcard include/config/have/bootmem/info/node.h) \\ include/linux/notifier.h \\ include/linux/mutex.h \\ $(wildcard include/config/debug/mutexes.h) \\ $(wildcard include/config/mutex/spin/on/owner.h) \\ include/linux/osq_lock.h \\ include/linux/rwsem.h \\ $(wildcard include/config/rwsem/spin/on/owner.h) \\ $(wildcard include/config/rwsem/generic/spinlock.h) \\ arch/x86/include/asm/rwsem.h \\ include/linux/srcu.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/rcupdate.h \\ include/linux/rcupdate.h \\ $(wildcard include/config/tiny/rcu.h) \\ $(wildcard include/config/tree/rcu.h) \\ $(wildcard include/config/preempt/rcu.h) \\ $(wildcard include/config/rcu/trace.h) \\ $(wildcard include/config/rcu/stall/common.h) \\ $(wildcard include/config/rcu/user/qs.h) \\ $(wildcard include/config/rcu/nocb/cpu.h) \\ $(wildcard include/config/tasks/rcu.h) \\ $(wildcard include/config/debug/objects/rcu/head.h) \\ $(wildcard include/config/prove/rcu.h) \\ $(wildcard include/config/rcu/boost.h) \\ $(wildcard include/config/rcu/nocb/cpu/all.h) \\ $(wildcard include/config/no/hz/full/sysidle.h) \\ include/linux/completion.h \\ include/linux/debugobjects.h \\ $(wildcard include/config/debug/objects.h) \\ $(wildcard include/config/debug/objects/free.h) \\ include/linux/ktime.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/jiffies.h \\ include/linux/jiffies.h \\ include/linux/timex.h \\ include/uapi/linux/timex.h \\ include/uapi/linux/param.h \\ arch/x86/include/uapi/asm/param.h \\ include/asm-generic/param.h \\ $(wildcard include/config/hz.h) \\ include/uapi/asm-generic/param.h \\ arch/x86/include/asm/timex.h \\ arch/x86/include/asm/tsc.h \\ $(wildcard include/config/x86/tsc.h) \\ include/generated/timeconst.h \\ include/linux/timekeeping.h \\ include/linux/rcutree.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/workqueue.h \\ include/linux/workqueue.h \\ $(wildcard include/config/debug/objects/work.h) \\ $(wildcard include/config/freezer.h) \\ include/linux/timer.h \\ $(wildcard include/config/timer/stats.h) \\ $(wildcard include/config/debug/objects/timers.h) \\ $(wildcard include/config/no/hz/common.h) \\ include/linux/sysctl.h \\ $(wildcard include/config/sysctl.h) \\ include/linux/rbtree.h \\ include/uapi/linux/sysctl.h \\ include/linux/topology.h \\ $(wildcard include/config/use/percpu/numa/node/id.h) \\ $(wildcard include/config/sched/smt.h) \\ include/linux/smp.h \\ $(wildcard include/config/up/late/init.h) \\ include/linux/llist.h \\ $(wildcard include/config/arch/have/nmi/safe/cmpxchg.h) \\ arch/x86/include/asm/smp.h \\ $(wildcard include/config/x86/io/apic.h) \\ $(wildcard include/config/x86/32/smp.h) \\ $(wildcard include/config/debug/nmi/selftest.h) \\ arch/x86/include/asm/mpspec.h \\ $(wildcard include/config/eisa.h) \\ $(wildcard include/config/x86/mpparse.h) \\ arch/x86/include/asm/mpspec_def.h \\ arch/x86/include/asm/x86_init.h \\ arch/x86/include/uapi/asm/bootparam.h \\ include/linux/screen_info.h \\ include/uapi/linux/screen_info.h \\ include/linux/apm_bios.h \\ include/uapi/linux/apm_bios.h \\ include/linux/edd.h \\ include/uapi/linux/edd.h \\ arch/x86/include/asm/e820.h \\ $(wildcard include/config/efi.h) \\ $(wildcard include/config/hibernation.h) \\ arch/x86/include/uapi/asm/e820.h \\ $(wildcard include/config/x86/pmem/legacy.h) \\ $(wildcard include/config/intel/txt.h) \\ include/linux/ioport.h \\ arch/x86/include/asm/ist.h \\ arch/x86/include/uapi/asm/ist.h \\ include/video/edid.h \\ $(wildcard include/config/x86.h) \\ include/uapi/video/edid.h \\ arch/x86/include/asm/apicdef.h \\ arch/x86/include/asm/apic.h \\ $(wildcard include/config/x86/x2apic.h) \\ include/linux/pm.h \\ $(wildcard include/config/vt/console/sleep.h) \\ $(wildcard include/config/pm.h) \\ $(wildcard include/config/pm/clk.h) \\ $(wildcard include/config/pm/generic/domains.h) \\ arch/x86/include/asm/fixmap.h \\ $(wildcard include/config/x86/vsyscall/emulation.h) \\ $(wildcard include/config/paravirt/clock.h) \\ $(wildcard include/config/provide/ohci1394/dma/init.h) \\ $(wildcard include/config/pci/mmconfig.h) \\ $(wildcard include/config/x86/intel/mid.h) \\ arch/x86/include/asm/acpi.h \\ $(wildcard include/config/acpi.h) \\ $(wildcard include/config/acpi/numa.h) \\ include/acpi/pdc_intel.h \\ arch/x86/include/asm/numa.h \\ $(wildcard include/config/numa/emu.h) \\ arch/x86/include/asm/topology.h \\ include/asm-generic/topology.h \\ arch/x86/include/asm/numa_32.h \\ arch/x86/include/asm/mmu.h \\ $(wildcard include/config/modify/ldt/syscall.h) \\ arch/x86/include/asm/realmode.h \\ $(wildcard include/config/acpi/sleep.h) \\ arch/x86/include/asm/io.h \\ $(wildcard include/config/mtrr.h) \\ arch/x86/include/generated/asm/early_ioremap.h \\ include/asm-generic/early_ioremap.h \\ $(wildcard include/config/generic/early/ioremap.h) \\ include/asm-generic/iomap.h \\ $(wildcard include/config/has/ioport/map.h) \\ $(wildcard include/config/pci.h) \\ $(wildcard include/config/generic/iomap.h) \\ include/asm-generic/pci_iomap.h \\ $(wildcard include/config/no/generic/pci/ioport/map.h) \\ $(wildcard include/config/generic/pci/iomap.h) \\ include/xen/xen.h \\ $(wildcard include/config/xen/dom0.h) \\ $(wildcard include/config/xen/pvh.h) \\ include/xen/interface/xen.h \\ arch/x86/include/asm/xen/interface.h \\ arch/x86/include/asm/xen/interface_32.h \\ arch/x86/include/asm/pvclock-abi.h \\ arch/x86/include/asm/xen/hypervisor.h \\ arch/x86/include/asm/pvclock.h \\ include/linux/clocksource.h \\ $(wildcard include/config/arch/clocksource/data.h) \\ $(wildcard include/config/clocksource/watchdog.h) \\ $(wildcard include/config/clksrc/of.h) \\ arch/x86/include/asm/clocksource.h \\ include/asm-generic/fixmap.h \\ arch/x86/include/asm/idle.h \\ arch/x86/include/asm/io_apic.h \\ arch/x86/include/asm/irq_vectors.h \\ $(wildcard include/config/have/kvm.h) \\ $(wildcard include/config/pci/msi.h) \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/percpu.h \\ include/linux/percpu.h \\ $(wildcard include/config/need/per/cpu/embed/first/chunk.h) \\ $(wildcard include/config/need/per/cpu/page/first/chunk.h) \\ include/linux/pfn.h \\ include/linux/elf.h \\ arch/x86/include/asm/elf.h \\ $(wildcard include/config/x86/x32/abi.h) \\ arch/x86/include/asm/user.h \\ arch/x86/include/asm/user_32.h \\ arch/x86/include/uapi/asm/auxvec.h \\ arch/x86/include/asm/vdso.h \\ $(wildcard include/config/x86/x32.h) \\ include/linux/mm_types.h \\ $(wildcard include/config/split/ptlock/cpus.h) \\ $(wildcard include/config/arch/enable/split/pmd/ptlock.h) \\ $(wildcard include/config/have/cmpxchg/double.h) \\ $(wildcard include/config/have/aligned/struct/page.h) \\ $(wildcard include/config/transparent/hugepage.h) \\ $(wildcard include/config/aio.h) \\ $(wildcard include/config/mmu/notifier.h) \\ include/linux/auxvec.h \\ include/uapi/linux/auxvec.h \\ include/linux/uprobes.h \\ $(wildcard include/config/uprobes.h) \\ arch/x86/include/asm/uprobes.h \\ arch/x86/include/asm/desc.h \\ arch/x86/include/uapi/asm/ldt.h \\ include/uapi/linux/elf.h \\ include/uapi/linux/elf-em.h \\ include/linux/kobject.h \\ $(wildcard include/config/uevent/helper.h) \\ $(wildcard include/config/debug/kobject/release.h) \\ include/linux/sysfs.h \\ include/linux/kernfs.h \\ $(wildcard include/config/kernfs.h) \\ include/linux/idr.h \\ include/linux/kobject_ns.h \\ include/linux/kref.h \\ include/linux/moduleparam.h \\ $(wildcard include/config/alpha.h) \\ $(wildcard include/config/ia64.h) \\ $(wildcard include/config/ppc64.h) \\ include/linux/rbtree_latch.h \\ arch/x86/include/asm/module.h \\ $(wildcard include/config/m586.h) \\ $(wildcard include/config/m586tsc.h) \\ $(wildcard include/config/m586mmx.h) \\ $(wildcard include/config/mcore2.h) \\ $(wildcard include/config/m686.h) \\ $(wildcard include/config/mpentiumii.h) \\ $(wildcard include/config/mpentiumiii.h) \\ $(wildcard include/config/mpentiumm.h) \\ $(wildcard include/config/mpentium4.h) \\ $(wildcard include/config/mk6.h) \\ $(wildcard include/config/mk8.h) \\ $(wildcard include/config/melan.h) \\ $(wildcard include/config/mcrusoe.h) \\ $(wildcard include/config/mefficeon.h) \\ $(wildcard include/config/mwinchipc6.h) \\ $(wildcard include/config/mwinchip3d.h) \\ $(wildcard include/config/mcyrixiii.h) \\ $(wildcard include/config/mviac3/2.h) \\ $(wildcard include/config/mviac7.h) \\ $(wildcard include/config/mgeodegx1.h) \\ $(wildcard include/config/mgeode/lx.h) \\ include/asm-generic/module.h \\ $(wildcard include/config/have/mod/arch/specific.h) \\ $(wildcard include/config/modules/use/elf/rel.h) \\ $(wildcard include/config/modules/use/elf/rela.h) \\ include/uapi/linux/in_route.h \\ include/linux/inetdevice.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/if.h \\ include/uapi/linux/if.h \\ include/uapi/linux/hdlc/ioctl.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/ip.h \\ include/linux/ip.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/skbuff.h \\ include/linux/skbuff.h \\ $(wildcard include/config/nf/conntrack.h) \\ $(wildcard include/config/bridge/netfilter.h) \\ $(wildcard include/config/xfrm.h) \\ $(wildcard include/config/ipv6/ndisc/nodetype.h) \\ $(wildcard include/config/net/sched.h) \\ $(wildcard include/config/net/cls/act.h) \\ $(wildcard include/config/net/rx/busy/poll.h) \\ $(wildcard include/config/xps.h) \\ $(wildcard include/config/network/secmark.h) \\ $(wildcard include/config/network/phy/timestamping.h) \\ $(wildcard include/config/netfilter/xt/target/trace.h) \\ $(wildcard include/config/nf/tables.h) \\ include/linux/kmemcheck.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/net.h \\ include/linux/net.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/random.h \\ include/linux/random.h \\ $(wildcard include/config/arch/random.h) \\ include/uapi/linux/random.h \\ include/linux/irqnr.h \\ include/uapi/linux/irqnr.h \\ arch/x86/include/asm/archrandom.h \\ include/linux/fcntl.h \\ include/uapi/linux/fcntl.h \\ arch/x86/include/uapi/asm/fcntl.h \\ include/uapi/asm-generic/fcntl.h \\ include/uapi/linux/net.h \\ include/linux/textsearch.h \\ include/linux/slab.h \\ $(wildcard include/config/debug/slab.h) \\ $(wildcard include/config/failslab.h) \\ $(wildcard include/config/slab.h) \\ $(wildcard include/config/slub.h) \\ $(wildcard include/config/slob.h) \\ include/linux/kmemleak.h \\ $(wildcard include/config/debug/kmemleak.h) \\ include/linux/kasan.h \\ $(wildcard include/config/kasan.h) \\ $(wildcard include/config/kasan/shadow/offset.h) \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/net/checksum.h \\ include/net/checksum.h \\ arch/x86/include/asm/uaccess.h \\ $(wildcard include/config/x86/intel/usercopy.h) \\ $(wildcard include/config/debug/strict/user/copy/checks.h) \\ arch/x86/include/asm/smap.h \\ $(wildcard include/config/x86/smap.h) \\ arch/x86/include/asm/uaccess_32.h \\ arch/x86/include/asm/checksum.h \\ arch/x86/include/asm/checksum_32.h \\ include/linux/in6.h \\ include/uapi/linux/in6.h \\ include/linux/hrtimer.h \\ $(wildcard include/config/high/res/timers.h) \\ $(wildcard include/config/timerfd.h) \\ include/linux/timerqueue.h \\ include/linux/dma-mapping.h \\ $(wildcard include/config/has/dma.h) \\ $(wildcard include/config/arch/has/dma/set/coherent/mask.h) \\ $(wildcard include/config/have/dma/attrs.h) \\ $(wildcard include/config/need/dma/map/state.h) \\ include/linux/device.h \\ $(wildcard include/config/debug/devres.h) \\ $(wildcard include/config/pinctrl.h) \\ $(wildcard include/config/dma/cma.h) \\ $(wildcard include/config/of.h) \\ $(wildcard include/config/devtmpfs.h) \\ $(wildcard include/config/sysfs/deprecated.h) \\ include/linux/klist.h \\ include/linux/pinctrl/devinfo.h \\ include/linux/pinctrl/consumer.h \\ include/linux/seq_file.h \\ include/linux/pinctrl/pinctrl-state.h \\ include/linux/ratelimit.h \\ arch/x86/include/asm/device.h \\ $(wildcard include/config/x86/dev/dma/ops.h) \\ $(wildcard include/config/intel/iommu.h) \\ $(wildcard include/config/amd/iommu.h) \\ include/linux/pm_wakeup.h \\ include/linux/dma-attrs.h \\ include/linux/dma-direction.h \\ include/linux/scatterlist.h \\ $(wildcard include/config/debug/sg.h) \\ $(wildcard include/config/need/sg/dma/length.h) \\ $(wildcard include/config/arch/has/sg/chain.h) \\ include/linux/mm.h \\ $(wildcard include/config/ppc.h) \\ $(wildcard include/config/parisc.h) \\ $(wildcard include/config/metag.h) \\ $(wildcard include/config/stack/growsup.h) \\ $(wildcard include/config/shmem.h) \\ $(wildcard include/config/debug/vm/rb.h) \\ $(wildcard include/config/debug/pagealloc.h) \\ $(wildcard include/config/hugetlbfs.h) \\ include/linux/debug_locks.h \\ $(wildcard include/config/debug/locking/api/selftests.h) \\ include/linux/bit_spinlock.h \\ include/linux/shrinker.h \\ include/linux/resource.h \\ include/uapi/linux/resource.h \\ arch/x86/include/uapi/asm/resource.h \\ include/asm-generic/resource.h \\ include/uapi/asm-generic/resource.h \\ include/linux/page_ext.h \\ $(wildcard include/config/page/owner.h) \\ include/linux/stacktrace.h \\ $(wildcard include/config/stacktrace.h) \\ $(wildcard include/config/user/stacktrace/support.h) \\ arch/x86/include/asm/pgtable.h \\ $(wildcard include/config/have/arch/soft/dirty.h) \\ arch/x86/include/asm/pgtable_32.h \\ $(wildcard include/config/highpte.h) \\ arch/x86/include/asm/pgtable-3level.h \\ include/asm-generic/pgtable.h \\ $(wildcard include/config/have/arch/huge/vmap.h) \\ include/linux/page-flags.h \\ $(wildcard include/config/pageflags/extended.h) \\ $(wildcard include/config/arch/uses/pg/uncached.h) \\ $(wildcard include/config/memory/failure.h) \\ $(wildcard include/config/swap.h) \\ $(wildcard include/config/ksm.h) \\ include/linux/huge_mm.h \\ include/linux/vmstat.h \\ $(wildcard include/config/vm/event/counters.h) \\ $(wildcard include/config/debug/tlbflush.h) \\ $(wildcard include/config/debug/vm/vmacache.h) \\ include/linux/vm_event_item.h \\ $(wildcard include/config/migration.h) \\ $(wildcard include/config/memory/balloon.h) \\ $(wildcard include/config/balloon/compaction.h) \\ arch/x86/include/asm/dma-mapping.h \\ $(wildcard include/config/isa.h) \\ $(wildcard include/config/x86/dma/remap.h) \\ include/linux/dma-debug.h \\ $(wildcard include/config/dma/api/debug.h) \\ arch/x86/include/asm/swiotlb.h \\ $(wildcard include/config/swiotlb.h) \\ include/linux/swiotlb.h \\ include/asm-generic/dma-coherent.h \\ $(wildcard include/config/have/generic/dma/coherent.h) \\ include/linux/dma-contiguous.h \\ include/asm-generic/dma-mapping-common.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/netdev_features.h \\ include/linux/netdev_features.h \\ include/linux/sched.h \\ $(wildcard include/config/sched/debug.h) \\ $(wildcard include/config/lockup/detector.h) \\ $(wildcard include/config/detect/hung/task.h) \\ $(wildcard include/config/core/dump/default/elf/headers.h) \\ $(wildcard include/config/sched/autogroup.h) \\ $(wildcard include/config/virt/cpu/accounting/native.h) \\ $(wildcard include/config/bsd/process/acct.h) \\ $(wildcard include/config/taskstats.h) \\ $(wildcard include/config/audit.h) \\ $(wildcard include/config/inotify/user.h) \\ $(wildcard include/config/fanotify.h) \\ $(wildcard include/config/epoll.h) \\ $(wildcard include/config/posix/mqueue.h) \\ $(wildcard include/config/keys.h) \\ $(wildcard include/config/perf/events.h) \\ $(wildcard include/config/sched/info.h) \\ $(wildcard include/config/task/delay/acct.h) \\ $(wildcard include/config/schedstats.h) \\ $(wildcard include/config/sched/mc.h) \\ $(wildcard include/config/fair/group/sched.h) \\ $(wildcard include/config/rt/group/sched.h) \\ $(wildcard include/config/cgroup/sched.h) \\ $(wildcard include/config/blk/dev/io/trace.h) \\ $(wildcard include/config/memcg/kmem.h) \\ $(wildcard include/config/compat/brk.h) \\ $(wildcard include/config/virt/cpu/accounting/gen.h) \\ $(wildcard include/config/sysvipc.h) \\ $(wildcard include/config/auditsyscall.h) \\ $(wildcard include/config/rt/mutexes.h) \\ $(wildcard include/config/block.h) \\ $(wildcard include/config/task/xacct.h) \\ $(wildcard include/config/cpusets.h) \\ $(wildcard include/config/cgroups.h) \\ $(wildcard include/config/futex.h) \\ $(wildcard include/config/fault/injection.h) \\ $(wildcard include/config/latencytop.h) \\ $(wildcard include/config/function/graph/tracer.h) \\ $(wildcard include/config/bcache.h) \\ $(wildcard include/config/arch/wants/dynamic/task/struct.h) \\ $(wildcard include/config/have/unstable/sched/clock.h) \\ $(wildcard include/config/irq/time/accounting.h) \\ $(wildcard include/config/no/hz/full.h) \\ $(wildcard include/config/have/copy/thread/tls.h) \\ include/uapi/linux/sched.h \\ include/linux/sched/prio.h \\ include/linux/capability.h \\ include/uapi/linux/capability.h \\ include/linux/plist.h \\ $(wildcard include/config/debug/pi/list.h) \\ include/linux/cputime.h \\ arch/x86/include/generated/asm/cputime.h \\ include/asm-generic/cputime.h \\ $(wildcard include/config/virt/cpu/accounting.h) \\ include/asm-generic/cputime_jiffies.h \\ include/linux/sem.h \\ include/uapi/linux/sem.h \\ include/linux/ipc.h \\ include/uapi/linux/ipc.h \\ arch/x86/include/uapi/asm/ipcbuf.h \\ include/uapi/asm-generic/ipcbuf.h \\ arch/x86/include/uapi/asm/sembuf.h \\ include/linux/shm.h \\ include/uapi/linux/shm.h \\ arch/x86/include/uapi/asm/shmbuf.h \\ include/uapi/asm-generic/shmbuf.h \\ arch/x86/include/asm/shmparam.h \\ include/linux/signal.h \\ $(wildcard include/config/old/sigaction.h) \\ include/uapi/linux/signal.h \\ arch/x86/include/asm/signal.h \\ arch/x86/include/uapi/asm/signal.h \\ include/uapi/asm-generic/signal-defs.h \\ arch/x86/include/uapi/asm/siginfo.h \\ include/asm-generic/siginfo.h \\ include/uapi/asm-generic/siginfo.h \\ include/linux/pid.h \\ include/linux/proportions.h \\ include/linux/percpu_counter.h \\ include/linux/seccomp.h \\ $(wildcard include/config/seccomp.h) \\ $(wildcard include/config/have/arch/seccomp/filter.h) \\ $(wildcard include/config/seccomp/filter.h) \\ include/uapi/linux/seccomp.h \\ arch/x86/include/asm/seccomp.h \\ arch/x86/include/asm/unistd.h \\ arch/x86/include/uapi/asm/unistd.h \\ arch/x86/include/generated/uapi/asm/unistd_32.h \\ include/asm-generic/seccomp.h \\ include/uapi/linux/unistd.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/rculist.h \\ include/linux/rculist.h \\ include/linux/rtmutex.h \\ $(wildcard include/config/debug/rt/mutexes.h) \\ include/linux/task_io_accounting.h \\ $(wildcard include/config/task/io/accounting.h) \\ include/linux/latencytop.h \\ include/linux/cred.h \\ $(wildcard include/config/debug/credentials.h) \\ $(wildcard include/config/security.h) \\ include/linux/key.h \\ include/linux/assoc_array.h \\ $(wildcard include/config/associative/array.h) \\ include/linux/selinux.h \\ $(wildcard include/config/security/selinux.h) \\ include/uapi/linux/magic.h \\ include/linux/cgroup-defs.h \\ include/uapi/linux/limits.h \\ include/linux/percpu-refcount.h \\ include/linux/percpu-rwsem.h \\ include/linux/cgroup_subsys.h \\ $(wildcard include/config/cgroup/cpuacct.h) \\ $(wildcard include/config/blk/cgroup.h) \\ $(wildcard include/config/cgroup/device.h) \\ $(wildcard include/config/cgroup/freezer.h) \\ $(wildcard include/config/cgroup/net/classid.h) \\ $(wildcard include/config/cgroup/perf.h) \\ $(wildcard include/config/cgroup/net/prio.h) \\ $(wildcard include/config/cgroup/hugetlb.h) \\ $(wildcard include/config/cgroup/debug.h) \\ include/net/flow_dissector.h \\ include/uapi/linux/if_ether.h \\ include/linux/splice.h \\ include/linux/pipe_fs_i.h \\ include/linux/jhash.h \\ include/linux/unaligned/packed_struct.h \\ include/uapi/linux/ip.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/netdevice.h \\ include/linux/netdevice.h \\ $(wildcard include/config/dcb.h) \\ $(wildcard include/config/wlan.h) \\ $(wildcard include/config/ax25.h) \\ $(wildcard include/config/mac80211/mesh.h) \\ $(wildcard include/config/net/ipip.h) \\ $(wildcard include/config/net/ipgre.h) \\ $(wildcard include/config/ipv6/sit.h) \\ $(wildcard include/config/ipv6/tunnel.h) \\ $(wildcard include/config/rps.h) \\ $(wildcard include/config/netpoll.h) \\ $(wildcard include/config/bql.h) \\ $(wildcard include/config/rfs/accel.h) \\ $(wildcard include/config/fcoe.h) \\ $(wildcard include/config/net/poll/controller.h) \\ $(wildcard include/config/libfcoe.h) \\ $(wildcard include/config/wireless/ext.h) \\ $(wildcard include/config/net/switchdev.h) \\ $(wildcard include/config/vlan/8021q.h) \\ $(wildcard include/config/net/dsa.h) \\ $(wildcard include/config/tipc.h) \\ $(wildcard include/config/mpls/routing.h) \\ $(wildcard include/config/netfilter/ingress.h) \\ $(wildcard include/config/net/flow/limit.h) \\ include/linux/delay.h \\ arch/x86/include/asm/delay.h \\ include/asm-generic/delay.h \\ include/linux/prefetch.h \\ include/linux/dmaengine.h \\ $(wildcard include/config/async/tx/enable/channel/switch.h) \\ $(wildcard include/config/dma/engine.h) \\ $(wildcard include/config/rapidio/dma/engine.h) \\ $(wildcard include/config/async/tx/dma.h) \\ include/linux/dynamic_queue_limits.h \\ include/linux/ethtool.h \\ include/linux/compat.h \\ $(wildcard include/config/compat/old/sigaction.h) \\ $(wildcard include/config/odd/rt/sigaction.h) \\ include/uapi/linux/ethtool.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/if_ether.h \\ include/linux/if_ether.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/net/net_namespace.h \\ $(wildcard include/config/net/ns.h) \\ include/net/net_namespace.h \\ $(wildcard include/config/ipv6.h) \\ $(wildcard include/config/ieee802154/6lowpan.h) \\ $(wildcard include/config/ip/sctp.h) \\ $(wildcard include/config/ip/dccp.h) \\ $(wildcard include/config/netfilter.h) \\ $(wildcard include/config/nf/defrag/ipv6.h) \\ $(wildcard include/config/wext/core.h) \\ $(wildcard include/config/ip/vs.h) \\ $(wildcard include/config/mpls.h) \\ include/net/flow.h \\ include/net/netns/core.h \\ include/net/netns/mib.h \\ $(wildcard include/config/xfrm/statistics.h) \\ include/net/snmp.h \\ include/uapi/linux/snmp.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/u64_stats_sync.h \\ include/linux/u64_stats_sync.h \\ include/net/netns/unix.h \\ include/net/netns/packet.h \\ include/net/netns/ipv4.h \\ $(wildcard include/config/ip/multiple/tables.h) \\ $(wildcard include/config/ip/route/classid.h) \\ $(wildcard include/config/ip/mroute.h) \\ $(wildcard include/config/ip/mroute/multiple/tables.h) \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/net/inet_frag.h \\ include/net/inet_frag.h \\ include/net/netns/ipv6.h \\ $(wildcard include/config/ipv6/multiple/tables.h) \\ $(wildcard include/config/ipv6/mroute.h) \\ $(wildcard include/config/ipv6/mroute/multiple/tables.h) \\ include/net/dst_ops.h \\ include/net/netns/ieee802154_6lowpan.h \\ include/net/netns/sctp.h \\ include/net/netns/dccp.h \\ include/net/netns/netfilter.h \\ include/linux/netfilter_defs.h \\ include/uapi/linux/netfilter.h \\ include/net/netns/x_tables.h \\ $(wildcard include/config/bridge/nf/ebtables.h) \\ include/net/netns/conntrack.h \\ $(wildcard include/config/nf/conntrack/proc/compat.h) \\ $(wildcard include/config/nf/conntrack/events.h) \\ $(wildcard include/config/nf/conntrack/labels.h) \\ $(wildcard include/config/nf/nat/needed.h) \\ include/linux/list_nulls.h \\ include/linux/netfilter/nf_conntrack_tcp.h \\ include/uapi/linux/netfilter/nf_conntrack_tcp.h \\ include/net/netns/nftables.h \\ include/net/netns/xfrm.h \\ include/uapi/linux/xfrm.h \\ include/net/flowcache.h \\ include/linux/interrupt.h \\ $(wildcard include/config/irq/forced/threading.h) \\ $(wildcard include/config/generic/irq/probe.h) \\ include/linux/irqreturn.h \\ include/linux/hardirq.h \\ include/linux/ftrace_irq.h \\ $(wildcard include/config/ftrace/nmi/enter.h) \\ include/linux/vtime.h \\ include/linux/context_tracking_state.h \\ $(wildcard include/config/context/tracking.h) \\ include/linux/static_key.h \\ arch/x86/include/asm/hardirq.h \\ $(wildcard include/config/x86/thermal/vector.h) \\ $(wildcard include/config/x86/mce/threshold.h) \\ $(wildcard include/config/x86/mce/amd.h) \\ $(wildcard include/config/hyperv.h) \\ include/linux/irq.h \\ $(wildcard include/config/irq/domain/hierarchy.h) \\ $(wildcard include/config/generic/pending/irq.h) \\ $(wildcard include/config/hardirqs/sw/resend.h) \\ $(wildcard include/config/generic/irq/legacy/alloc/hwirq.h) \\ $(wildcard include/config/generic/irq/legacy.h) \\ include/linux/irqhandler.h \\ include/linux/io.h \\ arch/x86/include/asm/irq.h \\ arch/x86/include/asm/irq_regs.h \\ include/linux/irqdesc.h \\ $(wildcard include/config/irq/preflow/fasteoi.h) \\ $(wildcard include/config/sparse/irq.h) \\ $(wildcard include/config/handle/domain/irq.h) \\ arch/x86/include/asm/hw_irq.h \\ $(wildcard include/config/hpet/timer.h) \\ $(wildcard include/config/dmar/table.h) \\ $(wildcard include/config/ht/irq.h) \\ $(wildcard include/config/x86/uv.h) \\ include/linux/profile.h \\ $(wildcard include/config/profiling.h) \\ arch/x86/include/asm/sections.h \\ $(wildcard include/config/debug/rodata.h) \\ include/asm-generic/sections.h \\ include/net/netns/mpls.h \\ include/linux/ns_common.h \\ include/linux/seq_file_net.h \\ include/net/dsa.h \\ $(wildcard include/config/net/dsa/hwmon.h) \\ include/linux/of.h \\ $(wildcard include/config/sparc.h) \\ $(wildcard include/config/of/dynamic.h) \\ $(wildcard include/config/attach/node.h) \\ $(wildcard include/config/detach/node.h) \\ $(wildcard include/config/add/property.h) \\ $(wildcard include/config/remove/property.h) \\ $(wildcard include/config/update/property.h) \\ $(wildcard include/config/no/change.h) \\ $(wildcard include/config/change/add.h) \\ $(wildcard include/config/change/remove.h) \\ $(wildcard include/config/of/resolve.h) \\ $(wildcard include/config/of/overlay.h) \\ include/linux/mod_devicetable.h \\ include/linux/uuid.h \\ include/uapi/linux/uuid.h \\ include/linux/property.h \\ include/linux/fwnode.h \\ include/linux/phy.h \\ include/linux/mii.h \\ include/uapi/linux/mii.h \\ include/linux/phy_fixed.h \\ $(wildcard include/config/fixed/phy.h) \\ include/net/dcbnl.h \\ include/uapi/linux/dcbnl.h \\ include/net/netprio_cgroup.h \\ include/linux/cgroup.h \\ include/uapi/linux/cgroupstats.h \\ include/uapi/linux/taskstats.h \\ include/linux/fs.h \\ $(wildcard include/config/fs/posix/acl.h) \\ $(wildcard include/config/cgroup/writeback.h) \\ $(wildcard include/config/ima.h) \\ $(wildcard include/config/fsnotify.h) \\ $(wildcard include/config/file/locking.h) \\ $(wildcard include/config/quota.h) \\ $(wildcard include/config/blk/dev/loop.h) \\ $(wildcard include/config/fs/dax.h) \\ include/linux/kdev_t.h \\ include/uapi/linux/kdev_t.h \\ include/linux/dcache.h \\ include/linux/rculist_bl.h \\ include/linux/list_bl.h \\ include/linux/lockref.h \\ $(wildcard include/config/arch/use/cmpxchg/lockref.h) \\ include/linux/path.h \\ include/linux/list_lru.h \\ include/linux/radix-tree.h \\ include/linux/semaphore.h \\ include/uapi/linux/fiemap.h \\ include/linux/migrate_mode.h \\ include/linux/blk_types.h \\ $(wildcard include/config/blk/dev/integrity.h) \\ include/uapi/linux/fs.h \\ include/linux/quota.h \\ $(wildcard include/config/quota/netlink/interface.h) \\ include/uapi/linux/dqblk_xfs.h \\ include/linux/dqblk_v1.h \\ include/linux/dqblk_v2.h \\ include/linux/dqblk_qtree.h \\ include/linux/projid.h \\ include/uapi/linux/quota.h \\ include/linux/nfs_fs_i.h \\ include/uapi/linux/neighbour.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/netlink.h \\ include/linux/netlink.h \\ include/net/scm.h \\ $(wildcard include/config/security/network.h) \\ include/linux/security.h \\ $(wildcard include/config/security/network/xfrm.h) \\ $(wildcard include/config/security/path.h) \\ $(wildcard include/config/securityfs.h) \\ include/linux/nsproxy.h \\ include/uapi/linux/netlink.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/net/netlink.h \\ include/net/netlink.h \\ include/linux/in6.h \\ include/uapi/linux/netdevice.h \\ include/uapi/linux/if_packet.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/if_link.h \\ include/linux/if_link.h \\ include/uapi/linux/if_link.h \\ include/uapi/linux/if_bonding.h \\ include/linux/if_bridge.h \\ $(wildcard include/config/bridge.h) \\ $(wildcard include/config/bridge/igmp/snooping.h) \\ include/uapi/linux/if_bridge.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/rtnetlink.h \\ include/linux/rtnetlink.h \\ $(wildcard include/config/net/ingress.h) \\ include/uapi/linux/rtnetlink.h \\ include/uapi/linux/if_addr.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/net/ip_tunnels.h \\ include/linux/if_tunnel.h \\ include/uapi/linux/if_tunnel.h \\ include/net/dsfield.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/ipv6.h \\ include/linux/ipv6.h \\ $(wildcard include/config/ipv6/router/pref.h) \\ $(wildcard include/config/ipv6/route/info.h) \\ $(wildcard include/config/ipv6/optimistic/dad.h) \\ $(wildcard include/config/ipv6/mip6.h) \\ $(wildcard include/config/ipv6/subtrees.h) \\ include/uapi/linux/ipv6.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/icmpv6.h \\ include/linux/icmpv6.h \\ include/uapi/linux/icmpv6.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/tcp.h \\ include/linux/tcp.h \\ $(wildcard include/config/tcp/md5sig.h) \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/net/sock.h \\ include/net/sock.h \\ $(wildcard include/config/net.h) \\ $(wildcard include/config/inet.h) \\ include/linux/uaccess.h \\ include/linux/page_counter.h \\ include/linux/memcontrol.h \\ $(wildcard include/config/memcg/swap.h) \\ include/linux/filter.h \\ $(wildcard include/config/bpf/jit.h) \\ arch/x86/include/asm/cacheflush.h \\ $(wildcard include/config/debug/rodata/test.h) \\ include/asm-generic/cacheflush.h \\ include/uapi/linux/filter.h \\ include/uapi/linux/bpf_common.h \\ include/uapi/linux/bpf.h \\ include/linux/rculist_nulls.h \\ include/linux/poll.h \\ include/uapi/linux/poll.h \\ arch/x86/include/uapi/asm/poll.h \\ include/uapi/asm-generic/poll.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/net/dst.h \\ include/net/dst.h \\ include/net/neighbour.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/net/rtnetlink.h \\ include/net/rtnetlink.h \\ include/net/tcp_states.h \\ include/uapi/linux/net_tstamp.h \\ include/net/inet_connection_sock.h \\ include/net/inet_sock.h \\ include/net/request_sock.h \\ include/net/netns/hash.h \\ include/net/inet_timewait_sock.h \\ include/net/timewait_sock.h \\ include/uapi/linux/tcp.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/udp.h \\ include/linux/udp.h \\ include/uapi/linux/udp.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/net/inet_ecn.h \\ include/net/inet_ecn.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/net/ip.h \\ include/net/ip.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/net/route.h \\ include/net/route.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/net/inetpeer.h \\ include/net/inetpeer.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/net/ipv6.h \\ $(wildcard include/config/have/efficient/unaligned/access.h) \\ include/net/ipv6.h \\ include/net/if_inet6.h \\ include/net/ndisc.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/if_arp.h \\ include/linux/if_arp.h \\ $(wildcard include/config/firewire/net.h) \\ include/uapi/linux/if_arp.h \\ include/linux/hash.h \\ $(wildcard include/config/arch/has/fast/multiplier.h) \\ include/uapi/linux/route.h \\ include/net/xfrm.h \\ $(wildcard include/config/xfrm/sub/policy.h) \\ $(wildcard include/config/xfrm/migrate.h) \\ include/uapi/linux/pfkeyv2.h \\ include/uapi/linux/ipsec.h \\ include/linux/audit.h \\ $(wildcard include/config/audit/compat/generic.h) \\ include/linux/ptrace.h \\ include/linux/pid_namespace.h \\ $(wildcard include/config/pid/ns.h) \\ include/uapi/linux/ptrace.h \\ include/uapi/linux/audit.h \\ $(wildcard include/config/change.h) \\ arch/x86/include/asm/syscall.h \\ arch/x86/include/asm/asm-offsets.h \\ include/generated/asm-offsets.h \\ include/net/ip6_fib.h \\ include/linux/ipv6_route.h \\ include/uapi/linux/ipv6_route.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/../compat.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/net/netfilter/ipv6/nf_defrag_ipv6.h \\ include/net/netfilter/ipv6/nf_defrag_ipv6.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/gso.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/../datapath.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/../compat.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/../flow.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/openvswitch.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/flex_array.h \\ include/linux/flex_array.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/reciprocal_div.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/net/dst_metadata.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/../flow_table.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/../vlan.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/if_vlan.h \\ include/linux/if_vlan.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/etherdevice.h \\ include/linux/etherdevice.h \\ arch/x86/include/asm/unaligned.h \\ include/linux/unaligned/access_ok.h \\ include/linux/unaligned/generic.h \\ include/uapi/linux/if_vlan.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/../vport-netdev.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/../vport.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/../datapath.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/ip_tunnels_core.o: $(deps_/home/zrd/openvswitch-2.5.0/datapath/linux/ip_tunnels_core.o) $(deps_/home/zrd/openvswitch-2.5.0/datapath/linux/ip_tunnels_core.o): ",16268,True,4505.915175943142,median "//------------------------LED EFFECT FUNCTIONS------------------------ void rainbow_fade() { //-m2-FADE ALL LEDS THROUGH HSV RAINBOW ihue++; if (ihue > 255) { ihue = 0; } for (int idex = 0 ; idex < LED_COUNT; idex++ ) { leds[idex] = CHSV(ihue, thissat, 255); } LEDS.show(); delay(thisdelay); } void rainbow_loop() { //-m3-LOOP HSV RAINBOW idex++; ihue = ihue + thisstep; if (idex >= LED_COUNT) { idex = 0; } if (ihue > 255) { ihue = 0; } leds[idex] = CHSV(ihue, thissat, 255); LEDS.show(); delay(thisdelay); } void random_burst() { //-m4-RANDOM INDEX/COLOR idex = random(0, LED_COUNT); ihue = random(0, 255); leds[idex] = CHSV(ihue, thissat, 255); LEDS.show(); delay(thisdelay); } void color_bounce() { //-m5-BOUNCE COLOR (SINGLE LED) if (bouncedirection == 0) { idex = idex + 1; if (idex == LED_COUNT) { bouncedirection = 1; idex = idex - 1; } } if (bouncedirection == 1) { idex = idex - 1; if (idex == 0) { bouncedirection = 0; } } for (int i = 0; i < LED_COUNT; i++ ) { if (i == idex) { leds[i] = CHSV(thishue, thissat, 255); } else { leds[i] = CHSV(0, 0, 0); } } LEDS.show(); delay(thisdelay); } void color_bounceFADE() { //-m6-BOUNCE COLOR (SIMPLE MULTI-LED FADE) if (bouncedirection == 0) { idex = idex + 1; if (idex == LED_COUNT) { bouncedirection = 1; idex = idex - 1; } } if (bouncedirection == 1) { idex = idex - 1; if (idex == 0) { bouncedirection = 0; } } int iL1 = adjacent_cw(idex); int iL2 = adjacent_cw(iL1); int iL3 = adjacent_cw(iL2); int iR1 = adjacent_ccw(idex); int iR2 = adjacent_ccw(iR1); int iR3 = adjacent_ccw(iR2); for (int i = 0; i < LED_COUNT; i++ ) { if (i == idex) { leds[i] = CHSV(thishue, thissat, 255); } else if (i == iL1) { leds[i] = CHSV(thishue, thissat, 150); } else if (i == iL2) { leds[i] = CHSV(thishue, thissat, 80); } else if (i == iL3) { leds[i] = CHSV(thishue, thissat, 20); } else if (i == iR1) { leds[i] = CHSV(thishue, thissat, 150); } else if (i == iR2) { leds[i] = CHSV(thishue, thissat, 80); } else if (i == iR3) { leds[i] = CHSV(thishue, thissat, 20); } else { leds[i] = CHSV(0, 0, 0); } } LEDS.show(); delay(thisdelay); } void ems_lightsONE() { //-m7-EMERGENCY LIGHTS (TWO COLOR SINGLE LED) idex++; if (idex >= LED_COUNT) { idex = 0; } int idexR = idex; int idexB = antipodal_index(idexR); int thathue = (thishue + 160) % 255; for (int i = 0; i < LED_COUNT; i++ ) { if (i == idexR) { leds[i] = CHSV(thishue, thissat, 255); } else if (i == idexB) { leds[i] = CHSV(thathue, thissat, 255); } else { leds[i] = CHSV(0, 0, 0); } } LEDS.show(); delay(thisdelay); } void ems_lightsALL() { //-m8-EMERGENCY LIGHTS (TWO COLOR SOLID) idex++; if (idex >= LED_COUNT) { idex = 0; } int idexR = idex; int idexB = antipodal_index(idexR); int thathue = (thishue + 160) % 255; leds[idexR] = CHSV(thishue, thissat, 255); leds[idexB] = CHSV(thathue, thissat, 255); LEDS.show(); delay(thisdelay); } void flicker() { //-m9-FLICKER EFFECT int random_bright = random(0, 255); int random_delay = random(10, 100); int random_bool = random(0, random_bright); if (random_bool < 10) { for (int i = 0 ; i < LED_COUNT; i++ ) { leds[i] = CHSV(thishue, thissat, random_bright); } LEDS.show(); delay(random_delay); } } void pulse_one_color_all() { //-m10-PULSE BRIGHTNESS ON ALL LEDS TO ONE COLOR if (bouncedirection == 0) { ibright++; if (ibright >= 255) { bouncedirection = 1; } } if (bouncedirection == 1) { ibright = ibright - 1; if (ibright <= 1) { bouncedirection = 0; } } for (int idex = 0 ; idex < LED_COUNT; idex++ ) { leds[idex] = CHSV(thishue, thissat, ibright); } LEDS.show(); delay(thisdelay); } void pulse_one_color_all_rev() { //-m11-PULSE SATURATION ON ALL LEDS TO ONE COLOR if (bouncedirection == 0) { isat++; if (isat >= 255) { bouncedirection = 1; } } if (bouncedirection == 1) { isat = isat - 1; if (isat <= 1) { bouncedirection = 0; } } for (int idex = 0 ; idex < LED_COUNT; idex++ ) { leds[idex] = CHSV(thishue, isat, 255); } LEDS.show(); delay(thisdelay); } void fade_vertical() { //-m12-FADE 'UP' THE LOOP idex++; if (idex > TOP_INDEX) { idex = 0; } int idexA = idex; int idexB = horizontal_index(idexA); ibright = ibright + 10; if (ibright > 255) { ibright = 0; } leds[idexA] = CHSV(thishue, thissat, ibright); leds[idexB] = CHSV(thishue, thissat, ibright); LEDS.show(); delay(thisdelay); } void random_red() { //QUICK 'N DIRTY RANDOMIZE TO GET CELL AUTOMATA STARTED int temprand; for (int i = 0; i < LED_COUNT; i++ ) { temprand = random(0, 100); if (temprand > 50) { leds[i].r = 255; } if (temprand <= 50) { leds[i].r = 0; } leds[i].b = 0; leds[i].g = 0; } LEDS.show(); } void rule30() { //-m13-1D CELLULAR AUTOMATA - RULE 30 (RED FOR NOW) if (bouncedirection == 0) { random_red(); bouncedirection = 1; } copy_led_array(); int iCW; int iCCW; int y = 100; for (int i = 0; i < LED_COUNT; i++ ) { iCW = adjacent_cw(i); iCCW = adjacent_ccw(i); if (ledsX[iCCW][0] > y && ledsX[i][0] > y && ledsX[iCW][0] > y) { leds[i].r = 0; } if (ledsX[iCCW][0] > y && ledsX[i][0] > y && ledsX[iCW][0] <= y) { leds[i].r = 0; } if (ledsX[iCCW][0] > y && ledsX[i][0] <= y && ledsX[iCW][0] > y) { leds[i].r = 0; } if (ledsX[iCCW][0] > y && ledsX[i][0] <= y && ledsX[iCW][0] <= y) { leds[i].r = 255; } if (ledsX[iCCW][0] <= y && ledsX[i][0] > y && ledsX[iCW][0] > y) { leds[i].r = 255; } if (ledsX[iCCW][0] <= y && ledsX[i][0] > y && ledsX[iCW][0] <= y) { leds[i].r = 255; } if (ledsX[iCCW][0] <= y && ledsX[i][0] <= y && ledsX[iCW][0] > y) { leds[i].r = 255; } if (ledsX[iCCW][0] <= y && ledsX[i][0] <= y && ledsX[iCW][0] <= y) { leds[i].r = 0; } } LEDS.show(); delay(thisdelay); } void random_march() { //-m14-RANDOM MARCH CCW copy_led_array(); int iCCW; leds[0] = CHSV(random(0, 255), 255, 255); for (int idex = 1; idex < LED_COUNT ; idex++ ) { iCCW = adjacent_ccw(idex); leds[idex].r = ledsX[iCCW][0]; leds[idex].g = ledsX[iCCW][1]; leds[idex].b = ledsX[iCCW][2]; } LEDS.show(); delay(thisdelay); } void rwb_march() { //-m15-R,W,B MARCH CCW copy_led_array(); int iCCW; idex++; if (idex > 2) { idex = 0; } switch (idex) { case 0: leds[0].r = 255; leds[0].g = 0; leds[0].b = 0; break; case 1: leds[0].r = 255; leds[0].g = 255; leds[0].b = 255; break; case 2: leds[0].r = 0; leds[0].g = 0; leds[0].b = 255; break; } for (int i = 1; i < LED_COUNT; i++ ) { iCCW = adjacent_ccw(i); leds[i].r = ledsX[iCCW][0]; leds[i].g = ledsX[iCCW][1]; leds[i].b = ledsX[iCCW][2]; } LEDS.show(); delay(thisdelay); } void radiation() { //-m16-SORT OF RADIATION SYMBOLISH- int N3 = int(LED_COUNT / 3); int N6 = int(LED_COUNT / 6); int N12 = int(LED_COUNT / 12); for (int i = 0; i < N6; i++ ) { //-HACKY, I KNOW... tcount = tcount + .02; if (tcount > 3.14) { tcount = 0.0; } ibright = int(sin(tcount) * 255); int j0 = (i + LED_COUNT - N12) % LED_COUNT; int j1 = (j0 + N3) % LED_COUNT; int j2 = (j1 + N3) % LED_COUNT; leds[j0] = CHSV(thishue, thissat, ibright); leds[j1] = CHSV(thishue, thissat, ibright); leds[j2] = CHSV(thishue, thissat, ibright); } LEDS.show(); delay(thisdelay); } void color_loop_vardelay() { //-m17-COLOR LOOP (SINGLE LED) w/ VARIABLE DELAY idex++; if (idex > LED_COUNT) { idex = 0; } int di = abs(TOP_INDEX - idex); int t = constrain((10 / di) * 10, 10, 500); for (int i = 0; i < LED_COUNT; i++ ) { if (i == idex) { leds[i] = CHSV(0, thissat, 255); } else { leds[i].r = 0; leds[i].g = 0; leds[i].b = 0; } } LEDS.show(); delay(t); } void white_temps() { //-m18-SHOW A SAMPLE OF BLACK BODY RADIATION COLOR TEMPERATURES int N9 = int(LED_COUNT / 9); for (int i = 0; i < LED_COUNT; i++ ) { if (i >= 0 && i < N9) { leds[i].r = 255; //-CANDLE - 1900 leds[i].g = 147; leds[i].b = 41; } if (i >= N9 && i < N9 * 2) { leds[i].r = 255; //-40W TUNG - 2600 leds[i].g = 197; leds[i].b = 143; } if (i >= N9 * 2 && i < N9 * 3) { leds[i].r = 255; //-100W TUNG - 2850 leds[i].g = 214; leds[i].b = 170; } if (i >= N9 * 3 && i < N9 * 4) { leds[i].r = 255; //-HALOGEN - 3200 leds[i].g = 241; leds[i].b = 224; } if (i >= N9 * 4 && i < N9 * 5) { leds[i].r = 255; //-CARBON ARC - 5200 leds[i].g = 250; leds[i].b = 244; } if (i >= N9 * 5 && i < N9 * 6) { leds[i].r = 255; //-HIGH NOON SUN - 5400 leds[i].g = 255; leds[i].b = 251; } if (i >= N9 * 6 && i < N9 * 7) { leds[i].r = 255; //-DIRECT SUN - 6000 leds[i].g = 255; leds[i].b = 255; } if (i >= N9 * 7 && i < N9 * 8) { leds[i].r = 201; //-OVERCAST SKY - 7000 leds[i].g = 226; leds[i].b = 255; } if (i >= N9 * 8 && i < LED_COUNT) { leds[i].r = 64; //-CLEAR BLUE SKY - 20000 leds[i].g = 156; leds[i].b = 255; } } LEDS.show(); delay(100); } void sin_bright_wave() { //-m19-BRIGHTNESS SINE WAVE for (int i = 0; i < LED_COUNT; i++ ) { tcount = tcount + .1; if (tcount > 3.14) { tcount = 0.0; } ibright = int(sin(tcount) * 255); leds[i] = CHSV(thishue, thissat, ibright); LEDS.show(); delay(thisdelay); } } void pop_horizontal() { //-m20-POP FROM LEFT TO RIGHT UP THE RING int ix; if (bouncedirection == 0) { bouncedirection = 1; ix = idex; } else if (bouncedirection == 1) { bouncedirection = 0; ix = horizontal_index(idex); idex++; if (idex > TOP_INDEX) { idex = 0; } } for (int i = 0; i < LED_COUNT; i++ ) { if (i == ix) { leds[i] = CHSV(thishue, thissat, 255); } else { leds[i].r = 0; leds[i].g = 0; leds[i].b = 0; } } LEDS.show(); delay(thisdelay); } void quad_bright_curve() { //-m21-QUADRATIC BRIGHTNESS CURVER int ax; for (int x = 0; x < LED_COUNT; x++ ) { if (x <= TOP_INDEX) { ax = x; } else if (x > TOP_INDEX) { ax = LED_COUNT - x; } int a = 1; int b = 1; int c = 0; int iquad = -(ax * ax * a) + (ax * b) + c; //-ax2+bx+c int hquad = -(TOP_INDEX * TOP_INDEX * a) + (TOP_INDEX * b) + c; ibright = int((float(iquad) / float(hquad)) * 255); leds[x] = CHSV(thishue, thissat, ibright); } LEDS.show(); delay(thisdelay); } void flame() { //-m22-FLAMEISH EFFECT int idelay = random(0, 35); float hmin = 0.1; float hmax = 45.0; float hdif = hmax - hmin; int randtemp = random(0, 3); float hinc = (hdif / float(TOP_INDEX)) + randtemp; int ihue = hmin; for (int i = 0; i <= TOP_INDEX; i++ ) { ihue = ihue + hinc; leds[i] = CHSV(ihue, thissat, 255); int ih = horizontal_index(i); leds[ih] = CHSV(ihue, thissat, 255); leds[TOP_INDEX].r = 255; leds[TOP_INDEX].g = 255; leds[TOP_INDEX].b = 255; LEDS.show(); delay(idelay); } } void rainbow_vertical() { //-m23-RAINBOW 'UP' THE LOOP idex++; if (idex > TOP_INDEX) { idex = 0; } ihue = ihue + thisstep; if (ihue > 255) { ihue = 0; } int idexA = idex; int idexB = horizontal_index(idexA); leds[idexA] = CHSV(ihue, thissat, 255); leds[idexB] = CHSV(ihue, thissat, 255); LEDS.show(); delay(thisdelay); } void pacman() { //-m24-REALLY TERRIBLE PACMAN CHOMPING EFFECT int s = int(LED_COUNT / 4); lcount++; if (lcount > 5) { lcount = 0; } if (lcount == 0) { for (int i = 0 ; i < LED_COUNT; i++ ) { set_color_led(i, 255, 255, 0); } } if (lcount == 1 || lcount == 5) { for (int i = 0 ; i < LED_COUNT; i++ ) { set_color_led(i, 255, 255, 0); } leds[s].r = 0; leds[s].g = 0; leds[s].b = 0; } if (lcount == 2 || lcount == 4) { for (int i = 0 ; i < LED_COUNT; i++ ) { set_color_led(i, 255, 255, 0); } leds[s - 1].r = 0; leds[s - 1].g = 0; leds[s - 1].b = 0; leds[s].r = 0; leds[s].g = 0; leds[s].b = 0; leds[s + 1].r = 0; leds[s + 1].g = 0; leds[s + 1].b = 0; } if (lcount == 3) { for (int i = 0 ; i < LED_COUNT; i++ ) { set_color_led(i, 255, 255, 0); } leds[s - 2].r = 0; leds[s - 2].g = 0; leds[s - 2].b = 0; leds[s - 1].r = 0; leds[s - 1].g = 0; leds[s - 1].b = 0; leds[s].r = 0; leds[s].g = 0; leds[s].b = 0; leds[s + 1].r = 0; leds[s + 1].g = 0; leds[s + 1].b = 0; leds[s + 2].r = 0; leds[s + 2].g = 0; leds[s + 2].b = 0; } LEDS.show(); delay(thisdelay); } void random_color_pop() { //-m25-RANDOM COLOR POP idex = random(0, LED_COUNT); ihue = random(0, 255); one_color_all(0, 0, 0); leds[idex] = CHSV(ihue, thissat, 255); LEDS.show(); delay(thisdelay); } void ems_lightsSTROBE() { //-m26-EMERGENCY LIGHTS (STROBE LEFT/RIGHT) int thishue = 0; int thathue = (thishue + 160) % 255; for (int x = 0 ; x < 5; x++ ) { for (int i = 0 ; i < TOP_INDEX; i++ ) { leds[i] = CHSV(thishue, thissat, 255); } LEDS.show(); delay(thisdelay); one_color_all(0, 0, 0); LEDS.show(); delay(thisdelay); } for (int x = 0 ; x < 5; x++ ) { for (int i = TOP_INDEX ; i < LED_COUNT; i++ ) { leds[i] = CHSV(thathue, thissat, 255); } LEDS.show(); delay(thisdelay); one_color_all(0, 0, 0); LEDS.show(); delay(thisdelay); } } void rgb_propeller() { //-m27-RGB PROPELLER idex++; int ghue = (thishue + 80) % 255; int bhue = (thishue + 160) % 255; int N3 = int(LED_COUNT / 3); int N6 = int(LED_COUNT / 6); int N12 = int(LED_COUNT / 12); for (int i = 0; i < N3; i++ ) { int j0 = (idex + i + LED_COUNT - N12) % LED_COUNT; int j1 = (j0 + N3) % LED_COUNT; int j2 = (j1 + N3) % LED_COUNT; leds[j0] = CHSV(thishue, thissat, 255); leds[j1] = CHSV(ghue, thissat, 255); leds[j2] = CHSV(bhue, thissat, 255); } LEDS.show(); delay(thisdelay); } void kitt() { //-m28-KNIGHT INDUSTIES 2000 int rand = random(0, TOP_INDEX); for (int i = 0; i < rand; i++ ) { leds[TOP_INDEX + i] = CHSV(thishue, thissat, 255); leds[TOP_INDEX - i] = CHSV(thishue, thissat, 255); LEDS.show(); delay(thisdelay / rand); } for (int i = rand; i > 0; i-- ) { leds[TOP_INDEX + i] = CHSV(thishue, thissat, 0); leds[TOP_INDEX - i] = CHSV(thishue, thissat, 0); LEDS.show(); delay(thisdelay / rand); } } void matrix() { //-m29-ONE LINE MATRIX int rand = random(0, 100); if (rand > 90) { leds[0] = CHSV(thishue, thissat, 255); } else { leds[0] = CHSV(thishue, thissat, 0); } copy_led_array(); for (int i = 1; i < LED_COUNT; i++ ) { leds[i].r = ledsX[i - 1][0]; leds[i].g = ledsX[i - 1][1]; leds[i].b = ledsX[i - 1][2]; } LEDS.show(); delay(thisdelay); } void strip_march_cw() { //-m50-MARCH STRIP CW copy_led_array(); int iCW; for (int i = 0; i < LED_COUNT; i++ ) { iCW = adjacent_cw(i); leds[i].r = ledsX[iCW][0]; leds[i].g = ledsX[iCW][1]; leds[i].b = ledsX[iCW][2]; } LEDS.show(); delay(thisdelay); } void strip_march_ccw() { //-m51-MARCH STRIP CCW copy_led_array(); int iCCW; for (int i = 0; i < LED_COUNT; i++ ) { iCCW = adjacent_ccw(i); leds[i].r = ledsX[iCCW][0]; leds[i].g = ledsX[iCCW][1]; leds[i].b = ledsX[iCCW][2]; } LEDS.show(); delay(thisdelay); } void new_rainbow_loop() { //-m88-RAINBOW FADE FROM FAST_SPI2 ihue -= 1; fill_rainbow( leds, LED_COUNT, ihue ); LEDS.show(); delay(thisdelay); } void demo_modeA() { int r = 10; thisdelay = 20; thisstep = 10; thishue = 0; thissat = 255; one_color_all(255, 255, 255); LEDS.show(); delay(1200); for (int i = 0; i < r * 25; i++) { rainbow_fade(); } for (int i = 0; i < r * 20; i++) { rainbow_loop(); } for (int i = 0; i < r * 20; i++) { random_burst(); } for (int i = 0; i < r * 12; i++) { color_bounce(); } thisdelay = 40; for (int i = 0; i < r * 12; i++) { color_bounceFADE(); } for (int i = 0; i < r * 6; i++) { ems_lightsONE(); } for (int i = 0; i < r * 5; i++) { ems_lightsALL(); } thishue = 160; thissat = 50; for (int i = 0; i < r * 40; i++) { flicker(); } one_color_all(0, 0, 0); LEDS.show(); thisdelay = 15; thishue = 0; thissat = 255; for (int i = 0; i < r * 50; i++) { pulse_one_color_all(); } for (int i = 0; i < r * 40; i++) { pulse_one_color_all_rev(); } thisdelay = 60; thishue = 180; for (int i = 0; i < r * 5; i++) { fade_vertical(); } random_red(); thisdelay = 100; for (int i = 0; i < r * 5; i++) { rule30(); } thisdelay = 40; for (int i = 0; i < r * 8; i++) { random_march(); } thisdelay = 80; for (int i = 0; i < r * 5; i++) { rwb_march(); } one_color_all(0, 0, 0); ; LEDS.show(); thisdelay = 60; thishue = 95; for (int i = 0; i < r * 15; i++) { radiation(); } for (int i = 0; i < r * 15; i++) { color_loop_vardelay(); } for (int i = 0; i < r * 5; i++) { white_temps(); } thisdelay = 35; thishue = 180; for (int i = 0; i < r; i++) { sin_bright_wave(); } thisdelay = 100; thishue = 0; for (int i = 0; i < r * 5; i++) { pop_horizontal(); } thisdelay = 100; thishue = 180; for (int i = 0; i < r * 4; i++) { quad_bright_curve(); } one_color_all(0, 0, 0); LEDS.show(); for (int i = 0; i < r * 3; i++) { flame(); } thisdelay = 50; for (int i = 0; i < r * 10; i++) { pacman(); } thisdelay = 50; thisstep = 15; for (int i = 0; i < r * 12; i++) { rainbow_vertical(); } thisdelay = 100; for (int i = 0; i < r * 3; i++) { strip_march_ccw(); } for (int i = 0; i < r * 3; i++) { strip_march_cw(); } demo_modeB(); thisdelay = 5; for (int i = 0; i < r * 120; i++) { new_rainbow_loop(); } one_color_all(255, 0, 0); LEDS.show(); delay(1200); one_color_all(0, 255, 0); LEDS.show(); delay(1200); one_color_all(0, 0, 255); LEDS.show(); delay(1200); one_color_all(255, 255, 0); LEDS.show(); delay(1200); one_color_all(0, 255, 255); LEDS.show(); delay(1200); one_color_all(255, 0, 255); LEDS.show(); delay(1200); } void demo_modeB() { int r = 10; one_color_all(0, 0, 0); LEDS.show(); thisdelay = 35; for (int i = 0; i < r * 10; i++) { random_color_pop(); } for (int i = 0; i < r / 2; i++) { ems_lightsSTROBE(); } thisdelay = 50; for (int i = 0; i < r * 10; i++) { rgb_propeller(); } one_color_all(0, 0, 0); LEDS.show(); thisdelay = 100; thishue = 0; for (int i = 0; i < r * 3; i++) { kitt(); } one_color_all(0, 0, 0); LEDS.show(); thisdelay = 30; thishue = 95; for (int i = 0; i < r * 25; i++) { matrix(); } one_color_all(0, 0, 0); LEDS.show(); } //-----------------------------плавное заполнение цветом----------------------------------------- void colorWipe(byte red, byte green, byte blue, int SpeedDelay) { for (uint16_t i = 0; i < LED_COUNT; i++) { setPixel(i, red, green, blue); FastLED.show(); delay(SpeedDelay); } } //-----------------------------------бегающие светодиоды----------------------------------- void CylonBounce(byte red, byte green, byte blue, int EyeSize, int SpeedDelay, int ReturnDelay) { for (int i = 0; i < LED_COUNT - EyeSize - 2; i++) { setAll(0, 0, 0); setPixel(i, red / 10, green / 10, blue / 10); for (int j = 1; j <= EyeSize; j++) { setPixel(i + j, red, green, blue); } setPixel(i + EyeSize + 1, red / 10, green / 10, blue / 10); FastLED.show(); delay(SpeedDelay); } delay(ReturnDelay); for (int i = LED_COUNT - EyeSize - 2; i > 0; i--) { setAll(0, 0, 0); setPixel(i, red / 10, green / 10, blue / 10); for (int j = 1; j <= EyeSize; j++) { setPixel(i + j, red, green, blue); } setPixel(i + EyeSize + 1, red / 10, green / 10, blue / 10); FastLED.show(); delay(SpeedDelay); } delay(ReturnDelay); } //---------------------------------линейный огонь------------------------------------- void Fire(int Cooling, int Sparking, int SpeedDelay) { static byte heat[LED_COUNT]; int cooldown; // Step 1. Cool down every cell a little for ( int i = 0; i < LED_COUNT; i++) { cooldown = random(0, ((Cooling * 10) / LED_COUNT) + 2); if (cooldown > heat[i]) { heat[i] = 0; } else { heat[i] = heat[i] - cooldown; } } // Step 2. Heat from each cell drifts 'up' and diffuses a little for ( int k = LED_COUNT - 1; k >= 2; k--) { heat[k] = (heat[k - 1] + heat[k - 2] + heat[k - 2]) / 3; } // Step 3. Randomly ignite new 'sparks' near the bottom if ( random(255) < Sparking ) { int y = random(7); heat[y] = heat[y] + random(160, 255); //heat[y] = random(160,255); } // Step 4. Convert heat to LED colors for ( int j = 0; j < LED_COUNT; j++) { setPixelHeatColor(j, heat[j] ); } FastLED.show(); delay(SpeedDelay); } void setPixelHeatColor (int Pixel, byte temperature) { // Scale 'heat' down from 0-255 to 0-191 byte t192 = round((temperature / 255.0) * 191); // calculate ramp up from byte heatramp = t192 & 0x3F; // 0..63 heatramp <<= 2; // scale up to 0..252 // figure out which third of the spectrum we're in: if ( t192 > 0x80) { // hottest setPixel(Pixel, 255, 255, heatramp); } else if ( t192 > 0x40 ) { // middle setPixel(Pixel, 255, heatramp, 0); } else { // coolest setPixel(Pixel, heatramp, 0, 0); } } //-------------------------------newKITT--------------------------------------- void NewKITT(byte red, byte green, byte blue, int EyeSize, int SpeedDelay, int ReturnDelay) { RightToLeft(red, green, blue, EyeSize, SpeedDelay, ReturnDelay); LeftToRight(red, green, blue, EyeSize, SpeedDelay, ReturnDelay); OutsideToCenter(red, green, blue, EyeSize, SpeedDelay, ReturnDelay); CenterToOutside(red, green, blue, EyeSize, SpeedDelay, ReturnDelay); LeftToRight(red, green, blue, EyeSize, SpeedDelay, ReturnDelay); RightToLeft(red, green, blue, EyeSize, SpeedDelay, ReturnDelay); OutsideToCenter(red, green, blue, EyeSize, SpeedDelay, ReturnDelay); CenterToOutside(red, green, blue, EyeSize, SpeedDelay, ReturnDelay); } void CenterToOutside(byte red, byte green, byte blue, int EyeSize, int SpeedDelay, int ReturnDelay) { for (int i = ((LED_COUNT - EyeSize) / 2); i >= 0; i--) { setAll(0, 0, 0); setPixel(i, red / 10, green / 10, blue / 10); for (int j = 1; j <= EyeSize; j++) { setPixel(i + j, red, green, blue); } setPixel(i + EyeSize + 1, red / 10, green / 10, blue / 10); setPixel(LED_COUNT - i, red / 10, green / 10, blue / 10); for (int j = 1; j <= EyeSize; j++) { setPixel(LED_COUNT - i - j, red, green, blue); } setPixel(LED_COUNT - i - EyeSize - 1, red / 10, green / 10, blue / 10); FastLED.show(); delay(SpeedDelay); } delay(ReturnDelay); } void OutsideToCenter(byte red, byte green, byte blue, int EyeSize, int SpeedDelay, int ReturnDelay) { for (int i = 0; i <= ((LED_COUNT - EyeSize) / 2); i++) { setAll(0, 0, 0); setPixel(i, red / 10, green / 10, blue / 10); for (int j = 1; j <= EyeSize; j++) { setPixel(i + j, red, green, blue); } setPixel(i + EyeSize + 1, red / 10, green / 10, blue / 10); setPixel(LED_COUNT - i, red / 10, green / 10, blue / 10); for (int j = 1; j <= EyeSize; j++) { setPixel(LED_COUNT - i - j, red, green, blue); } setPixel(LED_COUNT - i - EyeSize - 1, red / 10, green / 10, blue / 10); FastLED.show(); delay(SpeedDelay); } delay(ReturnDelay); } void LeftToRight(byte red, byte green, byte blue, int EyeSize, int SpeedDelay, int ReturnDelay) { for (int i = 0; i < LED_COUNT - EyeSize - 2; i++) { setAll(0, 0, 0); setPixel(i, red / 10, green / 10, blue / 10); for (int j = 1; j <= EyeSize; j++) { setPixel(i + j, red, green, blue); } setPixel(i + EyeSize + 1, red / 10, green / 10, blue / 10); FastLED.show(); delay(SpeedDelay); } delay(ReturnDelay); } void RightToLeft(byte red, byte green, byte blue, int EyeSize, int SpeedDelay, int ReturnDelay) { for (int i = LED_COUNT - EyeSize - 2; i > 0; i--) { setAll(0, 0, 0); setPixel(i, red / 10, green / 10, blue / 10); for (int j = 1; j <= EyeSize; j++) { setPixel(i + j, red, green, blue); } setPixel(i + EyeSize + 1, red / 10, green / 10, blue / 10); FastLED.show(); delay(SpeedDelay); } delay(ReturnDelay); } //-------------------------------newKITT--------------------------------------- void rainbowCycle(int SpeedDelay) { byte *c; uint16_t i, j; for (j = 0; j < 256 * 5; j++) { // 5 cycles of all colors on wheel for (i = 0; i < LED_COUNT; i++) { c = Wheel(((i * 256 / LED_COUNT) + j) & 255); setPixel(i, *c, *(c + 1), *(c + 2)); } FastLED.show(); delay(SpeedDelay); } } byte * Wheel(byte WheelPos) { static byte c[3]; if (WheelPos < 85) { c[0] = WheelPos * 3; c[1] = 255 - WheelPos * 3; c[2] = 0; } else if (WheelPos < 170) { WheelPos -= 85; c[0] = 255 - WheelPos * 3; c[1] = 0; c[2] = WheelPos * 3; } else { WheelPos -= 170; c[0] = 0; c[1] = WheelPos * 3; c[2] = 255 - WheelPos * 3; } return c; } //-------------------------------TwinkleRandom--------------------------------------- void TwinkleRandom(int Count, int SpeedDelay, boolean OnlyOne) { setAll(0, 0, 0); for (int i = 0; i < Count; i++) { setPixel(random(LED_COUNT), random(0, 255), random(0, 255), random(0, 255)); FastLED.show(); delay(SpeedDelay); if (OnlyOne) { setAll(0, 0, 0); } } delay(SpeedDelay); } //-------------------------------RunningLights--------------------------------------- void RunningLights(byte red, byte green, byte blue, int WaveDelay) { int Position = 0; for (int i = 0; i < LED_COUNT * 2; i++) { Position++; // = 0; //Position + Rate; for (int i = 0; i < LED_COUNT; i++) { // sine wave, 3 offset waves make a rainbow! //float level = sin(i+Position) * 127 + 128; //setPixel(i,level,0,0); //float level = sin(i+Position) * 127 + 128; setPixel(i, ((sin(i + Position) * 127 + 128) / 255)*red, ((sin(i + Position) * 127 + 128) / 255)*green, ((sin(i + Position) * 127 + 128) / 255)*blue); } FastLED.show(); delay(WaveDelay); } } //-------------------------------Sparkle--------------------------------------- void Sparkle(byte red, byte green, byte blue, int SpeedDelay) { int Pixel = random(LED_COUNT); setPixel(Pixel, red, green, blue); FastLED.show(); delay(SpeedDelay); setPixel(Pixel, 0, 0, 0); } //-------------------------------SnowSparkle--------------------------------------- void SnowSparkle(byte red, byte green, byte blue, int SparkleDelay, int SpeedDelay) { setAll(red, green, blue); int Pixel = random(LED_COUNT); setPixel(Pixel, 0xff, 0xff, 0xff); FastLED.show(); delay(SparkleDelay); setPixel(Pixel, red, green, blue); FastLED.show(); delay(SpeedDelay); } //-------------------------------theaterChase--------------------------------------- void theaterChase(byte red, byte green, byte blue, int SpeedDelay) { for (int j = 0; j < 10; j++) { //do 10 cycles of chasing for (int q = 0; q < 3; q++) { for (int i = 0; i < LED_COUNT; i = i + 3) { setPixel(i + q, red, green, blue); //turn every third pixel on } FastLED.show(); delay(SpeedDelay); for (int i = 0; i < LED_COUNT; i = i + 3) { setPixel(i + q, 0, 0, 0); //turn every third pixel off } } } } //-------------------------------theaterChaseRainbow--------------------------------------- void theaterChaseRainbow(int SpeedDelay) { byte *c; for (int j = 0; j < 256; j++) { // cycle all 256 colors in the wheel for (int q = 0; q < 3; q++) { for (int i = 0; i < LED_COUNT; i = i + 3) { c = Wheel( (i + j) % 255); setPixel(i + q, *c, *(c + 1), *(c + 2)); //turn every third pixel on } FastLED.show(); delay(SpeedDelay); for (int i = 0; i < LED_COUNT; i = i + 3) { setPixel(i + q, 0, 0, 0); //turn every third pixel off } } } } //-------------------------------Strobe--------------------------------------- void Strobe(byte red, byte green, byte blue, int StrobeCount, int FlashDelay, int EndPause) { for (int j = 0; j < StrobeCount; j++) { setAll(red, green, blue); FastLED.show(); delay(FlashDelay); setAll(0, 0, 0); FastLED.show(); delay(FlashDelay); } delay(EndPause); } //-------------------------------BouncingBalls--------------------------------------- void BouncingBalls(byte red, byte green, byte blue, int BallCount) { float Gravity = -9.81; int StartHeight = 1; float Height[BallCount]; float ImpactVelocityStart = sqrt( -2 * Gravity * StartHeight ); float ImpactVelocity[BallCount]; float TimeSinceLastBounce[BallCount]; int Position[BallCount]; long ClockTimeSinceLastBounce[BallCount]; float Dampening[BallCount]; for (int i = 0 ; i < BallCount ; i++) { ClockTimeSinceLastBounce[i] = millis(); Height[i] = StartHeight; Position[i] = 0; ImpactVelocity[i] = ImpactVelocityStart; TimeSinceLastBounce[i] = 0; Dampening[i] = 0.90 - float(i) / pow(BallCount, 2); } while (true) { for (int i = 0 ; i < BallCount ; i++) { TimeSinceLastBounce[i] = millis() - ClockTimeSinceLastBounce[i]; Height[i] = 0.5 * Gravity * pow( TimeSinceLastBounce[i] / 1000 , 2.0 ) + ImpactVelocity[i] * TimeSinceLastBounce[i] / 1000; if ( Height[i] < 0 ) { Height[i] = 0; ImpactVelocity[i] = Dampening[i] * ImpactVelocity[i]; ClockTimeSinceLastBounce[i] = millis(); if ( ImpactVelocity[i] < 0.01 ) { ImpactVelocity[i] = ImpactVelocityStart; } } Position[i] = round( Height[i] * (LED_COUNT - 1) / StartHeight); } for (int i = 0 ; i < BallCount ; i++) { setPixel(Position[i], red, green, blue); } FastLED.show(); setAll(0, 0, 0); } } //-------------------------------BouncingColoredBalls--------------------------------------- void BouncingColoredBalls(int BallCount, byte colors[][3]) { float Gravity = -9.81; int StartHeight = 1; float Height[BallCount]; float ImpactVelocityStart = sqrt( -2 * Gravity * StartHeight ); float ImpactVelocity[BallCount]; float TimeSinceLastBounce[BallCount]; int Position[BallCount]; long ClockTimeSinceLastBounce[BallCount]; float Dampening[BallCount]; for (int i = 0 ; i < BallCount ; i++) { ClockTimeSinceLastBounce[i] = millis(); Height[i] = StartHeight; Position[i] = 0; ImpactVelocity[i] = ImpactVelocityStart; TimeSinceLastBounce[i] = 0; Dampening[i] = 0.90 - float(i) / pow(BallCount, 2); } while (true) { for (int i = 0 ; i < BallCount ; i++) { TimeSinceLastBounce[i] = millis() - ClockTimeSinceLastBounce[i]; Height[i] = 0.5 * Gravity * pow( TimeSinceLastBounce[i] / 1000 , 2.0 ) + ImpactVelocity[i] * TimeSinceLastBounce[i] / 1000; if ( Height[i] < 0 ) { Height[i] = 0; ImpactVelocity[i] = Dampening[i] * ImpactVelocity[i]; ClockTimeSinceLastBounce[i] = millis(); if ( ImpactVelocity[i] < 0.01 ) { ImpactVelocity[i] = ImpactVelocityStart; } } Position[i] = round( Height[i] * (LED_COUNT - 1) / StartHeight); } for (int i = 0 ; i < BallCount ; i++) { setPixel(Position[i], colors[i][0], colors[i][1], colors[i][2]); } FastLED.show(); setAll(0, 0, 0); } } ",12333,False,1888.500153210967,median "cmd_/home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/udp.o := gcc -Wp,-MD,/home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/.udp.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/5/include -I/home/tank/ICC_CODE/openvswitch-2.7.0/include -I/home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat -I/home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include -I./arch/x86/include -Iarch/x86/include/generated/uapi -Iarch/x86/include/generated -Iinclude -I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -Iubuntu/include -D__KERNEL__ -fno-pie -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -fno-pie -no-pie -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -Wno-maybe-uninitialized -O2 --param=allow-store-data-races=0 -DCC_HAVE_ASM_GOTO -Wframe-larger-than=1024 -fstack-protector-strong -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -pg -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -DVERSION=\\""2.7.0\\"" -I/home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/.. -I/home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/.. -g -include /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/kcompat.h -DMODULE -D""KBUILD_STR(s)=\\#s"" -D""KBUILD_BASENAME=KBUILD_STR(udp)"" -D""KBUILD_MODNAME=KBUILD_STR(openvswitch)"" -c -o /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/.tmp_udp.o /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/udp.c source_/home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/udp.o := /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/udp.c deps_/home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/udp.o := \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/kcompat.h \\ include/generated/uapi/linux/version.h \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/net/udp.h \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/net/ip.h \\ include/net/ip.h \\ $(wildcard include/config/sysctl.h) \\ $(wildcard include/config/inet.h) \\ $(wildcard include/config/ipv6.h) \\ $(wildcard include/config/proc/fs.h) \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/linux/types.h \\ include/linux/types.h \\ $(wildcard include/config/have/uid16.h) \\ $(wildcard include/config/uid16.h) \\ $(wildcard include/config/lbdaf.h) \\ $(wildcard include/config/arch/dma/addr/t/64bit.h) \\ $(wildcard include/config/phys/addr/t/64bit.h) \\ $(wildcard include/config/64bit.h) \\ include/uapi/linux/types.h \\ arch/x86/include/uapi/asm/types.h \\ include/uapi/asm-generic/types.h \\ include/asm-generic/int-ll64.h \\ include/uapi/asm-generic/int-ll64.h \\ arch/x86/include/uapi/asm/bitsperlong.h \\ include/asm-generic/bitsperlong.h \\ include/uapi/asm-generic/bitsperlong.h \\ include/uapi/linux/posix_types.h \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/linux/stddef.h \\ include/linux/stddef.h \\ include/uapi/linux/stddef.h \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/linux/compiler.h \\ include/linux/compiler.h \\ $(wildcard include/config/sparse/rcu/pointer.h) \\ $(wildcard include/config/trace/branch/profiling.h) \\ $(wildcard include/config/profile/all/branches.h) \\ $(wildcard include/config/kasan.h) \\ $(wildcard include/config/enable/must/check.h) \\ $(wildcard include/config/enable/warn/deprecated.h) \\ $(wildcard include/config/kprobes.h) \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/linux/compiler-gcc.h \\ include/linux/compiler-gcc.h \\ $(wildcard include/config/arch/supports/optimized/inlining.h) \\ $(wildcard include/config/optimize/inlining.h) \\ $(wildcard include/config/gcov/kernel.h) \\ $(wildcard include/config/arch/use/builtin/bswap.h) \\ arch/x86/include/asm/posix_types.h \\ $(wildcard include/config/x86/32.h) \\ arch/x86/include/uapi/asm/posix_types_64.h \\ include/uapi/asm-generic/posix_types.h \\ include/linux/ip.h \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/linux/skbuff.h \\ include/linux/skbuff.h \\ $(wildcard include/config/nf/conntrack.h) \\ $(wildcard include/config/bridge/netfilter.h) \\ $(wildcard include/config/xfrm.h) \\ $(wildcard include/config/ipv6/ndisc/nodetype.h) \\ $(wildcard include/config/net/sched.h) \\ $(wildcard include/config/net/cls/act.h) \\ $(wildcard include/config/net/rx/busy/poll.h) \\ $(wildcard include/config/xps.h) \\ $(wildcard include/config/network/secmark.h) \\ $(wildcard include/config/net/switchdev.h) \\ $(wildcard include/config/network/phy/timestamping.h) \\ $(wildcard include/config/netfilter/xt/target/trace.h) \\ $(wildcard include/config/nf/tables.h) \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/linux/kernel.h \\ include/linux/kernel.h \\ $(wildcard include/config/preempt/voluntary.h) \\ $(wildcard include/config/debug/atomic/sleep.h) \\ $(wildcard include/config/mmu.h) \\ $(wildcard include/config/prove/locking.h) \\ $(wildcard include/config/panic/timeout.h) \\ $(wildcard include/config/tracing.h) \\ $(wildcard include/config/ftrace/mcount/record.h) \\ /usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h \\ include/linux/linkage.h \\ include/linux/stringify.h \\ include/linux/export.h \\ $(wildcard include/config/have/underscore/symbol/prefix.h) \\ $(wildcard include/config/modules.h) \\ $(wildcard include/config/modversions.h) \\ $(wildcard include/config/unused/symbols.h) \\ arch/x86/include/asm/linkage.h \\ $(wildcard include/config/x86/64.h) \\ $(wildcard include/config/x86/alignment/16.h) \\ include/linux/bitops.h \\ arch/x86/include/asm/bitops.h \\ $(wildcard include/config/x86/cmov.h) \\ arch/x86/include/asm/alternative.h \\ $(wildcard include/config/smp.h) \\ $(wildcard include/config/paravirt.h) \\ arch/x86/include/asm/asm.h \\ arch/x86/include/asm/ptrace.h \\ $(wildcard include/config/x86/debugctlmsr.h) \\ arch/x86/include/asm/segment.h \\ $(wildcard include/config/cc/stackprotector.h) \\ $(wildcard include/config/x86/32/lazy/gs.h) \\ include/uapi/linux/const.h \\ arch/x86/include/asm/cache.h \\ $(wildcard include/config/x86/l1/cache/shift.h) \\ $(wildcard include/config/x86/internode/cache/shift.h) \\ $(wildcard include/config/x86/vsmp.h) \\ arch/x86/include/asm/page_types.h \\ $(wildcard include/config/physical/start.h) \\ $(wildcard include/config/physical/align.h) \\ arch/x86/include/asm/page_64_types.h \\ $(wildcard include/config/randomize/base.h) \\ $(wildcard include/config/randomize/base/max/offset.h) \\ arch/x86/include/uapi/asm/ptrace.h \\ arch/x86/include/uapi/asm/ptrace-abi.h \\ arch/x86/include/asm/processor-flags.h \\ $(wildcard include/config/vm86.h) \\ arch/x86/include/uapi/asm/processor-flags.h \\ arch/x86/include/asm/paravirt_types.h \\ $(wildcard include/config/x86/local/apic.h) \\ $(wildcard include/config/pgtable/levels.h) \\ $(wildcard include/config/x86/pae.h) \\ $(wildcard include/config/queued/spinlocks.h) \\ $(wildcard include/config/paravirt/debug.h) \\ arch/x86/include/asm/desc_defs.h \\ arch/x86/include/asm/kmap_types.h \\ $(wildcard include/config/debug/highmem.h) \\ include/asm-generic/kmap_types.h \\ arch/x86/include/asm/pgtable_types.h \\ $(wildcard include/config/kmemcheck.h) \\ $(wildcard include/config/mem/soft/dirty.h) \\ arch/x86/include/asm/pgtable_64_types.h \\ arch/x86/include/asm/sparsemem.h \\ $(wildcard include/config/sparsemem.h) \\ arch/x86/include/asm/spinlock_types.h \\ $(wildcard include/config/paravirt/spinlocks.h) \\ $(wildcard include/config/nr/cpus.h) \\ include/asm-generic/qspinlock_types.h \\ include/asm-generic/qrwlock_types.h \\ include/asm-generic/ptrace.h \\ arch/x86/include/asm/rmwcc.h \\ arch/x86/include/asm/barrier.h \\ $(wildcard include/config/x86/ppro/fence.h) \\ arch/x86/include/asm/nops.h \\ $(wildcard include/config/mk7.h) \\ $(wildcard include/config/x86/p6/nop.h) \\ include/asm-generic/barrier.h \\ include/asm-generic/bitops/find.h \\ $(wildcard include/config/generic/find/first/bit.h) \\ include/asm-generic/bitops/sched.h \\ arch/x86/include/asm/arch_hweight.h \\ arch/x86/include/asm/cpufeatures.h \\ arch/x86/include/asm/required-features.h \\ $(wildcard include/config/x86/minimum/cpu/family.h) \\ $(wildcard include/config/math/emulation.h) \\ $(wildcard include/config/x86/cmpxchg64.h) \\ $(wildcard include/config/x86/use/3dnow.h) \\ $(wildcard include/config/matom.h) \\ arch/x86/include/asm/disabled-features.h \\ $(wildcard include/config/x86/intel/mpx.h) \\ include/asm-generic/bitops/const_hweight.h \\ include/asm-generic/bitops/le.h \\ arch/x86/include/uapi/asm/byteorder.h \\ include/linux/byteorder/little_endian.h \\ include/uapi/linux/byteorder/little_endian.h \\ include/linux/swab.h \\ include/uapi/linux/swab.h \\ arch/x86/include/uapi/asm/swab.h \\ include/linux/byteorder/generic.h \\ include/asm-generic/bitops/ext2-atomic-setbit.h \\ include/linux/log2.h \\ $(wildcard include/config/arch/has/ilog2/u32.h) \\ $(wildcard include/config/arch/has/ilog2/u64.h) \\ include/linux/typecheck.h \\ include/linux/printk.h \\ $(wildcard include/config/message/loglevel/default.h) \\ $(wildcard include/config/early/printk.h) \\ $(wildcard include/config/printk.h) \\ $(wildcard include/config/dynamic/debug.h) \\ include/linux/init.h \\ $(wildcard include/config/broken/rodata.h) \\ $(wildcard include/config/lto.h) \\ include/linux/kern_levels.h \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/linux/cache.h \\ include/linux/cache.h \\ $(wildcard include/config/arch/has/cache/line/size.h) \\ include/uapi/linux/kernel.h \\ include/uapi/linux/sysinfo.h \\ include/linux/dynamic_debug.h \\ include/linux/kmemcheck.h \\ include/linux/mm_types.h \\ $(wildcard include/config/split/ptlock/cpus.h) \\ $(wildcard include/config/arch/enable/split/pmd/ptlock.h) \\ $(wildcard include/config/have/cmpxchg/double.h) \\ $(wildcard include/config/have/aligned/struct/page.h) \\ $(wildcard include/config/transparent/hugepage.h) \\ $(wildcard include/config/memcg.h) \\ $(wildcard include/config/userfaultfd.h) \\ $(wildcard include/config/numa.h) \\ $(wildcard include/config/aio.h) \\ $(wildcard include/config/mmu/notifier.h) \\ $(wildcard include/config/cpumask/offstack.h) \\ $(wildcard include/config/numa/balancing.h) \\ $(wildcard include/config/compaction.h) \\ $(wildcard include/config/arch/want/batched/unmap/tlb/flush.h) \\ $(wildcard include/config/hugetlb/page.h) \\ include/linux/auxvec.h \\ include/uapi/linux/auxvec.h \\ arch/x86/include/uapi/asm/auxvec.h \\ $(wildcard include/config/ia32/emulation.h) \\ include/linux/threads.h \\ $(wildcard include/config/base/small.h) \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/linux/list.h \\ include/linux/list.h \\ $(wildcard include/config/debug/list.h) \\ include/linux/poison.h \\ $(wildcard include/config/illegal/pointer/value.h) \\ include/linux/spinlock.h \\ $(wildcard include/config/debug/spinlock.h) \\ $(wildcard include/config/generic/lockbreak.h) \\ $(wildcard include/config/preempt.h) \\ $(wildcard include/config/debug/lock/alloc.h) \\ include/linux/preempt.h \\ $(wildcard include/config/preempt/count.h) \\ $(wildcard include/config/debug/preempt.h) \\ $(wildcard include/config/preempt/tracer.h) \\ $(wildcard include/config/preempt/notifiers.h) \\ arch/x86/include/asm/preempt.h \\ arch/x86/include/asm/percpu.h \\ $(wildcard include/config/x86/64/smp.h) \\ include/asm-generic/percpu.h \\ $(wildcard include/config/have/setup/per/cpu/area.h) \\ include/linux/percpu-defs.h \\ $(wildcard include/config/debug/force/weak/per/cpu.h) \\ include/linux/thread_info.h \\ $(wildcard include/config/compat.h) \\ $(wildcard include/config/debug/stack/usage.h) \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/linux/bug.h \\ include/linux/bug.h \\ $(wildcard include/config/generic/bug.h) \\ arch/x86/include/asm/bug.h \\ $(wildcard include/config/debug/bugverbose.h) \\ include/asm-generic/bug.h \\ $(wildcard include/config/bug.h) \\ $(wildcard include/config/generic/bug/relative/pointers.h) \\ arch/x86/include/asm/thread_info.h \\ arch/x86/include/asm/page.h \\ arch/x86/include/asm/page_64.h \\ $(wildcard include/config/debug/virtual.h) \\ $(wildcard include/config/flatmem.h) \\ $(wildcard include/config/x86/vsyscall/emulation.h) \\ include/linux/range.h \\ include/asm-generic/memory_model.h \\ $(wildcard include/config/discontigmem.h) \\ $(wildcard include/config/sparsemem/vmemmap.h) \\ include/asm-generic/getorder.h \\ arch/x86/include/asm/cpufeature.h \\ $(wildcard include/config/x86/feature/names.h) \\ $(wildcard include/config/x86/debug/static/cpu/has.h) \\ arch/x86/include/asm/processor.h \\ $(wildcard include/config/m486.h) \\ $(wildcard include/config/xen.h) \\ arch/x86/include/asm/math_emu.h \\ arch/x86/include/uapi/asm/sigcontext.h \\ arch/x86/include/asm/current.h \\ arch/x86/include/asm/msr.h \\ arch/x86/include/asm/msr-index.h \\ $(wildcard include/config/tdp/nominal.h) \\ $(wildcard include/config/tdp/level/1.h) \\ $(wildcard include/config/tdp/level/2.h) \\ $(wildcard include/config/tdp/control.h) \\ $(wildcard include/config/tdp/level1.h) \\ $(wildcard include/config/tdp/level2.h) \\ arch/x86/include/uapi/asm/errno.h \\ include/uapi/asm-generic/errno.h \\ include/uapi/asm-generic/errno-base.h \\ arch/x86/include/asm/cpumask.h \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/linux/cpumask.h \\ include/linux/cpumask.h \\ $(wildcard include/config/hotplug/cpu.h) \\ $(wildcard include/config/debug/per/cpu/maps.h) \\ include/linux/bitmap.h \\ include/linux/string.h \\ $(wildcard include/config/binary/printf.h) \\ include/uapi/linux/string.h \\ arch/x86/include/asm/string.h \\ arch/x86/include/asm/string_64.h \\ arch/x86/include/uapi/asm/msr.h \\ include/uapi/linux/ioctl.h \\ arch/x86/include/uapi/asm/ioctl.h \\ include/asm-generic/ioctl.h \\ include/uapi/asm-generic/ioctl.h \\ arch/x86/include/asm/paravirt.h \\ arch/x86/include/asm/special_insns.h \\ arch/x86/include/asm/fpu/types.h \\ include/linux/personality.h \\ include/uapi/linux/personality.h \\ include/linux/math64.h \\ $(wildcard include/config/arch/supports/int128.h) \\ arch/x86/include/asm/div64.h \\ include/asm-generic/div64.h \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/linux/err.h \\ include/linux/err.h \\ include/linux/irqflags.h \\ $(wildcard include/config/trace/irqflags.h) \\ $(wildcard include/config/irqsoff/tracer.h) \\ $(wildcard include/config/trace/irqflags/support.h) \\ arch/x86/include/asm/irqflags.h \\ include/linux/atomic.h \\ $(wildcard include/config/generic/atomic64.h) \\ arch/x86/include/asm/atomic.h \\ arch/x86/include/asm/cmpxchg.h \\ arch/x86/include/asm/cmpxchg_64.h \\ arch/x86/include/asm/atomic64_64.h \\ include/asm-generic/atomic-long.h \\ include/linux/bottom_half.h \\ include/linux/spinlock_types.h \\ include/linux/lockdep.h \\ $(wildcard include/config/lockdep.h) \\ $(wildcard include/config/lock/stat.h) \\ include/linux/rwlock_types.h \\ arch/x86/include/asm/spinlock.h \\ include/linux/jump_label.h \\ $(wildcard include/config/jump/label.h) \\ arch/x86/include/asm/jump_label.h \\ arch/x86/include/asm/qspinlock.h \\ include/asm-generic/qspinlock.h \\ arch/x86/include/asm/qrwlock.h \\ include/asm-generic/qrwlock.h \\ include/linux/rwlock.h \\ include/linux/spinlock_api_smp.h \\ $(wildcard include/config/inline/spin/lock.h) \\ $(wildcard include/config/inline/spin/lock/bh.h) \\ $(wildcard include/config/inline/spin/lock/irq.h) \\ $(wildcard include/config/inline/spin/lock/irqsave.h) \\ $(wildcard include/config/inline/spin/trylock.h) \\ $(wildcard include/config/inline/spin/trylock/bh.h) \\ $(wildcard include/config/uninline/spin/unlock.h) \\ $(wildcard include/config/inline/spin/unlock/bh.h) \\ $(wildcard include/config/inline/spin/unlock/irq.h) \\ $(wildcard include/config/inline/spin/unlock/irqrestore.h) \\ include/linux/rwlock_api_smp.h \\ $(wildcard include/config/inline/read/lock.h) \\ $(wildcard include/config/inline/write/lock.h) \\ $(wildcard include/config/inline/read/lock/bh.h) \\ $(wildcard include/config/inline/write/lock/bh.h) \\ $(wildcard include/config/inline/read/lock/irq.h) \\ $(wildcard include/config/inline/write/lock/irq.h) \\ $(wildcard include/config/inline/read/lock/irqsave.h) \\ $(wildcard include/config/inline/write/lock/irqsave.h) \\ $(wildcard include/config/inline/read/trylock.h) \\ $(wildcard include/config/inline/write/trylock.h) \\ $(wildcard include/config/inline/read/unlock.h) \\ $(wildcard include/config/inline/write/unlock.h) \\ $(wildcard include/config/inline/read/unlock/bh.h) \\ $(wildcard include/config/inline/write/unlock/bh.h) \\ $(wildcard include/config/inline/read/unlock/irq.h) \\ $(wildcard include/config/inline/write/unlock/irq.h) \\ $(wildcard include/config/inline/read/unlock/irqrestore.h) \\ $(wildcard include/config/inline/write/unlock/irqrestore.h) \\ include/linux/rbtree.h \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/linux/rcupdate.h \\ include/linux/rcupdate.h \\ $(wildcard include/config/tiny/rcu.h) \\ $(wildcard include/config/tree/rcu.h) \\ $(wildcard include/config/preempt/rcu.h) \\ $(wildcard include/config/rcu/trace.h) \\ $(wildcard include/config/rcu/stall/common.h) \\ $(wildcard include/config/no/hz/full.h) \\ $(wildcard include/config/rcu/nocb/cpu.h) \\ $(wildcard include/config/tasks/rcu.h) \\ $(wildcard include/config/debug/objects/rcu/head.h) \\ $(wildcard include/config/prove/rcu.h) \\ $(wildcard include/config/rcu/boost.h) \\ $(wildcard include/config/rcu/nocb/cpu/all.h) \\ $(wildcard include/config/no/hz/full/sysidle.h) \\ include/linux/seqlock.h \\ include/linux/completion.h \\ include/linux/wait.h \\ include/uapi/linux/wait.h \\ include/linux/debugobjects.h \\ $(wildcard include/config/debug/objects.h) \\ $(wildcard include/config/debug/objects/free.h) \\ include/linux/ktime.h \\ include/linux/time.h \\ $(wildcard include/config/arch/uses/gettimeoffset.h) \\ include/linux/time64.h \\ include/uapi/linux/time.h \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/linux/jiffies.h \\ include/linux/jiffies.h \\ include/linux/timex.h \\ include/uapi/linux/timex.h \\ include/uapi/linux/param.h \\ arch/x86/include/uapi/asm/param.h \\ include/asm-generic/param.h \\ $(wildcard include/config/hz.h) \\ include/uapi/asm-generic/param.h \\ arch/x86/include/asm/timex.h \\ arch/x86/include/asm/tsc.h \\ $(wildcard include/config/x86/tsc.h) \\ include/generated/timeconst.h \\ include/linux/timekeeping.h \\ include/linux/rcutree.h \\ include/linux/rwsem.h \\ $(wildcard include/config/rwsem/spin/on/owner.h) \\ $(wildcard include/config/rwsem/generic/spinlock.h) \\ include/linux/osq_lock.h \\ arch/x86/include/asm/rwsem.h \\ include/linux/uprobes.h \\ $(wildcard include/config/uprobes.h) \\ include/linux/errno.h \\ include/uapi/linux/errno.h \\ arch/x86/include/asm/uprobes.h \\ include/linux/notifier.h \\ include/linux/mutex.h \\ $(wildcard include/config/debug/mutexes.h) \\ $(wildcard include/config/mutex/spin/on/owner.h) \\ include/linux/srcu.h \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/linux/workqueue.h \\ include/linux/workqueue.h \\ $(wildcard include/config/debug/objects/work.h) \\ $(wildcard include/config/freezer.h) \\ $(wildcard include/config/sysfs.h) \\ include/linux/timer.h \\ $(wildcard include/config/timer/stats.h) \\ $(wildcard include/config/debug/objects/timers.h) \\ $(wildcard include/config/no/hz/common.h) \\ include/linux/sysctl.h \\ include/uapi/linux/sysctl.h \\ include/linux/page-flags-layout.h \\ include/linux/numa.h \\ $(wildcard include/config/nodes/shift.h) \\ include/generated/bounds.h \\ arch/x86/include/asm/mmu.h \\ $(wildcard include/config/modify/ldt/syscall.h) \\ include/linux/socket.h \\ arch/x86/include/uapi/asm/socket.h \\ include/uapi/asm-generic/socket.h \\ arch/x86/include/uapi/asm/sockios.h \\ include/uapi/asm-generic/sockios.h \\ include/uapi/linux/sockios.h \\ include/linux/uio.h \\ include/uapi/linux/uio.h \\ include/uapi/linux/socket.h \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/linux/net.h \\ include/linux/net.h \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/linux/random.h \\ include/linux/random.h \\ $(wildcard include/config/arch/random.h) \\ include/linux/once.h \\ include/uapi/linux/random.h \\ include/linux/irqnr.h \\ include/uapi/linux/irqnr.h \\ arch/x86/include/asm/archrandom.h \\ include/linux/fcntl.h \\ include/uapi/linux/fcntl.h \\ arch/x86/include/uapi/asm/fcntl.h \\ include/uapi/asm-generic/fcntl.h \\ include/uapi/linux/net.h \\ include/linux/textsearch.h \\ include/linux/slab.h \\ $(wildcard include/config/debug/slab.h) \\ $(wildcard include/config/failslab.h) \\ $(wildcard include/config/slab.h) \\ $(wildcard include/config/slub.h) \\ $(wildcard include/config/slob.h) \\ $(wildcard include/config/zone/dma.h) \\ include/linux/gfp.h \\ $(wildcard include/config/highmem.h) \\ $(wildcard include/config/zone/dma32.h) \\ $(wildcard include/config/zone/device.h) \\ $(wildcard include/config/deferred/struct/page/init.h) \\ $(wildcard include/config/pm/sleep.h) \\ $(wildcard include/config/cma.h) \\ include/linux/mmdebug.h \\ $(wildcard include/config/debug/vm.h) \\ include/linux/mmzone.h \\ $(wildcard include/config/force/max/zoneorder.h) \\ $(wildcard include/config/memory/isolation.h) \\ $(wildcard include/config/memory/hotplug.h) \\ $(wildcard include/config/flat/node/mem/map.h) \\ $(wildcard include/config/page/extension.h) \\ $(wildcard include/config/no/bootmem.h) \\ $(wildcard include/config/have/memory/present.h) \\ $(wildcard include/config/have/memoryless/nodes.h) \\ $(wildcard include/config/need/node/memmap/size.h) \\ $(wildcard include/config/have/memblock/node/map.h) \\ $(wildcard include/config/need/multiple/nodes.h) \\ $(wildcard include/config/have/arch/early/pfn/to/nid.h) \\ $(wildcard include/config/sparsemem/extreme.h) \\ $(wildcard include/config/have/arch/pfn/valid.h) \\ $(wildcard include/config/holes/in/zone.h) \\ $(wildcard include/config/arch/has/holes/memorymodel.h) \\ include/linux/nodemask.h \\ $(wildcard include/config/movable/node.h) \\ include/linux/pageblock-flags.h \\ $(wildcard include/config/hugetlb/page/size/variable.h) \\ include/linux/memory_hotplug.h \\ $(wildcard include/config/memory/hotremove.h) \\ $(wildcard include/config/have/arch/nodedata/extension.h) \\ $(wildcard include/config/have/bootmem/info/node.h) \\ arch/x86/include/asm/mmzone.h \\ arch/x86/include/asm/mmzone_64.h \\ arch/x86/include/asm/smp.h \\ $(wildcard include/config/x86/io/apic.h) \\ $(wildcard include/config/x86/32/smp.h) \\ $(wildcard include/config/debug/nmi/selftest.h) \\ arch/x86/include/asm/mpspec.h \\ $(wildcard include/config/eisa.h) \\ $(wildcard include/config/x86/mpparse.h) \\ arch/x86/include/asm/mpspec_def.h \\ arch/x86/include/asm/x86_init.h \\ arch/x86/include/uapi/asm/bootparam.h \\ include/linux/screen_info.h \\ include/uapi/linux/screen_info.h \\ include/linux/apm_bios.h \\ include/uapi/linux/apm_bios.h \\ include/linux/edd.h \\ include/uapi/linux/edd.h \\ arch/x86/include/asm/e820.h \\ $(wildcard include/config/efi.h) \\ $(wildcard include/config/hibernation.h) \\ arch/x86/include/uapi/asm/e820.h \\ $(wildcard include/config/x86/pmem/legacy.h) \\ $(wildcard include/config/intel/txt.h) \\ include/linux/ioport.h \\ arch/x86/include/asm/ist.h \\ arch/x86/include/uapi/asm/ist.h \\ include/video/edid.h \\ $(wildcard include/config/x86.h) \\ include/uapi/video/edid.h \\ arch/x86/include/asm/apicdef.h \\ arch/x86/include/asm/apic.h \\ $(wildcard include/config/x86/x2apic.h) \\ include/linux/pm.h \\ $(wildcard include/config/vt/console/sleep.h) \\ $(wildcard include/config/pm.h) \\ $(wildcard include/config/pm/clk.h) \\ $(wildcard include/config/pm/generic/domains.h) \\ arch/x86/include/asm/fixmap.h \\ $(wildcard include/config/paravirt/clock.h) \\ $(wildcard include/config/provide/ohci1394/dma/init.h) \\ $(wildcard include/config/pci/mmconfig.h) \\ $(wildcard include/config/x86/intel/mid.h) \\ arch/x86/include/asm/acpi.h \\ $(wildcard include/config/acpi/apei.h) \\ $(wildcard include/config/acpi.h) \\ $(wildcard include/config/acpi/numa.h) \\ include/acpi/pdc_intel.h \\ arch/x86/include/asm/numa.h \\ $(wildcard include/config/numa/emu.h) \\ arch/x86/include/asm/topology.h \\ include/asm-generic/topology.h \\ arch/x86/include/asm/realmode.h \\ $(wildcard include/config/acpi/sleep.h) \\ arch/x86/include/asm/io.h \\ $(wildcard include/config/mtrr.h) \\ arch/x86/include/generated/asm/early_ioremap.h \\ include/asm-generic/early_ioremap.h \\ $(wildcard include/config/generic/early/ioremap.h) \\ include/asm-generic/iomap.h \\ $(wildcard include/config/has/ioport/map.h) \\ $(wildcard include/config/pci.h) \\ $(wildcard include/config/generic/iomap.h) \\ include/asm-generic/pci_iomap.h \\ $(wildcard include/config/no/generic/pci/ioport/map.h) \\ $(wildcard include/config/generic/pci/iomap.h) \\ include/xen/xen.h \\ $(wildcard include/config/xen/dom0.h) \\ $(wildcard include/config/xen/pvh.h) \\ include/xen/interface/xen.h \\ arch/x86/include/asm/xen/interface.h \\ arch/x86/include/asm/xen/interface_64.h \\ arch/x86/include/asm/pvclock-abi.h \\ arch/x86/include/asm/xen/hypervisor.h \\ include/xen/features.h \\ include/xen/interface/features.h \\ arch/x86/include/asm/pvclock.h \\ include/linux/clocksource.h \\ $(wildcard include/config/arch/clocksource/data.h) \\ $(wildcard include/config/clocksource/watchdog.h) \\ $(wildcard include/config/clksrc/probe.h) \\ arch/x86/include/asm/clocksource.h \\ arch/x86/include/uapi/asm/vsyscall.h \\ include/asm-generic/fixmap.h \\ arch/x86/include/asm/idle.h \\ arch/x86/include/asm/io_apic.h \\ arch/x86/include/asm/irq_vectors.h \\ $(wildcard include/config/have/kvm.h) \\ $(wildcard include/config/pci/msi.h) \\ include/linux/topology.h \\ $(wildcard include/config/use/percpu/numa/node/id.h) \\ $(wildcard include/config/sched/smt.h) \\ include/linux/smp.h \\ $(wildcard include/config/up/late/init.h) \\ include/linux/llist.h \\ $(wildcard include/config/arch/have/nmi/safe/cmpxchg.h) \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/linux/percpu.h \\ include/linux/percpu.h \\ $(wildcard include/config/need/per/cpu/embed/first/chunk.h) \\ $(wildcard include/config/need/per/cpu/page/first/chunk.h) \\ include/linux/pfn.h \\ include/linux/kmemleak.h \\ $(wildcard include/config/debug/kmemleak.h) \\ include/linux/kasan.h \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/net/checksum.h \\ include/net/checksum.h \\ arch/x86/include/asm/uaccess.h \\ $(wildcard include/config/x86/intel/usercopy.h) \\ $(wildcard include/config/debug/strict/user/copy/checks.h) \\ arch/x86/include/asm/smap.h \\ $(wildcard include/config/x86/smap.h) \\ arch/x86/include/asm/uaccess_64.h \\ arch/x86/include/asm/checksum.h \\ arch/x86/include/asm/checksum_64.h \\ include/linux/hrtimer.h \\ $(wildcard include/config/high/res/timers.h) \\ $(wildcard include/config/time/low/res.h) \\ $(wildcard include/config/timerfd.h) \\ include/linux/timerqueue.h \\ include/linux/dma-mapping.h \\ $(wildcard include/config/has/dma.h) \\ $(wildcard include/config/arch/has/dma/set/coherent/mask.h) \\ $(wildcard include/config/have/dma/attrs.h) \\ $(wildcard include/config/need/dma/map/state.h) \\ include/linux/sizes.h \\ include/linux/device.h \\ $(wildcard include/config/debug/devres.h) \\ $(wildcard include/config/generic/msi/irq/domain.h) \\ $(wildcard include/config/pinctrl.h) \\ $(wildcard include/config/generic/msi/irq.h) \\ $(wildcard include/config/dma/cma.h) \\ $(wildcard include/config/of.h) \\ $(wildcard include/config/devtmpfs.h) \\ $(wildcard include/config/sysfs/deprecated.h) \\ include/linux/kobject.h \\ $(wildcard include/config/uevent/helper.h) \\ $(wildcard include/config/debug/kobject/release.h) \\ include/linux/sysfs.h \\ include/linux/kernfs.h \\ $(wildcard include/config/kernfs.h) \\ include/linux/idr.h \\ include/linux/kobject_ns.h \\ include/linux/stat.h \\ arch/x86/include/uapi/asm/stat.h \\ include/uapi/linux/stat.h \\ include/linux/uidgid.h \\ $(wildcard include/config/multiuser.h) \\ $(wildcard include/config/user/ns.h) \\ include/linux/highuid.h \\ include/linux/kref.h \\ include/linux/klist.h \\ include/linux/pinctrl/devinfo.h \\ include/linux/pinctrl/consumer.h \\ include/linux/seq_file.h \\ include/linux/fs.h \\ $(wildcard include/config/fs/posix/acl.h) \\ $(wildcard include/config/security.h) \\ $(wildcard include/config/cgroup/writeback.h) \\ $(wildcard include/config/ima.h) \\ $(wildcard include/config/fsnotify.h) \\ $(wildcard include/config/epoll.h) \\ $(wildcard include/config/file/locking.h) \\ $(wildcard include/config/quota.h) \\ $(wildcard include/config/blk/dev/loop.h) \\ $(wildcard include/config/fs/dax.h) \\ $(wildcard include/config/block.h) \\ $(wildcard include/config/migration.h) \\ include/linux/kdev_t.h \\ include/uapi/linux/kdev_t.h \\ include/linux/dcache.h \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/linux/rculist.h \\ include/linux/rculist.h \\ include/linux/rculist_bl.h \\ include/linux/list_bl.h \\ include/linux/bit_spinlock.h \\ include/linux/lockref.h \\ $(wildcard include/config/arch/use/cmpxchg/lockref.h) \\ include/linux/path.h \\ include/linux/list_lru.h \\ $(wildcard include/config/memcg/kmem.h) \\ include/linux/shrinker.h \\ include/linux/radix-tree.h \\ include/linux/pid.h \\ include/linux/capability.h \\ include/uapi/linux/capability.h \\ include/linux/semaphore.h \\ include/uapi/linux/fiemap.h \\ include/linux/migrate_mode.h \\ include/linux/percpu-rwsem.h \\ include/linux/rcu_sync.h \\ include/linux/blk_types.h \\ $(wildcard include/config/blk/cgroup.h) \\ $(wildcard include/config/blk/dev/integrity.h) \\ include/uapi/linux/fs.h \\ include/uapi/linux/limits.h \\ include/linux/quota.h \\ $(wildcard include/config/quota/netlink/interface.h) \\ include/linux/percpu_counter.h \\ include/uapi/linux/dqblk_xfs.h \\ include/linux/dqblk_v1.h \\ include/linux/dqblk_v2.h \\ include/linux/dqblk_qtree.h \\ include/linux/projid.h \\ include/uapi/linux/quota.h \\ include/linux/nfs_fs_i.h \\ include/linux/cred.h \\ $(wildcard include/config/debug/credentials.h) \\ $(wildcard include/config/keys.h) \\ include/linux/key.h \\ include/linux/assoc_array.h \\ $(wildcard include/config/associative/array.h) \\ include/linux/selinux.h \\ $(wildcard include/config/security/selinux.h) \\ include/linux/pinctrl/pinctrl-state.h \\ include/linux/ratelimit.h \\ arch/x86/include/asm/device.h \\ $(wildcard include/config/x86/dev/dma/ops.h) \\ $(wildcard include/config/intel/iommu.h) \\ $(wildcard include/config/amd/iommu.h) \\ include/linux/pm_wakeup.h \\ include/linux/dma-attrs.h \\ include/linux/dma-direction.h \\ include/linux/scatterlist.h \\ $(wildcard include/config/debug/sg.h) \\ $(wildcard include/config/need/sg/dma/length.h) \\ include/linux/mm.h \\ $(wildcard include/config/ppc.h) \\ $(wildcard include/config/parisc.h) \\ $(wildcard include/config/metag.h) \\ $(wildcard include/config/ia64.h) \\ $(wildcard include/config/stack/growsup.h) \\ $(wildcard include/config/shmem.h) \\ $(wildcard include/config/debug/vm/rb.h) \\ $(wildcard include/config/debug/pagealloc.h) \\ $(wildcard include/config/hugetlbfs.h) \\ include/linux/debug_locks.h \\ $(wildcard include/config/debug/locking/api/selftests.h) \\ include/linux/resource.h \\ include/uapi/linux/resource.h \\ arch/x86/include/uapi/asm/resource.h \\ include/asm-generic/resource.h \\ include/uapi/asm-generic/resource.h \\ include/linux/page_ext.h \\ $(wildcard include/config/idle/page/tracking.h) \\ $(wildcard include/config/page/owner.h) \\ include/linux/stacktrace.h \\ $(wildcard include/config/stacktrace.h) \\ $(wildcard include/config/user/stacktrace/support.h) \\ arch/x86/include/asm/pgtable.h \\ $(wildcard include/config/debug/wx.h) \\ $(wildcard include/config/have/arch/soft/dirty.h) \\ arch/x86/include/asm/pgtable_64.h \\ include/asm-generic/pgtable.h \\ $(wildcard include/config/have/arch/huge/vmap.h) \\ include/linux/page-flags.h \\ $(wildcard include/config/arch/uses/pg/uncached.h) \\ $(wildcard include/config/memory/failure.h) \\ $(wildcard include/config/swap.h) \\ $(wildcard include/config/ksm.h) \\ include/linux/huge_mm.h \\ include/linux/vmstat.h \\ $(wildcard include/config/vm/event/counters.h) \\ $(wildcard include/config/debug/tlbflush.h) \\ $(wildcard include/config/debug/vm/vmacache.h) \\ include/linux/vm_event_item.h \\ $(wildcard include/config/memory/balloon.h) \\ $(wildcard include/config/balloon/compaction.h) \\ arch/x86/include/asm/dma-mapping.h \\ $(wildcard include/config/isa.h) \\ $(wildcard include/config/x86/dma/remap.h) \\ include/linux/dma-debug.h \\ $(wildcard include/config/dma/api/debug.h) \\ arch/x86/include/asm/swiotlb.h \\ $(wildcard include/config/swiotlb.h) \\ include/linux/swiotlb.h \\ include/linux/dma-contiguous.h \\ include/asm-generic/dma-mapping-common.h \\ include/asm-generic/dma-coherent.h \\ $(wildcard include/config/have/generic/dma/coherent.h) \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/linux/netdev_features.h \\ include/linux/netdev_features.h \\ include/linux/sched.h \\ $(wildcard include/config/sched/debug.h) \\ $(wildcard include/config/lockup/detector.h) \\ $(wildcard include/config/detect/hung/task.h) \\ $(wildcard include/config/core/dump/default/elf/headers.h) \\ $(wildcard include/config/virt/cpu/accounting/native.h) \\ $(wildcard include/config/sched/autogroup.h) \\ $(wildcard include/config/bsd/process/acct.h) \\ $(wildcard include/config/taskstats.h) \\ $(wildcard include/config/audit.h) \\ $(wildcard include/config/inotify/user.h) \\ $(wildcard include/config/fanotify.h) \\ $(wildcard include/config/posix/mqueue.h) \\ $(wildcard include/config/perf/events.h) \\ $(wildcard include/config/bpf/syscall.h) \\ $(wildcard include/config/sched/info.h) \\ $(wildcard include/config/task/delay/acct.h) \\ $(wildcard include/config/schedstats.h) \\ $(wildcard include/config/sched/mc.h) \\ $(wildcard include/config/fair/group/sched.h) \\ $(wildcard include/config/rt/group/sched.h) \\ $(wildcard include/config/cgroup/sched.h) \\ $(wildcard include/config/blk/dev/io/trace.h) \\ $(wildcard include/config/compat/brk.h) \\ $(wildcard include/config/cgroups.h) \\ $(wildcard include/config/virt/cpu/accounting/gen.h) \\ $(wildcard include/config/sysvipc.h) \\ $(wildcard include/config/auditsyscall.h) \\ $(wildcard include/config/rt/mutexes.h) \\ $(wildcard include/config/task/xacct.h) \\ $(wildcard include/config/cpusets.h) \\ $(wildcard include/config/futex.h) \\ $(wildcard include/config/fault/injection.h) \\ $(wildcard include/config/latencytop.h) \\ $(wildcard include/config/function/graph/tracer.h) \\ $(wildcard include/config/bcache.h) \\ $(wildcard include/config/arch/wants/dynamic/task/struct.h) \\ $(wildcard include/config/have/unstable/sched/clock.h) \\ $(wildcard include/config/irq/time/accounting.h) \\ $(wildcard include/config/have/copy/thread/tls.h) \\ include/uapi/linux/sched.h \\ include/linux/sched/prio.h \\ include/linux/plist.h \\ $(wildcard include/config/debug/pi/list.h) \\ include/linux/cputime.h \\ arch/x86/include/generated/asm/cputime.h \\ include/asm-generic/cputime.h \\ $(wildcard include/config/virt/cpu/accounting.h) \\ include/asm-generic/cputime_jiffies.h \\ include/linux/sem.h \\ include/uapi/linux/sem.h \\ include/linux/ipc.h \\ include/uapi/linux/ipc.h \\ arch/x86/include/uapi/asm/ipcbuf.h \\ include/uapi/asm-generic/ipcbuf.h \\ arch/x86/include/uapi/asm/sembuf.h \\ include/linux/shm.h \\ include/uapi/linux/shm.h \\ arch/x86/include/uapi/asm/shmbuf.h \\ include/uapi/asm-generic/shmbuf.h \\ arch/x86/include/asm/shmparam.h \\ include/linux/signal.h \\ $(wildcard include/config/old/sigaction.h) \\ include/uapi/linux/signal.h \\ arch/x86/include/asm/signal.h \\ arch/x86/include/uapi/asm/signal.h \\ include/uapi/asm-generic/signal-defs.h \\ arch/x86/include/uapi/asm/siginfo.h \\ include/asm-generic/siginfo.h \\ include/uapi/asm-generic/siginfo.h \\ include/linux/proportions.h \\ include/linux/seccomp.h \\ $(wildcard include/config/seccomp.h) \\ $(wildcard include/config/have/arch/seccomp/filter.h) \\ $(wildcard include/config/seccomp/filter.h) \\ $(wildcard include/config/checkpoint/restore.h) \\ include/uapi/linux/seccomp.h \\ arch/x86/include/asm/seccomp.h \\ arch/x86/include/asm/unistd.h \\ $(wildcard include/config/x86/x32/abi.h) \\ arch/x86/include/uapi/asm/unistd.h \\ arch/x86/include/generated/uapi/asm/unistd_64.h \\ arch/x86/include/generated/asm/unistd_64_x32.h \\ arch/x86/include/asm/ia32_unistd.h \\ arch/x86/include/generated/asm/unistd_32_ia32.h \\ include/asm-generic/seccomp.h \\ include/uapi/linux/unistd.h \\ include/linux/rtmutex.h \\ $(wildcard include/config/debug/rt/mutexes.h) \\ include/linux/task_io_accounting.h \\ $(wildcard include/config/task/io/accounting.h) \\ include/linux/latencytop.h \\ include/uapi/linux/magic.h \\ include/linux/cgroup-defs.h \\ include/linux/percpu-refcount.h \\ include/linux/cgroup_subsys.h \\ $(wildcard include/config/cgroup/cpuacct.h) \\ $(wildcard include/config/cgroup/device.h) \\ $(wildcard include/config/cgroup/freezer.h) \\ $(wildcard include/config/cgroup/net/classid.h) \\ $(wildcard include/config/cgroup/perf.h) \\ $(wildcard include/config/cgroup/net/prio.h) \\ $(wildcard include/config/cgroup/hugetlb.h) \\ $(wildcard include/config/cgroup/pids.h) \\ $(wildcard include/config/cgroup/debug.h) \\ include/net/flow_dissector.h \\ include/linux/in6.h \\ include/uapi/linux/in6.h \\ include/uapi/linux/libc-compat.h \\ include/uapi/linux/if_ether.h \\ include/linux/splice.h \\ include/linux/pipe_fs_i.h \\ include/net/flow.h \\ include/linux/jhash.h \\ include/linux/unaligned/packed_struct.h \\ include/uapi/linux/ip.h \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/linux/in.h \\ include/linux/in.h \\ include/uapi/linux/in.h \\ include/linux/module.h \\ $(wildcard include/config/module/sig.h) \\ $(wildcard include/config/modules/tree/lookup.h) \\ $(wildcard include/config/kallsyms.h) \\ $(wildcard include/config/tracepoints.h) \\ $(wildcard include/config/event/tracing.h) \\ $(wildcard include/config/livepatch.h) \\ $(wildcard include/config/module/unload.h) \\ $(wildcard include/config/constructors.h) \\ $(wildcard include/config/debug/set/module/ronx.h) \\ include/linux/kmod.h \\ include/linux/elf.h \\ arch/x86/include/asm/elf.h \\ arch/x86/include/asm/user.h \\ arch/x86/include/asm/user_64.h \\ arch/x86/include/asm/vdso.h \\ $(wildcard include/config/x86/x32.h) \\ include/uapi/linux/elf.h \\ include/uapi/linux/elf-em.h \\ include/linux/moduleparam.h \\ $(wildcard include/config/alpha.h) \\ $(wildcard include/config/ppc64.h) \\ include/linux/rbtree_latch.h \\ arch/x86/include/asm/module.h \\ $(wildcard include/config/m586.h) \\ $(wildcard include/config/m586tsc.h) \\ $(wildcard include/config/m586mmx.h) \\ $(wildcard include/config/mcore2.h) \\ $(wildcard include/config/m686.h) \\ $(wildcard include/config/mpentiumii.h) \\ $(wildcard include/config/mpentiumiii.h) \\ $(wildcard include/config/mpentiumm.h) \\ $(wildcard include/config/mpentium4.h) \\ $(wildcard include/config/mk6.h) \\ $(wildcard include/config/mk8.h) \\ $(wildcard include/config/melan.h) \\ $(wildcard include/config/mcrusoe.h) \\ $(wildcard include/config/mefficeon.h) \\ $(wildcard include/config/mwinchipc6.h) \\ $(wildcard include/config/mwinchip3d.h) \\ $(wildcard include/config/mcyrixiii.h) \\ $(wildcard include/config/mviac3/2.h) \\ $(wildcard include/config/mviac7.h) \\ $(wildcard include/config/mgeodegx1.h) \\ $(wildcard include/config/mgeode/lx.h) \\ include/asm-generic/module.h \\ $(wildcard include/config/have/mod/arch/specific.h) \\ $(wildcard include/config/modules/use/elf/rel.h) \\ $(wildcard include/config/modules/use/elf/rela.h) \\ include/net/inet_sock.h \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/linux/netdevice.h \\ include/linux/netdevice.h \\ $(wildcard include/config/dcb.h) \\ $(wildcard include/config/hyperv/net.h) \\ $(wildcard include/config/wlan.h) \\ $(wildcard include/config/ax25.h) \\ $(wildcard include/config/mac80211/mesh.h) \\ $(wildcard include/config/net/ipip.h) \\ $(wildcard include/config/net/ipgre.h) \\ $(wildcard include/config/ipv6/sit.h) \\ $(wildcard include/config/ipv6/tunnel.h) \\ $(wildcard include/config/rps.h) \\ $(wildcard include/config/netpoll.h) \\ $(wildcard include/config/bql.h) \\ $(wildcard include/config/rfs/accel.h) \\ $(wildcard include/config/fcoe.h) \\ $(wildcard include/config/net/poll/controller.h) \\ $(wildcard include/config/libfcoe.h) \\ $(wildcard include/config/wireless/ext.h) \\ $(wildcard include/config/net/l3/master/dev.h) \\ $(wildcard include/config/vlan/8021q.h) \\ $(wildcard include/config/net/dsa.h) \\ $(wildcard include/config/tipc.h) \\ $(wildcard include/config/mpls/routing.h) \\ $(wildcard include/config/netfilter/ingress.h) \\ $(wildcard include/config/net/flow/limit.h) \\ include/linux/delay.h \\ arch/x86/include/asm/delay.h \\ include/asm-generic/delay.h \\ include/linux/prefetch.h \\ include/linux/dmaengine.h \\ $(wildcard include/config/async/tx/enable/channel/switch.h) \\ $(wildcard include/config/dma/engine.h) \\ $(wildcard include/config/rapidio/dma/engine.h) \\ $(wildcard include/config/async/tx/dma.h) \\ include/linux/dynamic_queue_limits.h \\ include/linux/ethtool.h \\ include/linux/compat.h \\ $(wildcard include/config/compat/old/sigaction.h) \\ $(wildcard include/config/odd/rt/sigaction.h) \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/linux/if.h \\ include/uapi/linux/if.h \\ include/uapi/linux/hdlc/ioctl.h \\ include/uapi/linux/aio_abi.h \\ arch/x86/include/asm/compat.h \\ arch/x86/include/asm/user32.h \\ include/uapi/linux/ethtool.h \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/linux/if_ether.h \\ include/linux/if_ether.h \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/net/net_namespace.h \\ $(wildcard include/config/net/ns.h) \\ include/net/net_namespace.h \\ $(wildcard include/config/ieee802154/6lowpan.h) \\ $(wildcard include/config/ip/sctp.h) \\ $(wildcard include/config/ip/dccp.h) \\ $(wildcard include/config/netfilter.h) \\ $(wildcard include/config/nf/defrag/ipv6.h) \\ $(wildcard include/config/netfilter/netlink/acct.h) \\ $(wildcard include/config/wext/core.h) \\ $(wildcard include/config/ip/vs.h) \\ $(wildcard include/config/mpls.h) \\ include/net/netns/core.h \\ include/net/netns/mib.h \\ $(wildcard include/config/xfrm/statistics.h) \\ include/net/snmp.h \\ include/uapi/linux/snmp.h \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/linux/u64_stats_sync.h \\ include/linux/u64_stats_sync.h \\ include/net/netns/unix.h \\ include/net/netns/packet.h \\ include/net/netns/ipv4.h \\ $(wildcard include/config/ip/multiple/tables.h) \\ $(wildcard include/config/ip/route/classid.h) \\ $(wildcard include/config/ip/mroute.h) \\ $(wildcard include/config/ip/mroute/multiple/tables.h) \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/net/inet_frag.h \\ include/net/inet_frag.h \\ include/net/netns/ipv6.h \\ $(wildcard include/config/ipv6/multiple/tables.h) \\ $(wildcard include/config/ipv6/mroute.h) \\ $(wildcard include/config/ipv6/mroute/multiple/tables.h) \\ include/net/dst_ops.h \\ include/net/netns/ieee802154_6lowpan.h \\ include/net/netns/sctp.h \\ include/net/netns/dccp.h \\ include/net/netns/netfilter.h \\ include/linux/netfilter_defs.h \\ include/uapi/linux/netfilter.h \\ include/net/netns/x_tables.h \\ $(wildcard include/config/bridge/nf/ebtables.h) \\ include/net/netns/conntrack.h \\ $(wildcard include/config/nf/conntrack/proc/compat.h) \\ $(wildcard include/config/nf/conntrack/events.h) \\ $(wildcard include/config/nf/conntrack/labels.h) \\ $(wildcard include/config/nf/nat/needed.h) \\ include/linux/list_nulls.h \\ include/linux/netfilter/nf_conntrack_tcp.h \\ include/uapi/linux/netfilter/nf_conntrack_tcp.h \\ include/net/netns/nftables.h \\ include/net/netns/xfrm.h \\ include/uapi/linux/xfrm.h \\ include/net/flowcache.h \\ include/linux/interrupt.h \\ $(wildcard include/config/irq/forced/threading.h) \\ $(wildcard include/config/generic/irq/probe.h) \\ include/linux/irqreturn.h \\ include/linux/hardirq.h \\ include/linux/ftrace_irq.h \\ $(wildcard include/config/ftrace/nmi/enter.h) \\ include/linux/vtime.h \\ include/linux/context_tracking_state.h \\ $(wildcard include/config/context/tracking.h) \\ include/linux/static_key.h \\ arch/x86/include/asm/hardirq.h \\ $(wildcard include/config/x86/thermal/vector.h) \\ $(wildcard include/config/x86/mce/threshold.h) \\ $(wildcard include/config/x86/mce/amd.h) \\ $(wildcard include/config/hyperv.h) \\ include/linux/irq.h \\ $(wildcard include/config/irq/domain/hierarchy.h) \\ $(wildcard include/config/generic/pending/irq.h) \\ $(wildcard include/config/hardirqs/sw/resend.h) \\ $(wildcard include/config/generic/irq/legacy/alloc/hwirq.h) \\ $(wildcard include/config/generic/irq/legacy.h) \\ include/linux/irqhandler.h \\ include/linux/io.h \\ arch/x86/include/asm/irq.h \\ arch/x86/include/asm/irq_regs.h \\ include/linux/irqdesc.h \\ $(wildcard include/config/irq/preflow/fasteoi.h) \\ $(wildcard include/config/sparse/irq.h) \\ $(wildcard include/config/handle/domain/irq.h) \\ arch/x86/include/asm/hw_irq.h \\ $(wildcard include/config/hpet/timer.h) \\ $(wildcard include/config/dmar/table.h) \\ $(wildcard include/config/ht/irq.h) \\ $(wildcard include/config/x86/uv.h) \\ include/linux/profile.h \\ $(wildcard include/config/profiling.h) \\ arch/x86/include/asm/sections.h \\ $(wildcard include/config/debug/rodata.h) \\ include/asm-generic/sections.h \\ include/net/netns/mpls.h \\ include/linux/ns_common.h \\ include/linux/seq_file_net.h \\ include/net/dsa.h \\ $(wildcard include/config/net/dsa/hwmon.h) \\ include/linux/of.h \\ $(wildcard include/config/sparc.h) \\ $(wildcard include/config/of/dynamic.h) \\ $(wildcard include/config/attach/node.h) \\ $(wildcard include/config/detach/node.h) \\ $(wildcard include/config/add/property.h) \\ $(wildcard include/config/remove/property.h) \\ $(wildcard include/config/update/property.h) \\ $(wildcard include/config/of/numa.h) \\ $(wildcard include/config/no/change.h) \\ $(wildcard include/config/change/add.h) \\ $(wildcard include/config/change/remove.h) \\ $(wildcard include/config/of/resolve.h) \\ $(wildcard include/config/of/overlay.h) \\ include/linux/mod_devicetable.h \\ include/linux/uuid.h \\ include/uapi/linux/uuid.h \\ include/linux/property.h \\ include/linux/fwnode.h \\ include/linux/phy.h \\ include/linux/mii.h \\ include/uapi/linux/mii.h \\ include/linux/phy_fixed.h \\ $(wildcard include/config/fixed/phy.h) \\ include/net/dcbnl.h \\ include/uapi/linux/dcbnl.h \\ include/net/netprio_cgroup.h \\ include/linux/cgroup.h \\ include/uapi/linux/cgroupstats.h \\ include/uapi/linux/taskstats.h \\ include/linux/nsproxy.h \\ include/linux/user_namespace.h \\ $(wildcard include/config/persistent/keyrings.h) \\ include/uapi/linux/neighbour.h \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/linux/netlink.h \\ include/linux/netlink.h \\ include/net/scm.h \\ $(wildcard include/config/security/network.h) \\ include/linux/security.h \\ $(wildcard include/config/security/network/xfrm.h) \\ $(wildcard include/config/security/path.h) \\ $(wildcard include/config/securityfs.h) \\ include/uapi/linux/netlink.h \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/net/netlink.h \\ $(wildcard include/config/have/efficient/unaligned/access.h) \\ include/net/netlink.h \\ include/linux/in6.h \\ include/uapi/linux/netdevice.h \\ include/uapi/linux/if_packet.h \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/linux/if_link.h \\ include/linux/if_link.h \\ include/uapi/linux/if_link.h \\ $(wildcard include/config/pending.h) \\ include/uapi/linux/if_bonding.h \\ include/uapi/linux/pkt_cls.h \\ $(wildcard include/config/net/cls/ind.h) \\ include/uapi/linux/pkt_sched.h \\ include/linux/if_bridge.h \\ $(wildcard include/config/bridge.h) \\ $(wildcard include/config/bridge/igmp/snooping.h) \\ include/uapi/linux/if_bridge.h \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/net/sock.h \\ include/net/sock.h \\ $(wildcard include/config/net.h) \\ include/linux/uaccess.h \\ include/linux/page_counter.h \\ include/linux/memcontrol.h \\ $(wildcard include/config/memcg/swap.h) \\ include/linux/vmpressure.h \\ include/linux/eventfd.h \\ $(wildcard include/config/eventfd.h) \\ include/linux/writeback.h \\ include/linux/flex_proportions.h \\ include/linux/backing-dev-defs.h \\ $(wildcard include/config/debug/fs.h) \\ include/linux/bio.h \\ include/linux/highmem.h \\ arch/x86/include/asm/cacheflush.h \\ $(wildcard include/config/debug/rodata/test.h) \\ include/asm-generic/cacheflush.h \\ include/linux/mempool.h \\ include/linux/ioprio.h \\ include/linux/iocontext.h \\ include/linux/filter.h \\ $(wildcard include/config/bpf/jit.h) \\ include/net/sch_generic.h \\ include/uapi/linux/pkt_cls.h \\ include/net/gen_stats.h \\ include/uapi/linux/gen_stats.h \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/linux/rtnetlink.h \\ include/linux/rtnetlink.h \\ $(wildcard include/config/net/ingress.h) \\ include/uapi/linux/rtnetlink.h \\ include/uapi/linux/if_addr.h \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/net/rtnetlink.h \\ include/net/rtnetlink.h \\ include/uapi/linux/filter.h \\ include/uapi/linux/bpf_common.h \\ include/uapi/linux/bpf.h \\ include/linux/rculist_nulls.h \\ include/linux/poll.h \\ include/uapi/linux/poll.h \\ arch/x86/include/uapi/asm/poll.h \\ include/uapi/asm-generic/poll.h \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/net/dst.h \\ include/net/dst.h \\ include/net/neighbour.h \\ include/net/tcp_states.h \\ include/uapi/linux/net_tstamp.h \\ include/net/request_sock.h \\ include/net/netns/hash.h \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/net/route.h \\ include/net/route.h \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/net/inetpeer.h \\ include/net/inetpeer.h \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/net/ipv6.h \\ include/net/ipv6.h \\ include/linux/ipv6.h \\ $(wildcard include/config/ipv6/router/pref.h) \\ $(wildcard include/config/ipv6/route/info.h) \\ $(wildcard include/config/ipv6/optimistic/dad.h) \\ $(wildcard include/config/ipv6/mip6.h) \\ $(wildcard include/config/ipv6/subtrees.h) \\ include/uapi/linux/ipv6.h \\ include/linux/icmpv6.h \\ include/uapi/linux/icmpv6.h \\ include/linux/tcp.h \\ $(wildcard include/config/tcp/md5sig.h) \\ include/net/inet_connection_sock.h \\ include/net/inet_timewait_sock.h \\ include/net/timewait_sock.h \\ include/uapi/linux/tcp.h \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/compat/include/linux/udp.h \\ include/linux/udp.h \\ include/uapi/linux/udp.h \\ include/net/if_inet6.h \\ include/net/ndisc.h \\ include/linux/if_arp.h \\ $(wildcard include/config/firewire/net.h) \\ include/uapi/linux/if_arp.h \\ include/linux/hash.h \\ include/net/ip_fib.h \\ $(wildcard include/config/ip/route/multipath.h) \\ include/net/fib_rules.h \\ include/uapi/linux/fib_rules.h \\ include/net/l3mdev.h \\ include/uapi/linux/in_route.h \\ include/uapi/linux/route.h \\ include/net/udp.h \\ /home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/udp.o: $(deps_/home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/udp.o) $(deps_/home/tank/ICC_CODE/openvswitch-2.7.0/datapath/linux/udp.o): ",16179,True,4427.616345528873,median "cmd_/home/liu/openairinterface5g/cmake_targets/oaisim_build_oai/build/CMakeFiles/ue_ip/netlink.o := gcc -Wp,-MD,/home/liu/openairinterface5g/cmake_targets/oaisim_build_oai/build/CMakeFiles/ue_ip/.netlink.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/4.8/include -I./arch/x86/include -Iarch/x86/include/generated/uapi -Iarch/x86/include/generated -Iinclude -I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -m64 -mno-80387 -mno-fp-ret-in-387 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fno-delete-null-pointer-checks -O2 --param=allow-store-data-races=0 -Wframe-larger-than=1024 -fstack-protector -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -pg -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -DCC_HAVE_ASM_GOTO -DCMAKE_BUILD_TYPE=""RelWithDebInfo"" -DCMAKER -DFIRMWARE_VERSION=""No svn information"" -DPACKAGE_VERSION=""Branch: master Abrev. Hash: 076b2ed Date: Mon May 22 11:50:13 2017 +0200"" -DPACKAGE_BUGREPORT=""openair4g-devel@lists.eurecom.fr"" -DXFORMS -DPRINT_STATS -DENABLE_ITTI -DRel14=1 -DS1AP_VERSION=R10 -DX2AP_VERSION=R11 -DNB_ANTENNAS_RX=2 -DNB_ANTENNAS_TX=2 -DNB_ANTENNAS_TXRX=2 -DNone=1 -DENABLE_SECURITY -DENABLE_USE_MME -DNO_RRM -DRRC_DEFAULT_RAB_IS_AM -DOAISIM -DOAI_NW_DRIVER_USE_NETLINK -DPACKAGE_NAME=""oaisim"" -DENB_MODE -DENABLE_PGM_TRANSPORT -DOAI_EMU -DPHY_ABSTRACTION -DENABLE_USE_CPU_EXECUTION_TIME -DENABLE_VCD -DLINUX -DLOG_NO_THREAD -DOPENAIR_LTE -DDRIVER2013 -DENABLE_FXP -DENABLE_NEW_MULTICAST -DEXMIMO_IOT -DMAX_NUM_CCs=1 -DNEW_FFT -DOPENAIR1 -DPC_DSP -DPC_TARGET -DPHYSIM -DPUCCH -DENABLE_NAS_UE_LOGGING -DNAS_BUILT_IN_UE -DNAS_UE -DMAC_CONTEXT -DJUMBO_FRAME -DOPENAIR2 -DTRACE_RLC_MUTEX -DPDCP_USE_NETLINK -DLINK_ENB_PDCP_TO_GTPV1U -DRRC_DEFAULT_RAB_IS_AM -DNETTLE_VERSION_MAJOR=2 -DNETTLE_VERSION_MINOR=7 -DASN1_MINIMUM_VERSION=924 -I/home/liu/openairinterface5g/cmake_targets/oaisim_build_oai/build/CMakeFiles/Rel14 -I/home/liu/openairinterface5g/cmake_targets/oaisim_build_oai/build/CMakeFiles/R10.5 -I/home/liu/openairinterface5g/openair3/S1AP -I/home/liu/openairinterface5g/cmake_targets/oaisim_build_oai/build/CMakeFiles/R11.2 -I/home/liu/openairinterface5g/openair2/X2AP -I/home/liu/openairinterface5g/targets/ARCH/EXMIMO/USERSPACE/LIB -I/home/liu/openairinterface5g/targets/ARCH/EXMIMO/DEFS -I/home/liu/openairinterface5g/targets/ARCH/USRP/USERSPACE/LIB -I/home/liu/openairinterface5g/targets/ARCH/BLADERF/USERSPACE/LIB -I/home/liu/openairinterface5g/targets/ARCH/LMSSDR/USERSPACE/LIB -I/home/liu/openairinterface5g/targets/ARCH/ETHERNET/USERSPACE/LIB -I/home/liu/openairinterface5g/targets/ARCH/COMMON -I/home/liu/openairinterface5g/cmake_targets/oaisim_build_oai/build/CMakeFiles -I/home/liu/openairinterface5g/openair2/COMMON -I/home/liu/openairinterface5g/openair2/UTIL -I/home/liu/openairinterface5g/openair2/UTIL/LOG -I/home/liu/openairinterface5g/openair3/COMMON -I/home/liu/openairinterface5g/openair3/UTILS -I/home/liu/openairinterface5g/openair1 -I/home/liu/openairinterface5g/openair2/NAS -I/home/liu/openairinterface5g/openair2 -I/home/liu/openairinterface5g/openair2/LAYER2/RLC -I/home/liu/openairinterface5g/openair2/LAYER2/RLC/AM_v9.3.0 -I/home/liu/openairinterface5g/openair2/LAYER2/RLC/UM_v9.3.0 -I/home/liu/openairinterface5g/openair2/LAYER2/RLC/TM_v9.3.0 -I/home/liu/openairinterface5g/openair2/LAYER2/PDCP_v10.1.0 -I/home/liu/openairinterface5g/openair2/RRC/LITE/MESSAGES -I/home/liu/openairinterface5g/openair2/RRC/LITE -I/home/liu/openairinterface5g/openair3/RAL-LTE/INTERFACE-802.21/INCLUDE -I/home/liu/openairinterface5g/openair3/RAL-LTE/LTE_RAL_ENB/INCLUDE -I/home/liu/openairinterface5g/openair3/RAL-LTE/LTE_RAL_UE/INCLUDE -I/home/liu/openairinterface5g/common/utils -I/home/liu/openairinterface5g/common/utils/itti -I/home/liu/openairinterface5g/openair3/NAS/COMMON -I/home/liu/openairinterface5g/openair3/NAS/COMMON/API/NETWORK -I/home/liu/openairinterface5g/openair3/NAS/COMMON/EMM/MSG -I/home/liu/openairinterface5g/openair3/NAS/COMMON/ESM/MSG -I/home/liu/openairinterface5g/openair3/NAS/COMMON/IES -I/home/liu/openairinterface5g/openair3/NAS/COMMON/UTIL -I/home/liu/openairinterface5g/openair3/SECU -I/home/liu/openairinterface5g/openair3/SCTP -I/home/liu/openairinterface5g/openair3/S1AP -I/home/liu/openairinterface5g/openair2/X2AP -I/home/liu/openairinterface5g/openair3/UDP -I/home/liu/openairinterface5g/openair3/GTPV1-U -I/home/liu/openairinterface5g/targets/COMMON -I/home/liu/openairinterface5g/targets/ARCH/COMMON -I/home/liu/openairinterface5g/targets/ARCH/EXMIMO/USERSPACE/LIB -I/home/liu/openairinterface5g/targets/ARCH/EXMIMO/DEFS -I/home/liu/openairinterface5g/openair2/ENB_APP -I/home/liu/openairinterface5g/openair2/ENB_APP/CONTROL_MODULES/MAC -I/home/liu/openairinterface5g/openair2/UTIL/OSA -I/home/liu/openairinterface5g/openair2/UTIL/LFDS/liblfds6.1.1/liblfds611/inc -I/home/liu/openairinterface5g/openair2/UTIL/LFDS/liblfds7.0.0/liblfds700/inc -I/home/liu/openairinterface5g/openair2/UTIL/MEM -I/home/liu/openairinterface5g/openair2/UTIL/LISTS -I/home/liu/openairinterface5g/openair2/UTIL/FIFO -I/home/liu/openairinterface5g/openair2/UTIL/OCG -I/home/liu/openairinterface5g/openair2/UTIL/MATH -I/home/liu/openairinterface5g/openair2/UTIL/TIMER -I/home/liu/openairinterface5g/openair2/UTIL/OMG -I/home/liu/openairinterface5g/openair2/UTIL/OTG -I/home/liu/openairinterface5g/openair2/UTIL/CLI -I/home/liu/openairinterface5g/openair2/UTIL/OPT -I/home/liu/openairinterface5g/openair2/UTIL/OMV -I/home/liu/openairinterface5g/openair2/RRC/LITE/MESSAGES -I/home/liu/openairinterface5g/openair3/GTPV1-U/nw-gtpv1u/shared -I/home/liu/openairinterface5g/openair3/GTPV1-U/nw-gtpv1u/include -I/home/liu/openairinterface5g -I/home/liu/openairinterface5g/common/utils/hashtable -I/home/liu/openairinterface5g/common/utils/msc -I/home/liu/openairinterface5g/openair3/NAS/UE -I/home/liu/openairinterface5g/openair3/NAS/UE/API/USER -I/home/liu/openairinterface5g/openair3/NAS/UE/API/USIM -I/home/liu/openairinterface5g/openair3/NAS/UE/EMM -I/home/liu/openairinterface5g/openair3/NAS/UE/EMM/SAP -I/home/liu/openairinterface5g/openair3/NAS/UE/ESM -I/home/liu/openairinterface5g/openair3/NAS/UE/ESM/SAP -I/home/liu/openairinterface5g/openair2/UTIL/LFDS/liblfds6.1.1/liblfds611/src -I/home/liu/openairinterface5g/openair2/UTIL/LFDS/liblfds7.0.0/liblfds700/src -I/usr/include/libxml2 -I/usr/include/libxml2 -I/usr/include/pgm-5.1 -I/usr/lib/x86_64-linux-gnu/pgm-5.1/include -I/usr/include/atlas -I/usr/include/X11 -I/home/liu/openairinterface5g/common/utils/T -DNAS_NETLINK -DMODULE -D""KBUILD_STR(s)=\\#s"" -D""KBUILD_BASENAME=KBUILD_STR(netlink)"" -D""KBUILD_MODNAME=KBUILD_STR(ue_ip)"" -c -o /home/liu/openairinterface5g/cmake_targets/oaisim_build_oai/build/CMakeFiles/ue_ip/.tmp_netlink.o /home/liu/openairinterface5g/openair2/NETWORK_DRIVER/UE_IP/netlink.c source_/home/liu/openairinterface5g/cmake_targets/oaisim_build_oai/build/CMakeFiles/ue_ip/netlink.o := /home/liu/openairinterface5g/openair2/NETWORK_DRIVER/UE_IP/netlink.c deps_/home/liu/openairinterface5g/cmake_targets/oaisim_build_oai/build/CMakeFiles/ue_ip/netlink.o := \\ include/linux/socket.h \\ $(wildcard include/config/proc/fs.h) \\ $(wildcard include/config/compat.h) \\ arch/x86/include/uapi/asm/socket.h \\ include/uapi/asm-generic/socket.h \\ arch/x86/include/uapi/asm/sockios.h \\ include/uapi/asm-generic/sockios.h \\ include/uapi/linux/sockios.h \\ include/linux/uio.h \\ include/linux/kernel.h \\ $(wildcard include/config/lbdaf.h) \\ $(wildcard include/config/preempt/voluntary.h) \\ $(wildcard include/config/debug/atomic/sleep.h) \\ $(wildcard include/config/mmu.h) \\ $(wildcard include/config/prove/locking.h) \\ $(wildcard include/config/panic/timeout.h) \\ $(wildcard include/config/ring/buffer.h) \\ $(wildcard include/config/tracing.h) \\ $(wildcard include/config/ftrace/mcount/record.h) \\ /usr/lib/gcc/x86_64-linux-gnu/4.8/include/stdarg.h \\ include/linux/linkage.h \\ include/linux/compiler.h \\ $(wildcard include/config/sparse/rcu/pointer.h) \\ $(wildcard include/config/trace/branch/profiling.h) \\ $(wildcard include/config/profile/all/branches.h) \\ $(wildcard include/config/64bit.h) \\ $(wildcard include/config/enable/must/check.h) \\ $(wildcard include/config/enable/warn/deprecated.h) \\ $(wildcard include/config/kprobes.h) \\ include/linux/compiler-gcc.h \\ $(wildcard include/config/arch/supports/optimized/inlining.h) \\ $(wildcard include/config/optimize/inlining.h) \\ include/linux/compiler-gcc4.h \\ $(wildcard include/config/arch/use/builtin/bswap.h) \\ include/uapi/linux/types.h \\ arch/x86/include/uapi/asm/types.h \\ include/uapi/asm-generic/types.h \\ include/asm-generic/int-ll64.h \\ include/uapi/asm-generic/int-ll64.h \\ arch/x86/include/uapi/asm/bitsperlong.h \\ include/asm-generic/bitsperlong.h \\ include/uapi/asm-generic/bitsperlong.h \\ include/uapi/linux/posix_types.h \\ include/linux/stddef.h \\ include/uapi/linux/stddef.h \\ arch/x86/include/asm/posix_types.h \\ $(wildcard include/config/x86/32.h) \\ arch/x86/include/uapi/asm/posix_types_64.h \\ include/uapi/asm-generic/posix_types.h \\ include/linux/stringify.h \\ include/linux/export.h \\ $(wildcard include/config/have/underscore/symbol/prefix.h) \\ $(wildcard include/config/modules.h) \\ $(wildcard include/config/modversions.h) \\ $(wildcard include/config/unused/symbols.h) \\ arch/x86/include/asm/linkage.h \\ $(wildcard include/config/x86/64.h) \\ $(wildcard include/config/x86/alignment/16.h) \\ include/linux/types.h \\ $(wildcard include/config/uid16.h) \\ $(wildcard include/config/arch/dma/addr/t/64bit.h) \\ $(wildcard include/config/phys/addr/t/64bit.h) \\ include/linux/bitops.h \\ arch/x86/include/asm/bitops.h \\ $(wildcard include/config/x86/cmov.h) \\ arch/x86/include/asm/alternative.h \\ $(wildcard include/config/smp.h) \\ $(wildcard include/config/paravirt.h) \\ arch/x86/include/asm/asm.h \\ arch/x86/include/asm/ptrace.h \\ $(wildcard include/config/x86/debugctlmsr.h) \\ arch/x86/include/asm/segment.h \\ $(wildcard include/config/cc/stackprotector.h) \\ $(wildcard include/config/x86/32/lazy/gs.h) \\ include/uapi/linux/const.h \\ arch/x86/include/asm/cache.h \\ $(wildcard include/config/x86/l1/cache/shift.h) \\ $(wildcard include/config/x86/internode/cache/shift.h) \\ $(wildcard include/config/x86/vsmp.h) \\ arch/x86/include/asm/page_types.h \\ $(wildcard include/config/physical/start.h) \\ $(wildcard include/config/physical/align.h) \\ arch/x86/include/asm/page_64_types.h \\ $(wildcard include/config/randomize/base.h) \\ $(wildcard include/config/randomize/base/max/offset.h) \\ arch/x86/include/uapi/asm/ptrace.h \\ arch/x86/include/uapi/asm/ptrace-abi.h \\ arch/x86/include/asm/processor-flags.h \\ $(wildcard include/config/vm86.h) \\ arch/x86/include/uapi/asm/processor-flags.h \\ arch/x86/include/asm/paravirt_types.h \\ $(wildcard include/config/x86/local/apic.h) \\ $(wildcard include/config/x86/pae.h) \\ $(wildcard include/config/paravirt/debug.h) \\ arch/x86/include/asm/desc_defs.h \\ arch/x86/include/asm/kmap_types.h \\ $(wildcard include/config/debug/highmem.h) \\ include/asm-generic/kmap_types.h \\ arch/x86/include/asm/pgtable_types.h \\ $(wildcard include/config/kmemcheck.h) \\ $(wildcard include/config/mem/soft/dirty.h) \\ $(wildcard include/config/numa/balancing.h) \\ arch/x86/include/asm/pgtable_64_types.h \\ arch/x86/include/asm/sparsemem.h \\ $(wildcard include/config/sparsemem.h) \\ arch/x86/include/asm/spinlock_types.h \\ $(wildcard include/config/paravirt/spinlocks.h) \\ $(wildcard include/config/nr/cpus.h) \\ include/asm-generic/qrwlock_types.h \\ include/asm-generic/ptrace.h \\ arch/x86/include/asm/cpufeature.h \\ $(wildcard include/config/x86/feature/names.h) \\ $(wildcard include/config/x86/debug/static/cpu/has.h) \\ arch/x86/include/asm/required-features.h \\ $(wildcard include/config/x86/minimum/cpu/family.h) \\ $(wildcard include/config/math/emulation.h) \\ $(wildcard include/config/x86/cmpxchg64.h) \\ $(wildcard include/config/x86/use/3dnow.h) \\ $(wildcard include/config/x86/p6/nop.h) \\ $(wildcard include/config/matom.h) \\ arch/x86/include/asm/disabled-features.h \\ $(wildcard include/config/x86/intel/mpx.h) \\ arch/x86/include/asm/rmwcc.h \\ arch/x86/include/asm/barrier.h \\ $(wildcard include/config/x86/ppro/fence.h) \\ arch/x86/include/asm/nops.h \\ $(wildcard include/config/mk7.h) \\ include/asm-generic/bitops/find.h \\ $(wildcard include/config/generic/find/first/bit.h) \\ include/asm-generic/bitops/sched.h \\ arch/x86/include/asm/arch_hweight.h \\ include/asm-generic/bitops/const_hweight.h \\ include/asm-generic/bitops/le.h \\ arch/x86/include/uapi/asm/byteorder.h \\ include/linux/byteorder/little_endian.h \\ include/uapi/linux/byteorder/little_endian.h \\ include/linux/swab.h \\ include/uapi/linux/swab.h \\ arch/x86/include/uapi/asm/swab.h \\ include/linux/byteorder/generic.h \\ include/asm-generic/bitops/ext2-atomic-setbit.h \\ include/linux/log2.h \\ $(wildcard include/config/arch/has/ilog2/u32.h) \\ $(wildcard include/config/arch/has/ilog2/u64.h) \\ include/linux/typecheck.h \\ include/linux/printk.h \\ $(wildcard include/config/message/loglevel/default.h) \\ $(wildcard include/config/early/printk.h) \\ $(wildcard include/config/printk.h) \\ $(wildcard include/config/dynamic/debug.h) \\ include/linux/init.h \\ $(wildcard include/config/broken/rodata.h) \\ $(wildcard include/config/lto.h) \\ include/linux/kern_levels.h \\ include/linux/cache.h \\ $(wildcard include/config/arch/has/cache/line/size.h) \\ include/uapi/linux/kernel.h \\ include/uapi/linux/sysinfo.h \\ include/linux/dynamic_debug.h \\ include/uapi/linux/uio.h \\ include/uapi/linux/socket.h \\ include/linux/module.h \\ $(wildcard include/config/sysfs.h) \\ $(wildcard include/config/module/sig.h) \\ $(wildcard include/config/generic/bug.h) \\ $(wildcard include/config/kallsyms.h) \\ $(wildcard include/config/tracepoints.h) \\ $(wildcard include/config/event/tracing.h) \\ $(wildcard include/config/module/unload.h) \\ $(wildcard include/config/constructors.h) \\ $(wildcard include/config/debug/set/module/ronx.h) \\ include/linux/list.h \\ $(wildcard include/config/debug/list.h) \\ include/linux/poison.h \\ $(wildcard include/config/illegal/pointer/value.h) \\ include/linux/stat.h \\ arch/x86/include/uapi/asm/stat.h \\ include/uapi/linux/stat.h \\ include/linux/time.h \\ $(wildcard include/config/arch/uses/gettimeoffset.h) \\ include/linux/seqlock.h \\ $(wildcard include/config/debug/lock/alloc.h) \\ include/linux/spinlock.h \\ $(wildcard include/config/debug/spinlock.h) \\ $(wildcard include/config/generic/lockbreak.h) \\ $(wildcard include/config/preempt.h) \\ include/linux/preempt.h \\ $(wildcard include/config/debug/preempt.h) \\ $(wildcard include/config/preempt/tracer.h) \\ $(wildcard include/config/preempt/count.h) \\ $(wildcard include/config/context/tracking.h) \\ $(wildcard include/config/preempt/notifiers.h) \\ arch/x86/include/asm/preempt.h \\ arch/x86/include/asm/percpu.h \\ $(wildcard include/config/x86/64/smp.h) \\ include/asm-generic/percpu.h \\ $(wildcard include/config/have/setup/per/cpu/area.h) \\ include/linux/threads.h \\ $(wildcard include/config/base/small.h) \\ include/linux/percpu-defs.h \\ $(wildcard include/config/debug/force/weak/per/cpu.h) \\ include/linux/thread_info.h \\ $(wildcard include/config/debug/stack/usage.h) \\ include/linux/bug.h \\ arch/x86/include/asm/bug.h \\ $(wildcard include/config/debug/bugverbose.h) \\ include/asm-generic/bug.h \\ $(wildcard include/config/bug.h) \\ $(wildcard include/config/generic/bug/relative/pointers.h) \\ arch/x86/include/asm/thread_info.h \\ $(wildcard include/config/ia32/emulation.h) \\ arch/x86/include/asm/page.h \\ arch/x86/include/asm/page_64.h \\ $(wildcard include/config/debug/virtual.h) \\ $(wildcard include/config/flatmem.h) \\ $(wildcard include/config/x86/vsyscall/emulation.h) \\ include/linux/range.h \\ include/asm-generic/memory_model.h \\ $(wildcard include/config/discontigmem.h) \\ $(wildcard include/config/sparsemem/vmemmap.h) \\ include/asm-generic/getorder.h \\ arch/x86/include/asm/processor.h \\ $(wildcard include/config/m486.h) \\ $(wildcard include/config/xen.h) \\ arch/x86/include/asm/vm86.h \\ arch/x86/include/uapi/asm/vm86.h \\ arch/x86/include/asm/math_emu.h \\ arch/x86/include/asm/sigcontext.h \\ arch/x86/include/uapi/asm/sigcontext.h \\ arch/x86/include/asm/current.h \\ arch/x86/include/asm/msr.h \\ arch/x86/include/uapi/asm/msr.h \\ arch/x86/include/uapi/asm/msr-index.h \\ include/uapi/linux/ioctl.h \\ arch/x86/include/uapi/asm/ioctl.h \\ include/asm-generic/ioctl.h \\ include/uapi/asm-generic/ioctl.h \\ arch/x86/include/uapi/asm/errno.h \\ include/uapi/asm-generic/errno.h \\ include/uapi/asm-generic/errno-base.h \\ arch/x86/include/asm/cpumask.h \\ include/linux/cpumask.h \\ $(wildcard include/config/cpumask/offstack.h) \\ $(wildcard include/config/hotplug/cpu.h) \\ $(wildcard include/config/debug/per/cpu/maps.h) \\ $(wildcard include/config/disable/obsolete/cpumask/functions.h) \\ include/linux/bitmap.h \\ include/linux/string.h \\ $(wildcard include/config/binary/printf.h) \\ include/uapi/linux/string.h \\ arch/x86/include/asm/string.h \\ arch/x86/include/asm/string_64.h \\ arch/x86/include/asm/paravirt.h \\ arch/x86/include/asm/special_insns.h \\ include/linux/personality.h \\ include/uapi/linux/personality.h \\ include/linux/math64.h \\ $(wildcard include/config/arch/supports/int128.h) \\ arch/x86/include/asm/div64.h \\ include/asm-generic/div64.h \\ include/linux/err.h \\ include/linux/irqflags.h \\ $(wildcard include/config/trace/irqflags.h) \\ $(wildcard include/config/irqsoff/tracer.h) \\ $(wildcard include/config/trace/irqflags/support.h) \\ arch/x86/include/asm/irqflags.h \\ include/linux/atomic.h \\ $(wildcard include/config/arch/has/atomic/or.h) \\ $(wildcard include/config/generic/atomic64.h) \\ arch/x86/include/asm/atomic.h \\ arch/x86/include/asm/cmpxchg.h \\ arch/x86/include/asm/cmpxchg_64.h \\ arch/x86/include/asm/atomic64_64.h \\ include/asm-generic/atomic-long.h \\ include/linux/bottom_half.h \\ include/linux/preempt_mask.h \\ include/linux/spinlock_types.h \\ include/linux/lockdep.h \\ $(wildcard include/config/lockdep.h) \\ $(wildcard include/config/lock/stat.h) \\ $(wildcard include/config/prove/rcu.h) \\ include/linux/rwlock_types.h \\ arch/x86/include/asm/spinlock.h \\ include/linux/jump_label.h \\ $(wildcard include/config/jump/label.h) \\ arch/x86/include/asm/jump_label.h \\ arch/x86/include/asm/qrwlock.h \\ include/asm-generic/qrwlock.h \\ include/linux/rwlock.h \\ include/linux/spinlock_api_smp.h \\ $(wildcard include/config/inline/spin/lock.h) \\ $(wildcard include/config/inline/spin/lock/bh.h) \\ $(wildcard include/config/inline/spin/lock/irq.h) \\ $(wildcard include/config/inline/spin/lock/irqsave.h) \\ $(wildcard include/config/inline/spin/trylock.h) \\ $(wildcard include/config/inline/spin/trylock/bh.h) \\ $(wildcard include/config/uninline/spin/unlock.h) \\ $(wildcard include/config/inline/spin/unlock/bh.h) \\ $(wildcard include/config/inline/spin/unlock/irq.h) \\ $(wildcard include/config/inline/spin/unlock/irqrestore.h) \\ include/linux/rwlock_api_smp.h \\ $(wildcard include/config/inline/read/lock.h) \\ $(wildcard include/config/inline/write/lock.h) \\ $(wildcard include/config/inline/read/lock/bh.h) \\ $(wildcard include/config/inline/write/lock/bh.h) \\ $(wildcard include/config/inline/read/lock/irq.h) \\ $(wildcard include/config/inline/write/lock/irq.h) \\ $(wildcard include/config/inline/read/lock/irqsave.h) \\ $(wildcard include/config/inline/write/lock/irqsave.h) \\ $(wildcard include/config/inline/read/trylock.h) \\ $(wildcard include/config/inline/write/trylock.h) \\ $(wildcard include/config/inline/read/unlock.h) \\ $(wildcard include/config/inline/write/unlock.h) \\ $(wildcard include/config/inline/read/unlock/bh.h) \\ $(wildcard include/config/inline/write/unlock/bh.h) \\ $(wildcard include/config/inline/read/unlock/irq.h) \\ $(wildcard include/config/inline/write/unlock/irq.h) \\ $(wildcard include/config/inline/read/unlock/irqrestore.h) \\ $(wildcard include/config/inline/write/unlock/irqrestore.h) \\ include/linux/time64.h \\ include/uapi/linux/time.h \\ include/linux/uidgid.h \\ $(wildcard include/config/user/ns.h) \\ include/linux/highuid.h \\ include/linux/kmod.h \\ include/linux/gfp.h \\ $(wildcard include/config/numa.h) \\ $(wildcard include/config/highmem.h) \\ $(wildcard include/config/zone/dma.h) \\ $(wildcard include/config/zone/dma32.h) \\ $(wildcard include/config/pm/sleep.h) \\ $(wildcard include/config/cma.h) \\ include/linux/mmdebug.h \\ $(wildcard include/config/debug/vm.h) \\ include/linux/mmzone.h \\ $(wildcard include/config/force/max/zoneorder.h) \\ $(wildcard include/config/memory/isolation.h) \\ $(wildcard include/config/memcg.h) \\ $(wildcard include/config/memory/hotplug.h) \\ $(wildcard include/config/compaction.h) \\ $(wildcard include/config/have/memblock/node/map.h) \\ $(wildcard include/config/flat/node/mem/map.h) \\ $(wildcard include/config/page/extension.h) \\ $(wildcard include/config/no/bootmem.h) \\ $(wildcard include/config/have/memory/present.h) \\ $(wildcard include/config/have/memoryless/nodes.h) \\ $(wildcard include/config/need/node/memmap/size.h) \\ $(wildcard include/config/need/multiple/nodes.h) \\ $(wildcard include/config/have/arch/early/pfn/to/nid.h) \\ $(wildcard include/config/sparsemem/extreme.h) \\ $(wildcard include/config/have/arch/pfn/valid.h) \\ $(wildcard include/config/nodes/span/other/nodes.h) \\ $(wildcard include/config/holes/in/zone.h) \\ $(wildcard include/config/arch/has/holes/memorymodel.h) \\ include/linux/wait.h \\ include/uapi/linux/wait.h \\ include/linux/numa.h \\ $(wildcard include/config/nodes/shift.h) \\ include/linux/nodemask.h \\ $(wildcard include/config/movable/node.h) \\ include/linux/pageblock-flags.h \\ $(wildcard include/config/hugetlb/page.h) \\ $(wildcard include/config/hugetlb/page/size/variable.h) \\ include/linux/page-flags-layout.h \\ include/generated/bounds.h \\ include/linux/memory_hotplug.h \\ $(wildcard include/config/memory/hotremove.h) \\ $(wildcard include/config/have/arch/nodedata/extension.h) \\ $(wildcard include/config/have/bootmem/info/node.h) \\ include/linux/notifier.h \\ include/linux/errno.h \\ include/uapi/linux/errno.h \\ include/linux/mutex.h \\ $(wildcard include/config/debug/mutexes.h) \\ $(wildcard include/config/mutex/spin/on/owner.h) \\ include/linux/osq_lock.h \\ include/linux/rwsem.h \\ $(wildcard include/config/rwsem/spin/on/owner.h) \\ $(wildcard include/config/rwsem/generic/spinlock.h) \\ arch/x86/include/asm/rwsem.h \\ include/linux/srcu.h \\ include/linux/rcupdate.h \\ $(wildcard include/config/tree/rcu.h) \\ $(wildcard include/config/preempt/rcu.h) \\ $(wildcard include/config/rcu/trace.h) \\ $(wildcard include/config/rcu/stall/common.h) \\ $(wildcard include/config/rcu/user/qs.h) \\ $(wildcard include/config/rcu/nocb/cpu.h) \\ $(wildcard include/config/tasks/rcu.h) \\ $(wildcard include/config/tiny/rcu.h) \\ $(wildcard include/config/debug/objects/rcu/head.h) \\ $(wildcard include/config/rcu/boost.h) \\ $(wildcard include/config/rcu/nocb/cpu/all.h) \\ $(wildcard include/config/no/hz/full/sysidle.h) \\ include/linux/completion.h \\ include/linux/debugobjects.h \\ $(wildcard include/config/debug/objects.h) \\ $(wildcard include/config/debug/objects/free.h) \\ include/linux/rcutree.h \\ include/linux/workqueue.h \\ $(wildcard include/config/debug/objects/work.h) \\ $(wildcard include/config/freezer.h) \\ include/linux/timer.h \\ $(wildcard include/config/timer/stats.h) \\ $(wildcard include/config/debug/objects/timers.h) \\ include/linux/ktime.h \\ include/linux/jiffies.h \\ include/linux/timex.h \\ include/uapi/linux/timex.h \\ include/uapi/linux/param.h \\ arch/x86/include/uapi/asm/param.h \\ include/asm-generic/param.h \\ $(wildcard include/config/hz.h) \\ include/uapi/asm-generic/param.h \\ arch/x86/include/asm/timex.h \\ arch/x86/include/asm/tsc.h \\ $(wildcard include/config/x86/tsc.h) \\ include/linux/timekeeping.h \\ arch/x86/include/asm/mmzone.h \\ arch/x86/include/asm/mmzone_64.h \\ arch/x86/include/asm/smp.h \\ $(wildcard include/config/x86/io/apic.h) \\ $(wildcard include/config/x86/32/smp.h) \\ $(wildcard include/config/debug/nmi/selftest.h) \\ arch/x86/include/asm/mpspec.h \\ $(wildcard include/config/eisa.h) \\ $(wildcard include/config/x86/mpparse.h) \\ arch/x86/include/asm/mpspec_def.h \\ arch/x86/include/asm/x86_init.h \\ arch/x86/include/uapi/asm/bootparam.h \\ include/linux/screen_info.h \\ include/uapi/linux/screen_info.h \\ include/linux/apm_bios.h \\ include/uapi/linux/apm_bios.h \\ include/linux/edd.h \\ include/uapi/linux/edd.h \\ arch/x86/include/asm/e820.h \\ $(wildcard include/config/efi.h) \\ $(wildcard include/config/hibernation.h) \\ $(wildcard include/config/memtest.h) \\ arch/x86/include/uapi/asm/e820.h \\ $(wildcard include/config/intel/txt.h) \\ include/linux/ioport.h \\ arch/x86/include/asm/ist.h \\ arch/x86/include/uapi/asm/ist.h \\ include/video/edid.h \\ $(wildcard include/config/x86.h) \\ include/uapi/video/edid.h \\ arch/x86/include/asm/apicdef.h \\ arch/x86/include/asm/apic.h \\ $(wildcard include/config/x86/x2apic.h) \\ include/linux/pm.h \\ $(wildcard include/config/vt/console/sleep.h) \\ $(wildcard include/config/pm.h) \\ $(wildcard include/config/pm/clk.h) \\ $(wildcard include/config/pm/generic/domains.h) \\ arch/x86/include/asm/fixmap.h \\ $(wildcard include/config/paravirt/clock.h) \\ $(wildcard include/config/provide/ohci1394/dma/init.h) \\ $(wildcard include/config/pci/mmconfig.h) \\ $(wildcard include/config/x86/intel/mid.h) \\ arch/x86/include/asm/acpi.h \\ $(wildcard include/config/acpi.h) \\ $(wildcard include/config/acpi/numa.h) \\ include/acpi/pdc_intel.h \\ arch/x86/include/asm/numa.h \\ $(wildcard include/config/numa/emu.h) \\ arch/x86/include/asm/topology.h \\ $(wildcard include/config/x86/ht.h) \\ include/asm-generic/topology.h \\ arch/x86/include/asm/mmu.h \\ arch/x86/include/asm/realmode.h \\ $(wildcard include/config/acpi/sleep.h) \\ arch/x86/include/asm/io.h \\ $(wildcard include/config/mtrr.h) \\ arch/x86/include/generated/asm/early_ioremap.h \\ include/asm-generic/early_ioremap.h \\ $(wildcard include/config/generic/early/ioremap.h) \\ include/asm-generic/iomap.h \\ $(wildcard include/config/has/ioport/map.h) \\ $(wildcard include/config/pci.h) \\ $(wildcard include/config/generic/iomap.h) \\ include/asm-generic/pci_iomap.h \\ $(wildcard include/config/no/generic/pci/ioport/map.h) \\ $(wildcard include/config/generic/pci/iomap.h) \\ include/linux/vmalloc.h \\ include/linux/rbtree.h \\ include/xen/xen.h \\ $(wildcard include/config/xen/dom0.h) \\ $(wildcard include/config/xen/pvh.h) \\ include/xen/interface/xen.h \\ arch/x86/include/asm/xen/interface.h \\ arch/x86/include/asm/xen/interface_64.h \\ arch/x86/include/asm/pvclock-abi.h \\ arch/x86/include/asm/xen/hypervisor.h \\ include/xen/features.h \\ include/xen/interface/features.h \\ arch/x86/include/asm/pvclock.h \\ include/linux/clocksource.h \\ $(wildcard include/config/arch/clocksource/data.h) \\ $(wildcard include/config/clocksource/watchdog.h) \\ $(wildcard include/config/clksrc/of.h) \\ arch/x86/include/asm/clocksource.h \\ arch/x86/include/uapi/asm/vsyscall.h \\ include/asm-generic/fixmap.h \\ arch/x86/include/asm/idle.h \\ arch/x86/include/asm/io_apic.h \\ arch/x86/include/asm/irq_vectors.h \\ $(wildcard include/config/have/kvm.h) \\ include/linux/topology.h \\ $(wildcard include/config/use/percpu/numa/node/id.h) \\ $(wildcard include/config/sched/smt.h) \\ include/linux/smp.h \\ include/linux/llist.h \\ $(wildcard include/config/arch/have/nmi/safe/cmpxchg.h) \\ include/linux/percpu.h \\ $(wildcard include/config/need/per/cpu/embed/first/chunk.h) \\ $(wildcard include/config/need/per/cpu/page/first/chunk.h) \\ include/linux/pfn.h \\ include/linux/sysctl.h \\ $(wildcard include/config/sysctl.h) \\ include/uapi/linux/sysctl.h \\ include/linux/elf.h \\ arch/x86/include/asm/elf.h \\ $(wildcard include/config/x86/x32/abi.h) \\ arch/x86/include/asm/user.h \\ arch/x86/include/asm/user_64.h \\ arch/x86/include/uapi/asm/auxvec.h \\ arch/x86/include/asm/vdso.h \\ $(wildcard include/config/x86/x32.h) \\ include/linux/mm_types.h \\ $(wildcard include/config/split/ptlock/cpus.h) \\ $(wildcard include/config/arch/enable/split/pmd/ptlock.h) \\ $(wildcard include/config/have/cmpxchg/double.h) \\ $(wildcard include/config/have/aligned/struct/page.h) \\ $(wildcard include/config/transparent/hugepage.h) \\ $(wildcard include/config/aio.h) \\ $(wildcard include/config/mmu/notifier.h) \\ include/linux/auxvec.h \\ include/uapi/linux/auxvec.h \\ include/linux/uprobes.h \\ $(wildcard include/config/uprobes.h) \\ arch/x86/include/asm/uprobes.h \\ include/uapi/linux/elf.h \\ include/uapi/linux/elf-em.h \\ include/linux/kobject.h \\ $(wildcard include/config/uevent/helper.h) \\ $(wildcard include/config/debug/kobject/release.h) \\ include/linux/sysfs.h \\ include/linux/kernfs.h \\ $(wildcard include/config/kernfs.h) \\ include/linux/idr.h \\ include/linux/kobject_ns.h \\ include/linux/kref.h \\ include/linux/moduleparam.h \\ $(wildcard include/config/alpha.h) \\ $(wildcard include/config/ia64.h) \\ $(wildcard include/config/ppc64.h) \\ arch/x86/include/asm/module.h \\ $(wildcard include/config/m586.h) \\ $(wildcard include/config/m586tsc.h) \\ $(wildcard include/config/m586mmx.h) \\ $(wildcard include/config/mcore2.h) \\ $(wildcard include/config/m686.h) \\ $(wildcard include/config/mpentiumii.h) \\ $(wildcard include/config/mpentiumiii.h) \\ $(wildcard include/config/mpentiumm.h) \\ $(wildcard include/config/mpentium4.h) \\ $(wildcard include/config/mk6.h) \\ $(wildcard include/config/mk8.h) \\ $(wildcard include/config/melan.h) \\ $(wildcard include/config/mcrusoe.h) \\ $(wildcard include/config/mefficeon.h) \\ $(wildcard include/config/mwinchipc6.h) \\ $(wildcard include/config/mwinchip3d.h) \\ $(wildcard include/config/mcyrixiii.h) \\ $(wildcard include/config/mviac3/2.h) \\ $(wildcard include/config/mviac7.h) \\ $(wildcard include/config/mgeodegx1.h) \\ $(wildcard include/config/mgeode/lx.h) \\ include/asm-generic/module.h \\ $(wildcard include/config/have/mod/arch/specific.h) \\ $(wildcard include/config/modules/use/elf/rel.h) \\ $(wildcard include/config/modules/use/elf/rela.h) \\ include/linux/netlink.h \\ include/linux/capability.h \\ include/uapi/linux/capability.h \\ include/linux/skbuff.h \\ $(wildcard include/config/nf/conntrack.h) \\ $(wildcard include/config/bridge/netfilter.h) \\ $(wildcard include/config/xfrm.h) \\ $(wildcard include/config/ipv6/ndisc/nodetype.h) \\ $(wildcard include/config/net/sched.h) \\ $(wildcard include/config/net/cls/act.h) \\ $(wildcard include/config/net/rx/busy/poll.h) \\ $(wildcard include/config/network/secmark.h) \\ $(wildcard include/config/network/phy/timestamping.h) \\ $(wildcard include/config/netfilter/xt/target/trace.h) \\ $(wildcard include/config/nf/tables.h) \\ include/linux/kmemcheck.h \\ include/linux/net.h \\ include/linux/random.h \\ $(wildcard include/config/arch/random.h) \\ include/uapi/linux/random.h \\ include/linux/irqnr.h \\ include/uapi/linux/irqnr.h \\ arch/x86/include/asm/archrandom.h \\ include/linux/fcntl.h \\ include/uapi/linux/fcntl.h \\ arch/x86/include/uapi/asm/fcntl.h \\ include/uapi/asm-generic/fcntl.h \\ include/uapi/linux/net.h \\ include/linux/textsearch.h \\ include/linux/slab.h \\ $(wildcard include/config/slab/debug.h) \\ $(wildcard include/config/failslab.h) \\ $(wildcard include/config/memcg/kmem.h) \\ $(wildcard include/config/slab.h) \\ $(wildcard include/config/slub.h) \\ $(wildcard include/config/slob.h) \\ include/linux/kmemleak.h \\ $(wildcard include/config/debug/kmemleak.h) \\ include/net/checksum.h \\ arch/x86/include/asm/uaccess.h \\ $(wildcard include/config/x86/intel/usercopy.h) \\ $(wildcard include/config/debug/strict/user/copy/checks.h) \\ arch/x86/include/asm/smap.h \\ $(wildcard include/config/x86/smap.h) \\ arch/x86/include/asm/uaccess_64.h \\ arch/x86/include/asm/checksum.h \\ arch/x86/include/asm/checksum_64.h \\ include/linux/hrtimer.h \\ $(wildcard include/config/high/res/timers.h) \\ $(wildcard include/config/timerfd.h) \\ include/linux/timerqueue.h \\ include/linux/dma-mapping.h \\ $(wildcard include/config/has/dma.h) \\ $(wildcard include/config/arch/has/dma/set/coherent/mask.h) \\ $(wildcard include/config/have/dma/attrs.h) \\ $(wildcard include/config/need/dma/map/state.h) \\ include/linux/device.h \\ $(wildcard include/config/debug/devres.h) \\ $(wildcard include/config/pinctrl.h) \\ $(wildcard include/config/dma/cma.h) \\ $(wildcard include/config/devtmpfs.h) \\ $(wildcard include/config/sysfs/deprecated.h) \\ include/linux/klist.h \\ include/linux/pinctrl/devinfo.h \\ include/linux/pinctrl/consumer.h \\ include/linux/seq_file.h \\ include/linux/pinctrl/pinctrl-state.h \\ include/linux/ratelimit.h \\ arch/x86/include/asm/device.h \\ $(wildcard include/config/x86/dev/dma/ops.h) \\ $(wildcard include/config/intel/iommu.h) \\ $(wildcard include/config/amd/iommu.h) \\ include/linux/pm_wakeup.h \\ include/linux/dma-attrs.h \\ include/linux/dma-direction.h \\ include/linux/scatterlist.h \\ $(wildcard include/config/debug/sg.h) \\ $(wildcard include/config/arch/has/sg/chain.h) \\ include/linux/mm.h \\ $(wildcard include/config/ppc.h) \\ $(wildcard include/config/parisc.h) \\ $(wildcard include/config/metag.h) \\ $(wildcard include/config/stack/growsup.h) \\ $(wildcard include/config/ksm.h) \\ $(wildcard include/config/shmem.h) \\ $(wildcard include/config/debug/vm/rb.h) \\ $(wildcard include/config/debug/pagealloc.h) \\ $(wildcard include/config/hugetlbfs.h) \\ include/linux/debug_locks.h \\ $(wildcard include/config/debug/locking/api/selftests.h) \\ include/linux/bit_spinlock.h \\ include/linux/shrinker.h \\ include/linux/resource.h \\ include/uapi/linux/resource.h \\ arch/x86/include/uapi/asm/resource.h \\ include/asm-generic/resource.h \\ include/uapi/asm-generic/resource.h \\ include/linux/page_ext.h \\ $(wildcard include/config/page/owner.h) \\ include/linux/stacktrace.h \\ $(wildcard include/config/stacktrace.h) \\ $(wildcard include/config/user/stacktrace/support.h) \\ arch/x86/include/asm/pgtable.h \\ $(wildcard include/config/have/arch/soft/dirty.h) \\ arch/x86/include/asm/pgtable_64.h \\ include/asm-generic/pgtable.h \\ include/linux/page-flags.h \\ $(wildcard include/config/pageflags/extended.h) \\ $(wildcard include/config/arch/uses/pg/uncached.h) \\ $(wildcard include/config/memory/failure.h) \\ $(wildcard include/config/swap.h) \\ include/linux/huge_mm.h \\ include/linux/vmstat.h \\ $(wildcard include/config/vm/event/counters.h) \\ $(wildcard include/config/debug/tlbflush.h) \\ $(wildcard include/config/debug/vm/vmacache.h) \\ include/linux/vm_event_item.h \\ $(wildcard include/config/migration.h) \\ $(wildcard include/config/memory/balloon.h) \\ $(wildcard include/config/balloon/compaction.h) \\ arch/x86/include/generated/asm/scatterlist.h \\ include/asm-generic/scatterlist.h \\ $(wildcard include/config/need/sg/dma/length.h) \\ arch/x86/include/asm/dma-mapping.h \\ $(wildcard include/config/isa.h) \\ $(wildcard include/config/x86/dma/remap.h) \\ include/linux/dma-debug.h \\ $(wildcard include/config/dma/api/debug.h) \\ arch/x86/include/asm/swiotlb.h \\ $(wildcard include/config/swiotlb.h) \\ include/linux/swiotlb.h \\ include/asm-generic/dma-coherent.h \\ $(wildcard include/config/have/generic/dma/coherent.h) \\ include/linux/dma-contiguous.h \\ include/asm-generic/dma-mapping-common.h \\ include/linux/netdev_features.h \\ include/linux/sched.h \\ $(wildcard include/config/sched/debug.h) \\ $(wildcard include/config/no/hz/common.h) \\ $(wildcard include/config/lockup/detector.h) \\ $(wildcard include/config/detect/hung/task.h) \\ $(wildcard include/config/core/dump/default/elf/headers.h) \\ $(wildcard include/config/sched/autogroup.h) \\ $(wildcard include/config/virt/cpu/accounting/native.h) \\ $(wildcard include/config/bsd/process/acct.h) \\ $(wildcard include/config/taskstats.h) \\ $(wildcard include/config/audit.h) \\ $(wildcard include/config/cgroups.h) \\ $(wildcard include/config/inotify/user.h) \\ $(wildcard include/config/fanotify.h) \\ $(wildcard include/config/epoll.h) \\ $(wildcard include/config/posix/mqueue.h) \\ $(wildcard include/config/keys.h) \\ $(wildcard include/config/perf/events.h) \\ $(wildcard include/config/schedstats.h) \\ $(wildcard include/config/task/delay/acct.h) \\ $(wildcard include/config/sched/mc.h) \\ $(wildcard include/config/fair/group/sched.h) \\ $(wildcard include/config/rt/group/sched.h) \\ $(wildcard include/config/cgroup/sched.h) \\ $(wildcard include/config/blk/dev/io/trace.h) \\ $(wildcard include/config/compat/brk.h) \\ $(wildcard include/config/virt/cpu/accounting/gen.h) \\ $(wildcard include/config/sysvipc.h) \\ $(wildcard include/config/auditsyscall.h) \\ $(wildcard include/config/rt/mutexes.h) \\ $(wildcard include/config/block.h) \\ $(wildcard include/config/task/xacct.h) \\ $(wildcard include/config/cpusets.h) \\ $(wildcard include/config/futex.h) \\ $(wildcard include/config/fault/injection.h) \\ $(wildcard include/config/latencytop.h) \\ $(wildcard include/config/function/graph/tracer.h) \\ $(wildcard include/config/bcache.h) \\ $(wildcard include/config/have/unstable/sched/clock.h) \\ $(wildcard include/config/irq/time/accounting.h) \\ $(wildcard include/config/no/hz/full.h) \\ include/uapi/linux/sched.h \\ include/linux/sched/prio.h \\ include/linux/plist.h \\ $(wildcard include/config/debug/pi/list.h) \\ include/linux/cputime.h \\ arch/x86/include/generated/asm/cputime.h \\ include/asm-generic/cputime.h \\ $(wildcard include/config/virt/cpu/accounting.h) \\ include/asm-generic/cputime_jiffies.h \\ include/linux/sem.h \\ include/uapi/linux/sem.h \\ include/linux/ipc.h \\ include/uapi/linux/ipc.h \\ arch/x86/include/uapi/asm/ipcbuf.h \\ include/uapi/asm-generic/ipcbuf.h \\ arch/x86/include/uapi/asm/sembuf.h \\ include/linux/shm.h \\ include/uapi/linux/shm.h \\ arch/x86/include/uapi/asm/shmbuf.h \\ include/uapi/asm-generic/shmbuf.h \\ arch/x86/include/asm/shmparam.h \\ include/linux/signal.h \\ $(wildcard include/config/old/sigaction.h) \\ include/uapi/linux/signal.h \\ arch/x86/include/asm/signal.h \\ arch/x86/include/uapi/asm/signal.h \\ include/uapi/asm-generic/signal-defs.h \\ arch/x86/include/uapi/asm/siginfo.h \\ include/asm-generic/siginfo.h \\ include/uapi/asm-generic/siginfo.h \\ include/linux/pid.h \\ include/linux/proportions.h \\ include/linux/percpu_counter.h \\ include/linux/seccomp.h \\ $(wildcard include/config/seccomp.h) \\ $(wildcard include/config/have/arch/seccomp/filter.h) \\ $(wildcard include/config/seccomp/filter.h) \\ include/uapi/linux/seccomp.h \\ arch/x86/include/asm/seccomp.h \\ arch/x86/include/asm/seccomp_64.h \\ include/uapi/linux/unistd.h \\ arch/x86/include/asm/unistd.h \\ arch/x86/include/uapi/asm/unistd.h \\ arch/x86/include/generated/uapi/asm/unistd_64.h \\ arch/x86/include/generated/asm/unistd_64_x32.h \\ arch/x86/include/asm/ia32_unistd.h \\ arch/x86/include/generated/asm/unistd_32_ia32.h \\ include/linux/rculist.h \\ include/linux/rtmutex.h \\ $(wildcard include/config/debug/rt/mutexes.h) \\ include/linux/task_io_accounting.h \\ $(wildcard include/config/task/io/accounting.h) \\ include/linux/latencytop.h \\ include/linux/cred.h \\ $(wildcard include/config/debug/credentials.h) \\ $(wildcard include/config/security.h) \\ include/linux/key.h \\ include/linux/assoc_array.h \\ $(wildcard include/config/associative/array.h) \\ include/linux/selinux.h \\ $(wildcard include/config/security/selinux.h) \\ include/uapi/linux/magic.h \\ include/net/flow_keys.h \\ include/net/scm.h \\ $(wildcard include/config/security/network.h) \\ include/uapi/linux/limits.h \\ include/linux/security.h \\ $(wildcard include/config/fw/loader/user/helper.h) \\ $(wildcard include/config/security/path.h) \\ $(wildcard include/config/security/network/xfrm.h) \\ $(wildcard include/config/securityfs.h) \\ $(wildcard include/config/security/yama.h) \\ include/linux/nsproxy.h \\ include/uapi/linux/netlink.h \\ include/net/sock.h \\ $(wildcard include/config/net.h) \\ $(wildcard include/config/net/ns.h) \\ $(wildcard include/config/ipv6.h) \\ $(wildcard include/config/rps.h) \\ $(wildcard include/config/cgroup/net/prio.h) \\ $(wildcard include/config/inet.h) \\ include/linux/hardirq.h \\ include/linux/ftrace_irq.h \\ $(wildcard include/config/ftrace/nmi/enter.h) \\ include/linux/vtime.h \\ include/linux/context_tracking_state.h \\ include/linux/static_key.h \\ arch/x86/include/asm/hardirq.h \\ $(wildcard include/config/x86/thermal/vector.h) \\ $(wildcard include/config/x86/mce/threshold.h) \\ $(wildcard include/config/hyperv.h) \\ include/linux/irq.h \\ $(wildcard include/config/irq/domain/hierarchy.h) \\ $(wildcard include/config/generic/pending/irq.h) \\ $(wildcard include/config/hardirqs/sw/resend.h) \\ $(wildcard include/config/generic/irq/legacy/alloc/hwirq.h) \\ $(wildcard include/config/generic/irq/legacy.h) \\ include/linux/irqhandler.h \\ include/linux/irqreturn.h \\ include/linux/io.h \\ arch/x86/include/asm/irq.h \\ arch/x86/include/asm/irq_regs.h \\ include/linux/irqdesc.h \\ $(wildcard include/config/irq/preflow/fasteoi.h) \\ $(wildcard include/config/sparse/irq.h) \\ $(wildcard include/config/handle/domain/irq.h) \\ arch/x86/include/asm/hw_irq.h \\ $(wildcard include/config/irq/remap.h) \\ include/linux/profile.h \\ $(wildcard include/config/profiling.h) \\ arch/x86/include/asm/sections.h \\ $(wildcard include/config/debug/rodata.h) \\ include/asm-generic/sections.h \\ include/linux/list_nulls.h \\ include/linux/netdevice.h \\ $(wildcard include/config/dcb.h) \\ $(wildcard include/config/wlan.h) \\ $(wildcard include/config/ax25.h) \\ $(wildcard include/config/mac80211/mesh.h) \\ $(wildcard include/config/net/ipip.h) \\ $(wildcard include/config/net/ipgre.h) \\ $(wildcard include/config/ipv6/sit.h) \\ $(wildcard include/config/ipv6/tunnel.h) \\ $(wildcard include/config/netpoll.h) \\ $(wildcard include/config/xps.h) \\ $(wildcard include/config/bql.h) \\ $(wildcard include/config/rfs/accel.h) \\ $(wildcard include/config/fcoe.h) \\ $(wildcard include/config/net/poll/controller.h) \\ $(wildcard include/config/libfcoe.h) \\ $(wildcard include/config/net/switchdev.h) \\ $(wildcard include/config/wireless/ext.h) \\ $(wildcard include/config/vlan/8021q.h) \\ $(wildcard include/config/net/dsa.h) \\ $(wildcard include/config/tipc.h) \\ $(wildcard include/config/net/flow/limit.h) \\ include/linux/pm_qos.h \\ include/linux/miscdevice.h \\ include/uapi/linux/major.h \\ include/linux/delay.h \\ arch/x86/include/asm/delay.h \\ include/asm-generic/delay.h \\ include/linux/prefetch.h \\ include/linux/dmaengine.h \\ $(wildcard include/config/async/tx/enable/channel/switch.h) \\ $(wildcard include/config/dma/engine.h) \\ $(wildcard include/config/rapidio/dma/engine.h) \\ $(wildcard include/config/async/tx/dma.h) \\ include/linux/dynamic_queue_limits.h \\ include/linux/ethtool.h \\ include/linux/compat.h \\ $(wildcard include/config/compat/old/sigaction.h) \\ $(wildcard include/config/odd/rt/sigaction.h) \\ include/uapi/linux/if.h \\ include/uapi/linux/hdlc/ioctl.h \\ include/linux/fs.h \\ $(wildcard include/config/fs/posix/acl.h) \\ $(wildcard include/config/ima.h) \\ $(wildcard include/config/fsnotify.h) \\ $(wildcard include/config/file/locking.h) \\ $(wildcard include/config/quota.h) \\ $(wildcard include/config/fs/xip.h) \\ include/linux/kdev_t.h \\ include/uapi/linux/kdev_t.h \\ include/linux/dcache.h \\ include/linux/rculist_bl.h \\ include/linux/list_bl.h \\ include/linux/lockref.h \\ $(wildcard include/config/arch/use/cmpxchg/lockref.h) \\ include/linux/path.h \\ include/linux/list_lru.h \\ include/linux/radix-tree.h \\ include/linux/semaphore.h \\ include/uapi/linux/fiemap.h \\ include/linux/migrate_mode.h \\ include/linux/percpu-rwsem.h \\ include/linux/blk_types.h \\ $(wildcard include/config/blk/cgroup.h) \\ $(wildcard include/config/blk/dev/integrity.h) \\ include/uapi/linux/fs.h \\ include/linux/quota.h \\ $(wildcard include/config/quota/netlink/interface.h) \\ include/uapi/linux/dqblk_xfs.h \\ include/linux/dqblk_v1.h \\ include/linux/dqblk_v2.h \\ include/linux/dqblk_qtree.h \\ include/linux/projid.h \\ include/uapi/linux/quota.h \\ include/linux/nfs_fs_i.h \\ include/uapi/linux/aio_abi.h \\ arch/x86/include/asm/compat.h \\ arch/x86/include/asm/user32.h \\ include/uapi/linux/ethtool.h \\ include/linux/if_ether.h \\ include/uapi/linux/if_ether.h \\ include/net/net_namespace.h \\ $(wildcard include/config/ieee802154/6lowpan.h) \\ $(wildcard include/config/ip/sctp.h) \\ $(wildcard include/config/ip/dccp.h) \\ $(wildcard include/config/netfilter.h) \\ $(wildcard include/config/nf/defrag/ipv6.h) \\ $(wildcard include/config/wext/core.h) \\ $(wildcard include/config/ip/vs.h) \\ include/net/flow.h \\ include/linux/in6.h \\ include/uapi/linux/in6.h \\ include/uapi/linux/libc-compat.h \\ include/net/netns/core.h \\ include/net/netns/mib.h \\ $(wildcard include/config/xfrm/statistics.h) \\ include/net/snmp.h \\ include/uapi/linux/snmp.h \\ include/linux/u64_stats_sync.h \\ include/net/netns/unix.h \\ include/net/netns/packet.h \\ include/net/netns/ipv4.h \\ $(wildcard include/config/ip/multiple/tables.h) \\ $(wildcard include/config/ip/route/classid.h) \\ $(wildcard include/config/ip/mroute.h) \\ $(wildcard include/config/ip/mroute/multiple/tables.h) \\ include/net/inet_frag.h \\ include/net/netns/ipv6.h \\ $(wildcard include/config/ipv6/multiple/tables.h) \\ $(wildcard include/config/ipv6/mroute.h) \\ $(wildcard include/config/ipv6/mroute/multiple/tables.h) \\ include/net/dst_ops.h \\ include/net/netns/ieee802154_6lowpan.h \\ include/net/netns/sctp.h \\ include/net/netns/dccp.h \\ include/net/netns/netfilter.h \\ include/linux/proc_fs.h \\ include/linux/netfilter.h \\ $(wildcard include/config/nf/nat/needed.h) \\ include/linux/in.h \\ include/uapi/linux/in.h \\ include/uapi/linux/netfilter.h \\ include/net/netns/x_tables.h \\ $(wildcard include/config/bridge/nf/ebtables.h) \\ include/net/netns/conntrack.h \\ $(wildcard include/config/nf/conntrack/proc/compat.h) \\ $(wildcard include/config/nf/conntrack/events.h) \\ $(wildcard include/config/nf/conntrack/labels.h) \\ include/linux/netfilter/nf_conntrack_tcp.h \\ include/uapi/linux/netfilter/nf_conntrack_tcp.h \\ include/net/netns/nftables.h \\ include/net/netns/xfrm.h \\ include/uapi/linux/xfrm.h \\ include/net/flowcache.h \\ include/linux/interrupt.h \\ $(wildcard include/config/irq/forced/threading.h) \\ $(wildcard include/config/generic/irq/probe.h) \\ include/linux/ns_common.h \\ include/linux/seq_file_net.h \\ include/net/dsa.h \\ $(wildcard include/config/net/dsa/hwmon.h) \\ include/linux/of.h \\ $(wildcard include/config/sparc.h) \\ $(wildcard include/config/of/dynamic.h) \\ $(wildcard include/config/of.h) \\ $(wildcard include/config/attach/node.h) \\ $(wildcard include/config/detach/node.h) \\ $(wildcard include/config/add/property.h) \\ $(wildcard include/config/remove/property.h) \\ $(wildcard include/config/update/property.h) \\ $(wildcard include/config/no/change.h) \\ $(wildcard include/config/change/add.h) \\ $(wildcard include/config/change/remove.h) \\ $(wildcard include/config/of/resolve.h) \\ $(wildcard include/config/of/overlay.h) \\ include/linux/mod_devicetable.h \\ include/linux/uuid.h \\ include/uapi/linux/uuid.h \\ include/linux/property.h \\ include/linux/phy.h \\ include/linux/mii.h \\ include/uapi/linux/mii.h \\ include/linux/phy_fixed.h \\ $(wildcard include/config/fixed/phy.h) \\ include/net/dcbnl.h \\ include/uapi/linux/dcbnl.h \\ include/net/netprio_cgroup.h \\ include/linux/cgroup.h \\ include/uapi/linux/cgroupstats.h \\ include/uapi/linux/taskstats.h \\ include/linux/percpu-refcount.h \\ include/linux/cgroup_subsys.h \\ $(wildcard include/config/cgroup/cpuacct.h) \\ $(wildcard include/config/cgroup/device.h) \\ $(wildcard include/config/cgroup/freezer.h) \\ $(wildcard include/config/cgroup/net/classid.h) \\ $(wildcard include/config/cgroup/perf.h) \\ $(wildcard include/config/cgroup/hugetlb.h) \\ $(wildcard include/config/cgroup/debug.h) \\ include/uapi/linux/neighbour.h \\ include/uapi/linux/netdevice.h \\ include/uapi/linux/if_packet.h \\ include/linux/if_link.h \\ include/uapi/linux/if_link.h \\ include/linux/uaccess.h \\ include/linux/page_counter.h \\ include/linux/memcontrol.h \\ $(wildcard include/config/memcg/swap.h) \\ include/linux/aio.h \\ include/linux/filter.h \\ $(wildcard include/config/bpf/jit.h) \\ arch/x86/include/asm/cacheflush.h \\ $(wildcard include/config/debug/rodata/test.h) \\ include/asm-generic/cacheflush.h \\ include/uapi/linux/filter.h \\ include/uapi/linux/bpf_common.h \\ include/uapi/linux/bpf.h \\ include/linux/rculist_nulls.h \\ include/linux/poll.h \\ include/uapi/linux/poll.h \\ arch/x86/include/uapi/asm/poll.h \\ include/uapi/asm-generic/poll.h \\ include/net/dst.h \\ include/linux/rtnetlink.h \\ include/uapi/linux/rtnetlink.h \\ include/uapi/linux/if_addr.h \\ include/net/neighbour.h \\ include/net/rtnetlink.h \\ include/net/netlink.h \\ include/uapi/linux/net_tstamp.h \\ include/linux/kthread.h \\ include/generated/uapi/linux/version.h \\ /home/liu/openairinterface5g/openair2/NETWORK_DRIVER/UE_IP/local.h \\ include/linux/if_arp.h \\ $(wildcard include/config/firewire/net.h) \\ include/uapi/linux/if_arp.h \\ include/linux/ipv6.h \\ $(wildcard include/config/ipv6/router/pref.h) \\ $(wildcard include/config/ipv6/route/info.h) \\ $(wildcard include/config/ipv6/optimistic/dad.h) \\ $(wildcard include/config/ipv6/mip6.h) \\ $(wildcard include/config/ipv6/subtrees.h) \\ include/uapi/linux/ipv6.h \\ include/linux/icmpv6.h \\ include/uapi/linux/icmpv6.h \\ include/linux/tcp.h \\ $(wildcard include/config/tcp/md5sig.h) \\ include/net/inet_connection_sock.h \\ include/net/inet_sock.h \\ include/linux/jhash.h \\ include/linux/unaligned/packed_struct.h \\ include/net/request_sock.h \\ include/net/netns/hash.h \\ include/net/inet_timewait_sock.h \\ include/net/tcp_states.h \\ include/net/timewait_sock.h \\ include/uapi/linux/tcp.h \\ include/linux/udp.h \\ include/uapi/linux/udp.h \\ include/linux/ip.h \\ include/uapi/linux/ip.h \\ include/linux/icmp.h \\ include/uapi/linux/icmp.h \\ include/net/ndisc.h \\ include/linux/hash.h \\ $(wildcard include/config/arch/has/fast/multiplier.h) \\ /home/liu/openairinterface5g/openair2/NETWORK_DRIVER/UE_IP/constant.h \\ /home/liu/openairinterface5g/targets/COMMON/openairinterface5g_limits.h \\ /home/liu/openairinterface5g/openair2/COMMON/platform_types.h \\ $(wildcard include/config/action/null.h) \\ $(wildcard include/config/action/add.h) \\ $(wildcard include/config/action/remove.h) \\ $(wildcard include/config/action/modify.h) \\ $(wildcard include/config/action/set/security/mode.h) \\ $(wildcard include/config/action/mbms/add.h) \\ $(wildcard include/config/action/mbms/modify.h) \\ /home/liu/openairinterface5g/common/utils/itti/itti_types.h \\ /home/liu/openairinterface5g/openair2/NETWORK_DRIVER/UE_IP/sap.h \\ /home/liu/openairinterface5g/openair2/NETWORK_DRIVER/UE_IP/proto_extern.h \\ /home/liu/openairinterface5g/cmake_targets/oaisim_build_oai/build/CMakeFiles/ue_ip/netlink.o: $(deps_/home/liu/openairinterface5g/cmake_targets/oaisim_build_oai/build/CMakeFiles/ue_ip/netlink.o) $(deps_/home/liu/openairinterface5g/cmake_targets/oaisim_build_oai/build/CMakeFiles/ue_ip/netlink.o): ",16213,True,3988.2277701746825,median "// // PixArt - 10x10 display using NeoPixel LEDs // Author: Dale Low // // Permission is hereby granted, free of charge, to any person obtaining a copy of this software and // associated documentation files (the ""Software""), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: // - The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED ""AS IS"", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES // OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN // CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. // #include Adafruit_NeoPixel leds = Adafruit_NeoPixel(100, 2, NEO_GRB + NEO_KHZ800); #define kGridColorBlue 1 #define kGridColorRed 2 #define kGridColorGreen 3 #define kCodeSmiley 128 #define kCodeTree 129 #define R_COLOUR(rgb) ((rgb >> 16) & 0xFF) #define G_COLOUR(rgb) ((rgb >> 8) & 0xFF) #define B_COLOUR(rgb) ((rgb >> 0) & 0xFF) // display options: #define OPTION_TREE #define OPTION_FIREWORKS #define OPTION_BALLOONS #define OPTION_DOGGY //credit: https://github.com/dhepper/font8x8 /** * 8x8 monochrome bitmap fonts for rendering * Author: Daniel Hepper * * License: Public Domain * * Based on: * // Summary: font8x8.h * // 8x8 monochrome bitmap fonts for rendering * // * // Author: * // Marcel Sondaar * // International Business Machines (public domain VGA fonts) * // * // License: * // Public Domain * * Fetched from: http://dimensionalrift.homelinux.net/combuster/mos3/?p=viewsource&file=/modules/gfx/font8_8.asm **/ // Constant: font8x8_basic // Contains an 8x8 font map for unicode points U+0000 - U+007F (basic latin) static char font8x8_basic[][8] = { // comment out unused chars to save space: // { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0000 (nul) // { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0001 // { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0002 // { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0003 // { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0004 // { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0005 // { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0006 // { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0007 // { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0008 // { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0009 // { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+000A // { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+000B // { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+000C // { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+000D // { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+000E // { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+000F // { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0010 // { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0011 // { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0012 // { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0013 // { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0014 // { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0015 // { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0016 // { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0017 // { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0018 // { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0019 // { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+001A // { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+001B // { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+001C // { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+001D // { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+001E // { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+001F #define kFontBasicOffset 0x20 { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0020 (space) { 0x18, 0x3C, 0x3C, 0x18, 0x18, 0x00, 0x18, 0x00}, // U+0021 (!) { 0x36, 0x36, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0022 ("") { 0x36, 0x36, 0x7F, 0x36, 0x7F, 0x36, 0x36, 0x00}, // U+0023 (#) { 0x0C, 0x3E, 0x03, 0x1E, 0x30, 0x1F, 0x0C, 0x00}, // U+0024 ($) { 0x00, 0x63, 0x33, 0x18, 0x0C, 0x66, 0x63, 0x00}, // U+0025 (%) { 0x1C, 0x36, 0x1C, 0x6E, 0x3B, 0x33, 0x6E, 0x00}, // U+0026 (&) { 0x06, 0x06, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0027 (') { 0x18, 0x0C, 0x06, 0x06, 0x06, 0x0C, 0x18, 0x00}, // U+0028 (() { 0x06, 0x0C, 0x18, 0x18, 0x18, 0x0C, 0x06, 0x00}, // U+0029 ()) { 0x00, 0x66, 0x3C, 0xFF, 0x3C, 0x66, 0x00, 0x00}, // U+002A (*) { 0x00, 0x0C, 0x0C, 0x3F, 0x0C, 0x0C, 0x00, 0x00}, // U+002B (+) { 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x0C, 0x06}, // U+002C (,) { 0x00, 0x00, 0x00, 0x3F, 0x00, 0x00, 0x00, 0x00}, // U+002D (-) { 0x00, 0x00, 0x00, 0x00, 0x00, 0x0C, 0x0C, 0x00}, // U+002E (.) { 0x60, 0x30, 0x18, 0x0C, 0x06, 0x03, 0x01, 0x00}, // U+002F (/) { 0x3E, 0x63, 0x73, 0x7B, 0x6F, 0x67, 0x3E, 0x00}, // U+0030 (0) { 0x0C, 0x0E, 0x0C, 0x0C, 0x0C, 0x0C, 0x3F, 0x00}, // U+0031 (1) { 0x1E, 0x33, 0x30, 0x1C, 0x06, 0x33, 0x3F, 0x00}, // U+0032 (2) { 0x1E, 0x33, 0x30, 0x1C, 0x30, 0x33, 0x1E, 0x00}, // U+0033 (3) { 0x38, 0x3C, 0x36, 0x33, 0x7F, 0x30, 0x78, 0x00}, // U+0034 (4) { 0x3F, 0x03, 0x1F, 0x30, 0x30, 0x33, 0x1E, 0x00}, // U+0035 (5) { 0x1C, 0x06, 0x03, 0x1F, 0x33, 0x33, 0x1E, 0x00}, // U+0036 (6) { 0x3F, 0x33, 0x30, 0x18, 0x0C, 0x0C, 0x0C, 0x00}, // U+0037 (7) { 0x1E, 0x33, 0x33, 0x1E, 0x33, 0x33, 0x1E, 0x00}, // U+0038 (8) { 0x1E, 0x33, 0x33, 0x3E, 0x30, 0x18, 0x0E, 0x00}, // U+0039 (9) { 0x00, 0x0C, 0x0C, 0x00, 0x00, 0x0C, 0x0C, 0x00}, // U+003A (:) { 0x00, 0x0C, 0x0C, 0x00, 0x00, 0x0C, 0x0C, 0x06}, // U+003B (//) { 0x18, 0x0C, 0x06, 0x03, 0x06, 0x0C, 0x18, 0x00}, // U+003C (<) { 0x00, 0x00, 0x3F, 0x00, 0x00, 0x3F, 0x00, 0x00}, // U+003D (=) { 0x06, 0x0C, 0x18, 0x30, 0x18, 0x0C, 0x06, 0x00}, // U+003E (>) { 0x1E, 0x33, 0x30, 0x18, 0x0C, 0x00, 0x0C, 0x00}, // U+003F (?) { 0x3E, 0x63, 0x7B, 0x7B, 0x7B, 0x03, 0x1E, 0x00}, // U+0040 (@) { 0x0C, 0x1E, 0x33, 0x33, 0x3F, 0x33, 0x33, 0x00}, // U+0041 (A) { 0x3F, 0x66, 0x66, 0x3E, 0x66, 0x66, 0x3F, 0x00}, // U+0042 (B) { 0x3C, 0x66, 0x03, 0x03, 0x03, 0x66, 0x3C, 0x00}, // U+0043 (C) { 0x1F, 0x36, 0x66, 0x66, 0x66, 0x36, 0x1F, 0x00}, // U+0044 (D) { 0x7F, 0x46, 0x16, 0x1E, 0x16, 0x46, 0x7F, 0x00}, // U+0045 (E) { 0x7F, 0x46, 0x16, 0x1E, 0x16, 0x06, 0x0F, 0x00}, // U+0046 (F) { 0x3C, 0x66, 0x03, 0x03, 0x73, 0x66, 0x7C, 0x00}, // U+0047 (G) { 0x33, 0x33, 0x33, 0x3F, 0x33, 0x33, 0x33, 0x00}, // U+0048 (H) { 0x1E, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x1E, 0x00}, // U+0049 (I) { 0x78, 0x30, 0x30, 0x30, 0x33, 0x33, 0x1E, 0x00}, // U+004A (J) { 0x67, 0x66, 0x36, 0x1E, 0x36, 0x66, 0x67, 0x00}, // U+004B (K) { 0x0F, 0x06, 0x06, 0x06, 0x46, 0x66, 0x7F, 0x00}, // U+004C (L) { 0x63, 0x77, 0x7F, 0x7F, 0x6B, 0x63, 0x63, 0x00}, // U+004D (M) { 0x63, 0x67, 0x6F, 0x7B, 0x73, 0x63, 0x63, 0x00}, // U+004E (N) { 0x1C, 0x36, 0x63, 0x63, 0x63, 0x36, 0x1C, 0x00}, // U+004F (O) { 0x3F, 0x66, 0x66, 0x3E, 0x06, 0x06, 0x0F, 0x00}, // U+0050 (P) { 0x1E, 0x33, 0x33, 0x33, 0x3B, 0x1E, 0x38, 0x00}, // U+0051 (Q) { 0x3F, 0x66, 0x66, 0x3E, 0x36, 0x66, 0x67, 0x00}, // U+0052 (R) { 0x1E, 0x33, 0x07, 0x0E, 0x38, 0x33, 0x1E, 0x00}, // U+0053 (S) { 0x3F, 0x2D, 0x0C, 0x0C, 0x0C, 0x0C, 0x1E, 0x00}, // U+0054 (T) { 0x33, 0x33, 0x33, 0x33, 0x33, 0x33, 0x3F, 0x00}, // U+0055 (U) { 0x33, 0x33, 0x33, 0x33, 0x33, 0x1E, 0x0C, 0x00}, // U+0056 (V) { 0x63, 0x63, 0x63, 0x6B, 0x7F, 0x77, 0x63, 0x00}, // U+0057 (W) { 0x63, 0x63, 0x36, 0x1C, 0x1C, 0x36, 0x63, 0x00}, // U+0058 (X) { 0x33, 0x33, 0x33, 0x1E, 0x0C, 0x0C, 0x1E, 0x00}, // U+0059 (Y) { 0x7F, 0x63, 0x31, 0x18, 0x4C, 0x66, 0x7F, 0x00}, // U+005A (Z) { 0x1E, 0x06, 0x06, 0x06, 0x06, 0x06, 0x1E, 0x00}, // U+005B ([) { 0x03, 0x06, 0x0C, 0x18, 0x30, 0x60, 0x40, 0x00}, // U+005C (\\) { 0x1E, 0x18, 0x18, 0x18, 0x18, 0x18, 0x1E, 0x00}, // U+005D (]) { 0x08, 0x1C, 0x36, 0x63, 0x00, 0x00, 0x00, 0x00}, // U+005E (^) { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF}, // U+005F (_) { 0x0C, 0x0C, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+0060 (`) { 0x00, 0x00, 0x1E, 0x30, 0x3E, 0x33, 0x6E, 0x00}, // U+0061 (a) { 0x07, 0x06, 0x06, 0x3E, 0x66, 0x66, 0x3B, 0x00}, // U+0062 (b) { 0x00, 0x00, 0x1E, 0x33, 0x03, 0x33, 0x1E, 0x00}, // U+0063 (c) { 0x38, 0x30, 0x30, 0x3e, 0x33, 0x33, 0x6E, 0x00}, // U+0064 (d) { 0x00, 0x00, 0x1E, 0x33, 0x3f, 0x03, 0x1E, 0x00}, // U+0065 (e) { 0x1C, 0x36, 0x06, 0x0f, 0x06, 0x06, 0x0F, 0x00}, // U+0066 (f) { 0x00, 0x00, 0x6E, 0x33, 0x33, 0x3E, 0x30, 0x1F}, // U+0067 (g) { 0x07, 0x06, 0x36, 0x6E, 0x66, 0x66, 0x67, 0x00}, // U+0068 (h) { 0x0C, 0x00, 0x0E, 0x0C, 0x0C, 0x0C, 0x1E, 0x00}, // U+0069 (i) { 0x30, 0x00, 0x30, 0x30, 0x30, 0x33, 0x33, 0x1E}, // U+006A (j) { 0x07, 0x06, 0x66, 0x36, 0x1E, 0x36, 0x67, 0x00}, // U+006B (k) { 0x0E, 0x0C, 0x0C, 0x0C, 0x0C, 0x0C, 0x1E, 0x00}, // U+006C (l) { 0x00, 0x00, 0x33, 0x7F, 0x7F, 0x6B, 0x63, 0x00}, // U+006D (m) { 0x00, 0x00, 0x1F, 0x33, 0x33, 0x33, 0x33, 0x00}, // U+006E (n) { 0x00, 0x00, 0x1E, 0x33, 0x33, 0x33, 0x1E, 0x00}, // U+006F (o) { 0x00, 0x00, 0x3B, 0x66, 0x66, 0x3E, 0x06, 0x0F}, // U+0070 (p) { 0x00, 0x00, 0x6E, 0x33, 0x33, 0x3E, 0x30, 0x78}, // U+0071 (q) { 0x00, 0x00, 0x3B, 0x6E, 0x66, 0x06, 0x0F, 0x00}, // U+0072 (r) { 0x00, 0x00, 0x3E, 0x03, 0x1E, 0x30, 0x1F, 0x00}, // U+0073 (s) { 0x08, 0x0C, 0x3E, 0x0C, 0x0C, 0x2C, 0x18, 0x00}, // U+0074 (t) { 0x00, 0x00, 0x33, 0x33, 0x33, 0x33, 0x6E, 0x00}, // U+0075 (u) { 0x00, 0x00, 0x33, 0x33, 0x33, 0x1E, 0x0C, 0x00}, // U+0076 (v) { 0x00, 0x00, 0x63, 0x6B, 0x7F, 0x7F, 0x36, 0x00}, // U+0077 (w) { 0x00, 0x00, 0x63, 0x36, 0x1C, 0x36, 0x63, 0x00}, // U+0078 (x) { 0x00, 0x00, 0x33, 0x33, 0x33, 0x3E, 0x30, 0x1F}, // U+0079 (y) { 0x00, 0x00, 0x3F, 0x19, 0x0C, 0x26, 0x3F, 0x00}, // U+007A (z) { 0x38, 0x0C, 0x0C, 0x07, 0x0C, 0x0C, 0x38, 0x00}, // U+007B ({) { 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x00}, // U+007C (|) { 0x07, 0x0C, 0x0C, 0x38, 0x0C, 0x0C, 0x07, 0x00}, // U+007D (}) { 0x6E, 0x3B, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+007E (~) { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, // U+007F { 0x24, 0x24, 0x24, 0x00, 0x81, 0x42, 0x3c, 0x00}, // smiley face (128) { 0x10, 0x38, 0x7C, 0x7C, 0xFE, 0xFE, 0x18, 0x3C} // tree (129) }; void clearLEDs() { for (int i=0; i<100; i++) { leds.setPixelColor(i, 0); } leds.show(); } // 0,0 is lower-left corner int getPosFromXY(int x, int y) { if (x < 0 || x > 9 || y < 0 || y > 9) { return 0; } if ((y % 2) == 0) { // even row, x is 0..9 from left to right return y*10 + x; } // odd row, x is 9..0 from left to right return y*10 + (9 - x); } void turnOnLEDsForPixelRow(int y, int pixelRow, int r, int g, int b) { int x; for (x=0; x<8; x++) { if (pixelRow & (1< 9) { *x = 9; } } void showFireworks(int startX, int startY) { clearLEDs(); int x[kRays]; int y[kRays]; for (int ray=0; ray 9) { return -1; } return x; } void showBalloons() { for (int start_x=0; start_x<7; start_x+=2) { for (int start_y=-6; start_y<11; start_y++) { clearLEDs(); for (int y=0; y.png -compress none .ppm"" //skipping: //P3 //10 10 //255 const char string_0[] PROGMEM = ""222 222 222 222 222 222 134 108 82 123 97 66 188 168 141 199 183 161 167 146 121 157 136 110 222 222 222 222 222 222""; const char string_1[] PROGMEM = ""222 222 222 157 129 97 174 147 113 139 110 76 182 157 128 204 187 158 207 199 179 151 129 108 123 102 82 222 222 222""; const char string_2[] PROGMEM = ""107 81 51 146 120 91 116 87 56 96 66 29 131 103 75 168 134 96 174 151 121 172 158 137 81 61 37 19 6 0""; const char string_3[] PROGMEM = ""86 58 22 0 0 0 2 0 0 37 10 0 85 55 26 82 46 12 161 161 161 163 141 113 72 53 31 0 0 0""; const char string_4[] PROGMEM = ""43 15 0 65 40 11 162 153 136 161 142 125 189 172 148 87 67 46 0 0 0 65 37 7 101 75 42 0 0 0""; const char string_5[] PROGMEM = ""76 51 21 207 193 166 0 0 0 0 0 0 0 0 0 202 183 157 112 82 51 87 45 5 86 51 17 2 0 0""; const char string_6[] PROGMEM = ""128 108 76 209 194 172 209 194 172 0 0 0 88 75 65 222 209 184 209 188 158 142 103 61 88 48 10 19 0 0""; const char string_7[] PROGMEM = ""153 136 102 179 166 136 162 153 136 161 142 125 153 136 121 216 201 177 204 187 152 157 121 80 92 51 10 0 0 0""; const char string_8[] PROGMEM = ""97 87 70 137 110 70 0 0 0 0 0 0 0 0 0 191 171 132 188 166 128 161 131 88 88 55 11 0 0 0""; const char string_9[] PROGMEM = ""222 222 222 91 71 46 144 116 80 132 105 72 142 113 71 144 108 61 153 125 81 139 108 67 81 51 16 222 222 222""; const char* const kDoggyPPM[] PROGMEM = { string_0, string_1, string_2, string_3, string_4, string_5, string_6, string_7, string_8, string_9 }; void showDoggy() { char ppmText[3*4*10+1]; // 4 chars/color x 3 colors x 10 pixels int rr[10], gg[10], bb[10]; clearLEDs(); for (int y=0; y<10; y++) { strcpy_P(ppmText, (char*)pgm_read_word(&(kDoggyPPM[y]))); int rc = sscanf(ppmText, ""%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d"", &rr[0], &gg[0], &bb[0], &rr[1], &gg[1], &bb[1], &rr[2], &gg[2], &bb[2], &rr[3], &gg[3], &bb[3], &rr[4], &gg[4], &bb[4], &rr[5], &gg[5], &bb[5], &rr[6], &gg[6], &bb[6], &rr[7], &gg[7], &bb[7], &rr[8], &gg[8], &bb[8], &rr[9], &gg[9], &bb[9]); for (int x=0; x<10; x++) { leds.setPixelColor(getPosFromXY(x, 9-y), rr[x], gg[x], bb[x]); } } leds.show(); } #endif //////////////////////////////////////////////////////////////////////////////// void setup() { leds.begin(); } void loop() { // demo: cycle through all letters // char c; // for (c='A'; c<='Z'; c++) { // showLetter(font8x8_basic[c - kFontBasicOffset]); // delay(200); // } // delay(2000); char *msg = ""Greetings!""; int len = strlen(msg); for (int i=0; i #include // version=1.2.2 Author=Adafruit #include // version=1.1.2 Author=Adafruit #include // version=1.1.2 Author=Adafruit #include ""monochrome_eqbe_logo.h"" // Monochrome eqbe 64 image used in splash screen #include ""monochrome_5x3_symbols.h"" // Monochrome bitmaps for 5x3 numbers and symbols #include ""monochrome_8x8_symbols.h"" // Monochrome bitmaps for 8x8 symbols #include ""small_font_5x3-4pts.h"" // Definition of alternate 5x3-4pts font #include #include #include ""Wire.h"" #include #include // Librairies for sleep mode #include // Librairies for sleep mode #include // Librairies for sleep mode #include // Librairies for sleep mode #include // To store data to EEPROM library /************************************************* * Public Constants *************************************************/ // USER-DEFINED CONFIG SETTINGS AND TUNABLES #define BRIGHTNESS 5 // 0-255 LEDs brightness - default setting #define SHOW_SPLASH_SCREEN 0 // Set to 1 to show splash screen at startup, 0 otherwise #define USE_5X3_FONT 1 // Set to 1 to use small 5pts font instead of standard 7pts #define MAX_REST_TIME 60000 //max waiting time before going to sleep #define MAX_IDLE_TIME 60000 //max waiting time with animation before going to rest #define TILT_LIMIT 20 // Notes used for sounds and tones #define NOTE_B0 31 #define NOTE_C1 33 #define NOTE_CS1 35 #define NOTE_D1 37 #define NOTE_DS1 39 #define NOTE_E1 41 #define NOTE_F1 44 #define NOTE_FS1 46 #define NOTE_G1 49 #define NOTE_GS1 52 #define NOTE_A1 55 #define NOTE_AS1 58 #define NOTE_B1 62 #define NOTE_C2 65 #define NOTE_CS2 69 #define NOTE_D2 73 #define NOTE_DS2 78 #define NOTE_E2 82 #define NOTE_F2 87 #define NOTE_FS2 93 #define NOTE_G2 98 #define NOTE_GS2 104 #define NOTE_A2 110 #define NOTE_AS2 117 #define NOTE_B2 123 #define NOTE_C3 131 #define NOTE_CS3 139 #define NOTE_D3 147 #define NOTE_DS3 156 #define NOTE_E3 165 #define NOTE_F3 175 #define NOTE_FS3 185 #define NOTE_G3 196 #define NOTE_GS3 208 #define NOTE_A3 220 #define NOTE_AS3 233 #define NOTE_B3 247 #define NOTE_C4 262 #define NOTE_CS4 277 #define NOTE_D4 294 #define NOTE_DS4 311 #define NOTE_E4 330 #define NOTE_F4 349 #define NOTE_FS4 370 #define NOTE_G4 392 #define NOTE_GS4 415 #define NOTE_A4 440 #define NOTE_AS4 466 #define NOTE_B4 494 #define NOTE_C5 523 #define NOTE_CS5 554 #define NOTE_D5 587 #define NOTE_DS5 622 #define NOTE_E5 659 #define NOTE_F5 698 #define NOTE_FS5 740 #define NOTE_G5 784 #define NOTE_GS5 831 #define NOTE_A5 880 #define NOTE_AS5 932 #define NOTE_B5 988 #define NOTE_C6 1047 #define NOTE_CS6 1109 #define NOTE_D6 1175 #define NOTE_DS6 1245 #define NOTE_E6 1319 #define NOTE_F6 1397 #define NOTE_FS6 1480 #define NOTE_G6 1568 #define NOTE_GS6 1661 #define NOTE_A6 1760 #define NOTE_AS6 1865 #define NOTE_B6 1976 #define NOTE_C7 2093 #define NOTE_CS7 2217 #define NOTE_D7 2349 #define NOTE_DS7 2489 #define NOTE_E7 2637 #define NOTE_F7 2794 #define NOTE_FS7 2960 #define NOTE_G7 3136 #define NOTE_GS7 3322 #define NOTE_A7 3520 #define NOTE_AS7 3729 #define NOTE_B7 3951 #define NOTE_C8 4186 #define NOTE_CS8 4435 #define NOTE_D8 4699 #define NOTE_DS8 4978 #define CHOICE_OFF 0 //Used to control LEDs #define CHOICE_NONE 0 //Used to check buttons #define CHOICE_RED (1 << 0) #define CHOICE_GREEN (1 << 1) #define CHOICE_BLUE (1 << 2) #define CHOICE_ORANGE (1 << 3) // Hardware pins #define LEDS_PIN 7 // Pin connected to WS2812B data in #define BUILT_IN_LED 13 #define MOSFET_PIN 6 // Pin connected to MOSFET - Must be active to supply power to LEDs #define BUTTON_RED 2 // Is also used to wake-up board from sleep mode #define BUTTON_GREEN 3 #define BUTTON_BLUE 5 #define BUTTON_ORANGE 4 #define MPU_VCC 8 // VCC supply to MPU accelerometer #define BUZZER1 9 // Buzzer pin definitions (the other pin goes to ground) // Define game parameters #define ROUNDS_TO_WIN 13 //Number of rounds to succesfully remember before you win. 13 is do-able. #define ENTRY_TIME_LIMIT 3000 //Amount of time to press a button before game times out. 3000ms = 3 sec #define MODE_MEMORY 0 #define MODE_BATTLE 1 #define MODE_BEEGEES 2 #define BIT(n,i) (n>>i&1) // Function used to read bit i of variable n // Game state variables byte gameMode = MODE_MEMORY; //By default, let's play the memory game byte gameBoard[32]; //Contains the combination of buttons as we advance byte gameRound = 0; //Counts the number of succesful rounds the player has made it through byte gameRecord = 0; //Counts highest score achieved // LED MATRIX VARIABLES DECLARATION OR DEFINITION #define mw 8 // Define matrix width #define mh 8 // Define matrix height // Mapping of matrix rotation setting to be used depending on orientation. Index @ position = orientation. Value @ position = set rotation setting (0, 1,2 0r 3). Default = 2 for Lumivelo2019 int8_t matrix_set_rotation[7]={ 2, 2, 1, 0, 3, 2, 2 }; Adafruit_NeoMatrix *matrix = new Adafruit_NeoMatrix(mw, mh, LEDS_PIN, NEO_MATRIX_TOP + NEO_MATRIX_RIGHT + NEO_MATRIX_COLUMNS + NEO_MATRIX_PROGRESSIVE, NEO_GRB + NEO_KHZ800); // MATRIX DECLARATION: // Color definitions // This could also be defined as matrix->color(255,0,0) but those defines // are meant to work for adafruit_gfx backends that are lacking color() #define LED_BLACK 0 #define LED_RED_VERYLOW (3 << 11) #define LED_RED_LOW (7 << 11) #define LED_RED_MEDIUM (15 << 11) #define LED_RED_HIGH (31 << 11) #define LED_GREEN_VERYLOW (1 << 5) #define LED_GREEN_LOW (15 << 5) #define LED_GREEN_MEDIUM (31 << 5) #define LED_GREEN_HIGH (63 << 5) #define LED_BLUE_VERYLOW 3 #define LED_BLUE_LOW 7 #define LED_BLUE_MEDIUM 15 #define LED_BLUE_HIGH 31 #define LED_ORANGE_VERYLOW (LED_RED_VERYLOW + LED_GREEN_VERYLOW) #define LED_ORANGE_LOW (LED_RED_LOW + LED_GREEN_LOW) #define LED_ORANGE_MEDIUM (LED_RED_MEDIUM + LED_GREEN_MEDIUM) #define LED_ORANGE_HIGH (LED_RED_HIGH + LED_GREEN_HIGH) #define LED_PURPLE_VERYLOW (LED_RED_VERYLOW + LED_BLUE_VERYLOW) #define LED_PURPLE_LOW (LED_RED_LOW + LED_BLUE_LOW) #define LED_PURPLE_MEDIUM (LED_RED_MEDIUM + LED_BLUE_MEDIUM) #define LED_PURPLE_HIGH (LED_RED_HIGH + LED_BLUE_HIGH) #define LED_CYAN_VERYLOW (LED_GREEN_VERYLOW + LED_BLUE_VERYLOW) #define LED_CYAN_LOW (LED_GREEN_LOW + LED_BLUE_LOW) #define LED_CYAN_MEDIUM (LED_GREEN_MEDIUM + LED_BLUE_MEDIUM) #define LED_CYAN_HIGH (LED_GREEN_HIGH + LED_BLUE_HIGH) #define LED_WHITE_VERYLOW (LED_RED_VERYLOW + LED_GREEN_VERYLOW + LED_BLUE_VERYLOW) #define LED_WHITE_LOW (LED_RED_LOW + LED_GREEN_LOW + LED_BLUE_LOW) #define LED_WHITE_MEDIUM (LED_RED_MEDIUM + LED_GREEN_MEDIUM + LED_BLUE_MEDIUM) #define LED_WHITE_HIGH (LED_RED_HIGH + LED_GREEN_HIGH + LED_BLUE_HIGH) // Variables used in CheckAccel() routine MPU6050 accelgyro; int16_t ax, ay, az; int16_t gx, gy, gz; String accel_status=String(""unknown""); RunningMedian a1RollingSample = RunningMedian(5); RunningMedian a2RollingSample = RunningMedian(5); RunningMedian a3RollingSample = RunningMedian(5); int a1_offset=0,a2_offset=0,a3_offset=0; // Offset established during calibration routine and added after to all accelerations to correct for sensor misalignment enum POSITION { NONE, POSITION_1,POSITION_2,POSITION_3,POSITION_4, POSITION_5, POSITION_6, RED_DOWN, BLUE_DOWN, YELLOW_DOWN, GREEN_DOWN, RED_RELEASED, BLUE_RELEASED, YELLOW_RELEASED, GREEN_RELEASED, COUNT }; // Used to detect orientation of the game relative to gravity const char *position[COUNT] = { ""None"", ""POSITION_1"", ""POSITION_2"", ""POSITION_3"", ""POSITION_4"", ""POSITION_5"", ""POSITION_6"",""RED_DOWN"", ""BLUE_DOWN"", ""YELLOW_DOWN"", ""GREEN_DOWN"", ""RED_RELEASED"", ""BLUE_RELEASED"", ""YELLOW_RELEASED"", ""GREEN_RELEASED"" }; uint8_t orientation = NONE, previous_orientation=NONE; float angle_2_horizon=0; int debug_orientation=0; //Definition of various other variables int16_t bmpcolor[] = { LED_GREEN_HIGH, LED_BLUE_HIGH, LED_RED_HIGH }; int16_t morebmpcolor[] = { LED_RED_VERYLOW,LED_RED_LOW,LED_RED_MEDIUM,LED_RED_HIGH,LED_GREEN_VERYLOW,LED_GREEN_LOW,LED_GREEN_MEDIUM,LED_GREEN_HIGH, LED_BLUE_VERYLOW,LED_BLUE_LOW,LED_BLUE_MEDIUM,LED_BLUE_HIGH,LED_ORANGE_VERYLOW,LED_ORANGE_LOW,LED_ORANGE_MEDIUM,LED_ORANGE_HIGH, LED_PURPLE_VERYLOW,LED_PURPLE_LOW,LED_PURPLE_MEDIUM,LED_PURPLE_HIGH,LED_CYAN_VERYLOW,LED_CYAN_LOW,LED_CYAN_MEDIUM,LED_CYAN_HIGH, LED_WHITE_VERYLOW,LED_WHITE_LOW,LED_WHITE_MEDIUM,LED_WHITE_HIGH}; uint8_t y_text_ref= 0; // Reference position used when displaying text on the matrix int Vcc=0; // Variable holding battery voltage in mV unsigned long ref_time=0, start_time=0, current_time=0, elapsed_time=0; // Time references and counters uint16_t menucolor[] = { LED_RED_MEDIUM, LED_BLUE_MEDIUM, LED_ORANGE_MEDIUM, LED_GREEN_MEDIUM}; // Sequence of colors in menu cycles uint16_t menusymbol[] = { 7,8,9,10 }; // Sequence of symbols from monochrome_8x8_symbols.h in menu cycles uint8_t i=0; // general purpose index uint16_t current_color = 0; /*********************************s**************** * Subroutines *************************************************/ void CalibrateAccel(){ // Reads acceleration from MPU6050 at startup to set offsets. // Tunables: // Output values: a1_offset, a2_offset, a3_offset int a1 = 0; int a2 = 0; int a3 = 0; int num_iter=100; for (int i=0; iabs(a3RollingSampleMedian)||abs(a1RollingSampleMedian)>abs(a3RollingSampleMedian)){accel_status=""fallen"";} //if (abs(a2RollingSampleMedian)= TILT_LIMIT && (a3RollingSampleMedian) <= -80 && orientation != BLUE_DOWN) { // Red = down orientation = BLUE_DOWN; debug_orientation=2; } else if (a1RollingSampleMedian >= TILT_LIMIT && (a2RollingSampleMedian) >= TILT_LIMIT && (a3RollingSampleMedian) <= -80 && orientation != YELLOW_DOWN) { // Red = down orientation = YELLOW_DOWN; debug_orientation=3; } else if (a1RollingSampleMedian >= TILT_LIMIT && (a2RollingSampleMedian) <= -TILT_LIMIT && (a3RollingSampleMedian) <= -80 && orientation != GREEN_DOWN) { // Red = down orientation = GREEN_DOWN; debug_orientation=4; } /*else if (a3RollingSampleMedian <= -75 && abs(a1RollingSampleMedian) <= 15 && abs(a2RollingSampleMedian) <= 15 && orientation == RED_DOWN) { // Red = down orientation = RED_RELEASED; debug_orientation=-1; delay (500); } else if (a3RollingSampleMedian <= -75 && abs(a1RollingSampleMedian) <= 15 && abs(a2RollingSampleMedian) <= 15 && orientation == BLUE_DOWN) { // Red = down orientation = BLUE_RELEASED; debug_orientation=-2; delay (500); } else if (a3RollingSampleMedian <= -75 && abs(a1RollingSampleMedian) <= 15 && abs(a2RollingSampleMedian) <= 15 && orientation == YELLOW_DOWN) { // Red = down orientation = YELLOW_RELEASED; delay (500); debug_orientation=-3; } else if (a3RollingSampleMedian <= -75 && abs(a1RollingSampleMedian) <= 15 && abs(a2RollingSampleMedian) <= 15 && orientation == GREEN_DOWN) { // Red = down orientation = GREEN_RELEASED; delay (500); debug_orientation=-4; } */ else if (a1RollingSampleMedian >= 80 && abs(a3RollingSampleMedian) <= 25 && abs(a2RollingSampleMedian) <= 25 && orientation != POSITION_1) { // Red = top right orientation = POSITION_1;} else if (a2RollingSampleMedian >= 80 && abs(a3RollingSampleMedian) <= 25 && abs(a1RollingSampleMedian) <= 25 && orientation != POSITION_2) { // Red = top left orientation = POSITION_2;} else if (a1RollingSampleMedian <= -80 && abs(a3RollingSampleMedian) <= 25 && abs(a2RollingSampleMedian) <= 25 && orientation != POSITION_3) { // Red = bottom left orientation = POSITION_3;} else if (a2RollingSampleMedian <= -80 && abs(a3RollingSampleMedian) <= 25 && abs(a1RollingSampleMedian) <= 25 && orientation != POSITION_4) { // Red = bottom right orientation = POSITION_4;} else if (a3RollingSampleMedian <= -80 && abs(a1RollingSampleMedian) <= 25 && abs(a2RollingSampleMedian) <= 25 && orientation != POSITION_5) { // Red = up orientation = POSITION_5;debug_orientation=0;} else if (a3RollingSampleMedian >= 80 && abs(a1RollingSampleMedian) <= 25 && abs(a2RollingSampleMedian) <= 25 && orientation != POSITION_6) { // Red = down orientation = POSITION_6; } else { // orientation = FACE_NONE; } //Serial.print(""orientation=""); Serial.println(position[orientation]); /* Serial.print(a1RollingSampleMedian); Serial.print("","");Serial.print(a2RollingSampleMedian); Serial.print("","");Serial.print(a3RollingSampleMedian); Serial.print("","");Serial.println(debug_orientation*20); */ angle_2_horizon=atan2(float(a3RollingSampleMedian),float(max(abs(a2RollingSampleMedian),abs(a1RollingSampleMedian))))*180/PI; /* // for debugging Serial.print(""a1:""); Serial.print(a1RollingSampleMedian); Serial.print("" a2:"");// Is also used to wake-up board from sleep mode Serial.print(a2RollingSampleMedian); Serial.print("" a3:""); Serial.print(a3RollingSampleMedian); Serial.print("" - ""); Serial.print(position_stecchino[orientation]); Serial.print("" - ""); Serial.print(accel_status); Serial.print("" - ""); Serial.println(angle_2_horizon); */ return angle_2_horizon; } void display_bitmap(uint8_t bmp_num, uint16_t color){ // Displays 8x8 monochrome images from mono_bmp table matrix->fillRect(0,0, 8,8, LED_BLACK); // Clear the space under the bitmap that will be drawn matrix->drawBitmap(0, 0, mono_bmp[bmp_num], 8, 8, color); matrix->show(); } void display_5x3_font(uint8_t bmp_num, uint16_t color,uint8_t xref, uint8_t yref){ // Displays 5x3 monochrome images or symbols from small_font table matrix->fillRect(xref, yref, xref+3,yref+5, LED_BLACK); // Clear the space under the bitmap that will be drawn matrix->drawBitmap(xref, yref, small_font[bmp_num], 3, 5, color); matrix->show(); } void display_5x3_integer(int number, int color){ // Handles display of numbers made of up to 2 5x3 symbols int tenth=0,unit=0; matrix->fillRect(0,0, 8,8, LED_BLACK); tenth=number/10; unit=number%10; if (tenth>0){ display_5x3_font(tenth, color,1,1); display_5x3_font(unit, color,5,1); } else { display_5x3_font(unit, color,2,1); } } void display_scrolling_text(String message, int16_t rotation,int16_t text_color, int16_t y_pos){ //matrix->clear(); matrix->setTextWrap(false); // we don't wrap text so it scrolls nicely matrix->setTextSize(1); matrix->setRotation(rotation); matrix->setTextColor(text_color); int16_t message_length=message.length(); int16_t font_width; #if USE_5X3_FONT font_width=4; #else font_width=5; #endif for (int16_t x=7; x>=-font_width*message_length; x--) { matrix->clear(); matrix->setCursor(x,y_pos); matrix->print(message); matrix->show(); delay(100); // This delay sets the speed of scrolling text } matrix->fillRect(0,0, 8,8, LED_BLACK); // Matrix is black after text has scrolled completely } long readVcc(){ // Read 1.1V reference against AVcc // set the reference to Vcc and the measurement to the internal 1.1V reference #if defined(__AVR_ATmega32U4__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) ADMUX = _BV(REFS0) | _BV(MUX4) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1); #elif defined (__AVR_ATtiny24__) || defined(__AVR_ATtiny44__) || defined(__AVR_ATtiny84__) ADMUX = _BV(MUX5) | _BV(MUX0); #elif defined (__AVR_ATtiny25__) || defined(__AVR_ATtiny45__) || defined(__AVR_ATtiny85__) ADMUX = _BV(MUX3) | _BV(MUX2); #else ADMUX = _BV(REFS0) | _BV(MUX3) | _BV(MUX2) | _BV(MUX1); #endif delay(2); // Wait for Vref to settle ADCSRA |= _BV(ADSC); // Start conversion while (bit_is_set(ADCSRA,ADSC)); // measuring uint8_t low = ADCL; // must read ADCL first - it then locks ADCH uint8_t high = ADCH; // unlocks both long result = (high<<8) | low; result = 1125300L / result; // Calculate Vcc (in mV); 1125300 = 1.1*1023*1000 return result; // Vcc in millivolts } void showBatteryState(uint16_t currentVCC){ // Use icons and colors to show battery state based on VCC value // Values used to set battery indicator #define LOW_VCC 2700 // lower vcc value when checking battery level #define ALARM_VCC 3000 // VCC level below which the red Battery alarm is shown #define HIGH_VCC 3200 // higher vcc value when checking battery level uint16_t batteryVCC[] = { LOW_VCC,ALARM_VCC,ALARM_VCC,HIGH_VCC,HIGH_VCC }; // Sequence of symbols from monochrome_8x8_symbols.h in battery level display uint16_t batterycolor[] = { LED_RED_MEDIUM, LED_ORANGE_MEDIUM, LED_ORANGE_MEDIUM, LED_GREEN_MEDIUM,LED_GREEN_MEDIUM}; // Sequence of colors in battery level display uint16_t batterysymbol[] = { 0,1,2,3,4 }; // Sequence of symbols from monochrome_8x8_symbols.h in battery level display matrix->fillRect(0,0, 8,8, LED_BLACK); // Matrix is black display_bitmap(batterysymbol[0], batterycolor[0]); delay(300); for (uint8_t i=0; i<5;i++){ if (currentVCC>=batteryVCC[i]){ matrix->fillRect(0,0, 8,8, LED_BLACK); // Matrix is black display_bitmap(batterysymbol[i], batterycolor[i]); delay(100); } } delay (300); matrix->fillRect(0,0, 8,8, LED_BLACK); // Matrix is black } void pinInterrupt(void){ // Used to allow board wake up by button press detachInterrupt(0); } void sleepNow(void){ // Routine to put board to sleep and control actions on waking-up Serial.println(""Starting sleepNow""); // Set pin 2 as interrupt and attach handler: attachInterrupt(0, pinInterrupt, LOW); delay(100); // set_sleep_mode(SLEEP_MODE_PWR_DOWN); // // Set sleep enable (SE) bit: sleep_enable(); // // Put the device to sleep: matrix->fillRect(0,0, 8,8, LED_BLACK); // Clear the matrix matrix->show(); digitalWrite(MOSFET_PIN,LOW); // turn LEDs off to indicate sleep digitalWrite(MPU_VCC, LOW); // Turn off power supply to MPU Serial.println(""Going to sleep... ""); sleep_mode(); // // Upon waking up, sketch continues from this point. sleep_disable(); digitalWrite(MOSFET_PIN,HIGH); // turn LED on to indicate awake digitalWrite(MPU_VCC, HIGH); // Turn on power supply to MPU delay(100); Serial.println(""Restarting... ""); start_time=millis(); // Check battery state and print to serial Vcc=int(readVcc()); Serial.print(""VCC="");Serial.print(Vcc);Serial.println(""mV""); showBatteryState(Vcc); } void setLEDs(byte leds){ // Lights a given LEDs - Pass in a byte that is made up from CHOICE_RED, CHOICE_ORANGE, etc if ((leds & CHOICE_RED) != 0){ matrix->fillTriangle(0,1, 0,5, 2,3,LED_RED_HIGH); matrix->fillTriangle(0,2, 0,6, 2,4,LED_RED_HIGH); } else { matrix->fillTriangle(0,1, 0,5, 2,3,LED_BLACK); matrix->fillTriangle(0,2, 0,6, 2,4,LED_BLACK); } if ((leds & CHOICE_GREEN) != 0){ matrix->fillTriangle(1,0, 5,0, 3,2,LED_GREEN_HIGH); matrix->fillTriangle(2,0, 6,0, 4,2,LED_GREEN_HIGH); } else { matrix->fillTriangle(1,0, 5,0, 3,2,LED_BLACK); matrix->fillTriangle(2,0, 6,0, 4,2,LED_BLACK); } if ((leds & CHOICE_BLUE) != 0){ matrix->fillTriangle(1,7, 5,7, 3,5,LED_BLUE_HIGH); matrix->fillTriangle(2,7, 6,7, 4,5,LED_BLUE_HIGH); } else { matrix->fillTriangle(1,7, 5,7, 3,5,LED_BLACK); matrix->fillTriangle(2,7, 6,7, 4,5,LED_BLACK); } if ((leds & CHOICE_ORANGE) != 0){ matrix->fillTriangle(7,1, 7,5, 5,3,LED_ORANGE_HIGH); matrix->fillTriangle(7,2, 7,6, 5,4,LED_ORANGE_HIGH); } else { matrix->fillTriangle(7,1, 7,5, 5,3,LED_BLACK); matrix->fillTriangle(7,2, 7,6, 5,4,LED_BLACK); } matrix->show(); } byte checkButton(void){ // Returns a '1' bit in the position corresponding to CHOICE_RED, CHOICE_GREEN, etc. //Serial.println(""Starting checkButton""); CheckAccel(); if (digitalRead(BUTTON_RED) == 0 || orientation == RED_RELEASED) return(CHOICE_RED); else if (digitalRead(BUTTON_GREEN) == 0 || orientation == GREEN_RELEASED) return(CHOICE_GREEN); else if (digitalRead(BUTTON_BLUE) == 0 || orientation == BLUE_RELEASED) return(CHOICE_BLUE); else if (digitalRead(BUTTON_ORANGE) == 0 || orientation == YELLOW_RELEASED) return(CHOICE_ORANGE); return(CHOICE_NONE); // If no button is pressed, return none } void buzz_sound(int buzz_length_ms, int buzz_delay_us){ // Toggle buzzer every buzz_delay_us, for a duration of buzz_length_ms. // Convert total play time from milliseconds to microseconds long buzz_length_us = buzz_length_ms * (long)1000; // Loop until the remaining play time is less than a single buzz_delay_us while (buzz_length_us > (buzz_delay_us * 2)) { buzz_length_us -= buzz_delay_us * 2; //Decrease the remaining play time // Toggle the buzzer at various speeds digitalWrite(BUZZER1, LOW); delayMicroseconds(buzz_delay_us); digitalWrite(BUZZER1, HIGH); delayMicroseconds(buzz_delay_us); } digitalWrite(BUZZER1, LOW); // Always power down piezo when sound is finished } void toner(byte which, int buzz_length_ms){ // Light an LED and play tone // Red, upper left: 440Hz - 2.272ms - 1.136ms pulse // Green, upper right: 880Hz - 1.136ms - 0.568ms pulse // Blue, lower left: 587.33Hz - 1.702ms - 0.851ms pulse // ORANGE, lower right: 784Hz - 1.276ms - 0.638ms pulse setLEDs(which); //Turn on a given LED //Play the sound associated with the given LED switch(which) { case CHOICE_RED: buzz_sound(buzz_length_ms, 1136); break; case CHOICE_GREEN: buzz_sound(buzz_length_ms, 568); break; case CHOICE_BLUE: buzz_sound(buzz_length_ms, 851); break; case CHOICE_ORANGE: buzz_sound(buzz_length_ms, 638); break; } setLEDs(CHOICE_OFF); // Turn off all LEDs } byte wait_for_button(void){ Serial.println(""Starting wait_for_button""); // Wait for a button to be pressed. // Returns one of LED colors (LED_RED, etc.) if successful, 0 if timed out long startTime = millis(); // Remember the time we started the this loop while ( (millis() - startTime) < ENTRY_TIME_LIMIT) // Loop until too much time has passed { byte button = checkButton(); if (button != CHOICE_NONE) { toner(button, 150); // Play the button the user just pressed while(checkButton() != CHOICE_NONE) ; // Now let's wait for user to release button delay(10); // This helps with debouncing and accidental double taps return button; } } return CHOICE_NONE; // If we get here, we've timed out! } void winner_sound(void){ // Play the winner sound. Toggle the buzzer at various speeds. for (byte x = 250 ; x > 70 ; x--) { for (byte y = 0 ; y < 3 ; y++) { digitalWrite(BUZZER1, LOW); delayMicroseconds(x); digitalWrite(BUZZER1, HIGH); delayMicroseconds(x); } } digitalWrite(BUZZER1, LOW); // Always power down piezo when sound is finished } void play_winner(void){ // Play the winner sound and lights setLEDs(CHOICE_GREEN | CHOICE_BLUE); winner_sound(); setLEDs(CHOICE_RED | CHOICE_ORANGE); winner_sound(); setLEDs(CHOICE_GREEN | CHOICE_BLUE); winner_sound(); setLEDs(CHOICE_RED | CHOICE_ORANGE); winner_sound(); } void play_loser(void){ // Play the loser sound/lights setLEDs(CHOICE_RED | CHOICE_GREEN); buzz_sound(255, 1500); setLEDs(CHOICE_BLUE | CHOICE_ORANGE); buzz_sound(255, 1500); setLEDs(CHOICE_RED | CHOICE_GREEN); buzz_sound(255, 1500); setLEDs(CHOICE_BLUE | CHOICE_ORANGE); buzz_sound(255, 1500); start_time=millis(); // Reset counter before game goes to sleep mode } void RestMode(void){ // Turn off LEDs to save battery but dont cut LED power supply yet to avoid white flash if user returns before sleep. Send to sleep if wait time is too long. Serial.println(""Starting RestMode""); matrix->fillRect(0,0, 8,8, LED_BLACK); // Clear the matrix matrix->show(); while(1) { if (millis()-start_time>MAX_REST_TIME){sleepNow();} if (checkButton() != CHOICE_NONE){start_time=millis();return;} } } void attractMode(void){ // Show an ""attract mode"" display while waiting for user to press button. Send to sleep if wait time is too long. Serial.println(""Starting attractMode""); while(1) { if (millis()-start_time>MAX_IDLE_TIME){start_time=millis();RestMode();} while(checkButton() != CHOICE_NONE){delay(50);} // Wait that button is released (used if returning from a button-induced wake-up) //for (uint8_t i=0; i<4;i++){ if (millis()-ref_time>=300){ ref_time=millis(); matrix->fillRect(0,0, 8,8, LED_BLACK); // Matrix is black /* i=i+1; if(i==4){i=0;} display_bitmap(menusymbol[i], menucolor[i]); */ for (uint16_t i=0; i<4; i++){ current_color=(current_color+3)%27; matrix->drawRect(i, i, 8-2*i, 8-2*i, morebmpcolor[current_color]); } matrix->show(); } angle_2_horizon=CheckAccel(); if (checkButton() != CHOICE_NONE) return; //} } } void test_tilt(void){ Serial.println(""Starting test_tilt""); while(1) { if (millis()-start_time>MAX_IDLE_TIME){start_time=millis();RestMode();} while(checkButton() != CHOICE_NONE){delay(50);} // Wait that button is released (used if returning from a button-induced wake-up) angle_2_horizon=CheckAccel(); if(orientation!=previous_orientation){ previous_orientation=orientation; if(position[orientation]==""RED_DOWN""){setLEDs(CHOICE_RED);} else if(position[orientation]==""BLUE_DOWN""){setLEDs(CHOICE_BLUE);} else if(position[orientation]==""YELLOW_DOWN""){setLEDs(CHOICE_ORANGE);} else if(position[orientation]==""GREEN_DOWN""){setLEDs(CHOICE_GREEN);} else if(position[orientation]==""POSITION_5""){setLEDs(CHOICE_NONE);} // Turn off LEDs } if (checkButton() != CHOICE_NONE) return; } } void playMoves(void){ // Plays the current contents of the game moves for (byte currentMove = 0 ; currentMove < gameRound ; currentMove++) { toner(gameBoard[currentMove], 150); // Wait some amount of time between button playback // Shorten this to make game harder delay(150); // 150 works well. 75 gets fast. } } void add_to_moves(void){ // Adds a new random button to the game sequence, by sampling the timer byte newButton = random(0, 4); //min (included), max (exluded) // We have to convert this number, 0 to 3, to CHOICEs if(newButton == 0) newButton = CHOICE_RED; else if(newButton == 1) newButton = CHOICE_GREEN; else if(newButton == 2) newButton = CHOICE_BLUE; else if(newButton == 3) newButton = CHOICE_ORANGE; gameBoard[gameRound++] = newButton; // Add this new button to the game array } //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= //The following functions are related to game play only boolean play_memory(void){ // Play the regular memory game // Returns 0 if player loses, or 1 if player wins randomSeed(millis()); // Seed the random generator with random amount of millis() gameRound = 0; // Reset the game to the beginning while (gameRound < ROUNDS_TO_WIN) { add_to_moves(); // Add a button to the current moves, then play them back playMoves(); // Play back the current game board // Then require the player to repeat the sequence. for (byte currentMove = 0 ; currentMove < gameRound ; currentMove++) { byte choice = wait_for_button(); // See what button the user presses if (choice == 0) return false; // If wait timed out, player loses if (choice != gameBoard[currentMove]) return false; // If the choice is incorect, player loses } delay(1000); // Player was correct, delay before playing moves } return true; // Player made it through all the rounds to win! } boolean play_battle(void){ // Play the special 2 player battle mode // A player begins by pressing a button then handing it to the other player // That player repeats the button and adds one, then passes back. // This function returns when someone loses gameRound = 0; // Reset the game frame back to one frame while (1) // Loop until someone fails { byte newButton = wait_for_button(); // Wait for user to input next move gameBoard[gameRound++] = newButton; // Add this new button to the game array // Then require the player to repeat the sequence. for (byte currentMove = 0 ; currentMove < gameRound ; currentMove++) { byte choice = wait_for_button(); if (choice == 0) return false; // If wait timed out, player loses. if (choice != gameBoard[currentMove]) return false; // If the choice is incorect, player loses. } delay(100); // Give the user an extra 100ms to hand the game to the other player } return true; // We should never get here } //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= // The following functions are related to Beegees Easter Egg only int melody[] = { // Notes in the melody. Each note is about an 1/8th note, ""0""s are rests. NOTE_G4, NOTE_A4, 0, NOTE_C5, 0, 0, NOTE_G4, 0, 0, 0, NOTE_E4, 0, NOTE_D4, NOTE_E4, NOTE_G4, 0, NOTE_D4, NOTE_E4, 0, NOTE_G4, 0, 0, NOTE_D4, 0, NOTE_E4, 0, NOTE_G4, 0, NOTE_A4, 0, NOTE_C5, 0}; int noteDuration = 115; // This essentially sets the tempo, 115 is just about right for a disco groove :) int LEDnumber = 0; // Keeps track of which LED we are on during the beegees loop void changeLED(void){ // Each time this function is called the board moves to the next LED setLEDs(1 << LEDnumber); // Change the LED LEDnumber++; // Goto the next LED if(LEDnumber > 3) LEDnumber = 0; // Wrap the counter if needed } void play_beegees(){ // Do nothing but play bad beegees music. This function is activated when user holds bottom right button during power up. //Turn on the bottom right (ORANGE) LED setLEDs(CHOICE_ORANGE); toner(CHOICE_ORANGE, 150); setLEDs(CHOICE_RED | CHOICE_GREEN | CHOICE_BLUE); // Turn on the other LEDs until you release button while(checkButton() != CHOICE_NONE) ; // Wait for user to stop pressing button setLEDs(CHOICE_NONE); // Turn off LEDs delay(1000); // Wait a second before playing song //digitalWrite(BUZZER1, LOW); // setup the ""BUZZER1"" side of the buzzer to stay low, while we play the tone on the other pin. while(checkButton() == CHOICE_NONE) //Play song until you press a button { // iterate over the notes of the melody: for (int thisNote = 0; thisNote < 32; thisNote++) { changeLED(); tone(BUZZER1, melody[thisNote],noteDuration); // to distinguish the notes, set a minimum time between them. // the note's duration + 30% seems to work well: int pauseBetweenNotes = noteDuration * 1.30; delay(pauseBetweenNotes); // stop the tone playing: noTone(BUZZER1); } } } void setup(){ Serial.begin(115200); // Establish serial connection for debugging //Setup hardware inputs/outputs. These pins are defined in the hardware_versions header file //Enable pull ups on inputs to save on resistors! pinMode(BUTTON_RED, INPUT_PULLUP); pinMode(BUTTON_GREEN, INPUT_PULLUP); pinMode(BUTTON_BLUE, INPUT_PULLUP); pinMode(BUTTON_ORANGE, INPUT_PULLUP); pinMode(BUILT_IN_LED, OUTPUT); digitalWrite(BUILT_IN_LED, LOW); // Turn off LED matrix 5V supply pinMode(MOSFET_PIN, OUTPUT); digitalWrite(MOSFET_PIN, HIGH); // Turn on LED matrix 5V supply pinMode(MPU_VCC, OUTPUT); digitalWrite(MPU_VCC, HIGH); // Turn on power supply to MPU //Setup outputs for buzzer pinMode(BUZZER1, OUTPUT); // MPU Wire.begin(); delay(500); accelgyro.initialize(); Serial.println(""Starting MPU... ""); // Initialize LED matrix matrix->setRotation(matrix_set_rotation[0]); // Rotate display accordinly 0, 1, 2 or 3 matrix->begin(); matrix->setTextWrap(false); matrix->setBrightness(BRIGHTNESS); #if USE_5X3_FONT matrix->setFont(&small_5x34pt7b); // Change from default 7pts font to custom 5x3 font y_text_ref =6; # endif # if SHOW_SPLASH_SCREEN for (int8_t x=7; x>=-32; x--) { matrix->fillRect(0,0, 8,8, LED_BLACK); matrix->drawBitmap(x, 0, mono_bmp_32[0], 32, 8, LED_PURPLE_MEDIUM); matrix->show(); delay(200); } display_scrolling_text(""GeaiRareDit "", 2,LED_GREEN_MEDIUM,y_text_ref); matrix->fillRect(0,0, 8,8, LED_BLACK); matrix->show(); # endif matrix->clear(); //winner_sound(); delay(1000); // Check battery state and print to serial Vcc=int(readVcc()); Serial.print(""VCC="");Serial.print(Vcc);Serial.println(""mV""); showBatteryState(Vcc); CalibrateAccel(); //debug angle_2_horizon=CheckAccel(); Serial.println(angle_2_horizon); if (checkButton() != CHOICE_NONE){ display_scrolling_text(String(Vcc), 2,LED_GREEN_MEDIUM,y_text_ref); } // Bit of code to uncomment only when gameRecord counter needs to be resetted //gameRecord=0; //EEPROM.write(1, highByte(gameRecord )); //EEPROM.write(2, lowByte(gameRecord )); //Serial.print(""Value in EEPROM has been resetted to "");Serial.println(gameRecord); //Serial.println(""***************************************************""); gameRecord = word(EEPROM.read(1), EEPROM.read(2)); // Reading Door_opening_counter from EEPROM. Is stored in two variables to allow interger size. Serial.print(""Value stored in EEPROM - As read in Setup routine: ""); Serial.println(gameRecord); Serial.print(""As a binary: ""); for (int i = 15; i >=0; i--){ Serial.print(BIT(gameRecord,i)); } Serial.println(""""); //Mode checking gameMode = MODE_MEMORY; // By default, we're going to play the memory game // Check to see if the lower right button is pressed if (checkButton() == CHOICE_ORANGE) play_beegees(); // Check to see if upper right button is pressed if (checkButton() == CHOICE_GREEN) { gameMode = MODE_BATTLE; //Put game into battle mode //Turn on the upper right (green) LED setLEDs(CHOICE_GREEN); toner(CHOICE_GREEN, 150); setLEDs(CHOICE_RED | CHOICE_BLUE | CHOICE_ORANGE); // Turn on the other LEDs until you release button while(checkButton() != CHOICE_NONE) ; // Wait for user to stop pressing button //Now do nothing. Battle mode will be serviced in the main routine } play_winner(); // After setup is complete, say hello to the world //for (int i=0; i<15;i++){display_5x3_integer(i); delay(2000);} } void loop(){ attractMode(); // Blink lights while waiting for user to press a button //test_tilt(); // Debug routine to check accel readings //display_bitmap(5, bmpcolor[2]); // Indicate the start of game play //setLEDs(CHOICE_RED | CHOICE_GREEN | CHOICE_BLUE | CHOICE_ORANGE); // Turn all LEDs on delay(1000); setLEDs(CHOICE_OFF); // Turn off LEDs delay(250); angle_2_horizon=CheckAccel(); //Serial.println(condition); //if (checkButton() == CHOICE_ORANGE) play_beegees(); if (checkButton() == CHOICE_GREEN) { gameMode = MODE_BATTLE; //Put game into battle mode //Turn on the upper right (green) LED matrix->fillRect(0,0, 8,8, LED_PURPLE_MEDIUM); matrix->show(); toner(CHOICE_GREEN, 150); delay(1000); //matrix->fillRect(0,0, 8,8, LED_BLACK); setLEDs(CHOICE_RED | CHOICE_BLUE | CHOICE_ORANGE); // Turn on the other LEDs until you release button while(checkButton() != CHOICE_NONE) ; // Wait for user to stop pressing button //Now do nothing. Battle mode will be serviced in the main routine } else {gameMode = MODE_MEMORY;} if (gameMode == MODE_MEMORY) { matrix->fillRect(0,0, 8,8, LED_BLACK); // Play memory game and handle result if (play_memory() == true) play_winner(); // Player won, play winner tones else play_loser(); // Player lost, play loser tones for (int i=0; i<4; i++){ matrix->fillRect(0,0, 8,8, LED_BLACK); // Clear the matrix //matrix->setRotation(matrix_set_rotation[i]); // Rotate display accordinly 0, 1, 2 or 3 matrix->setRotation(i); // Rotate display accordinly 0, 1, 2 or 3 display_5x3_integer(gameRound-1,LED_RED_MEDIUM); // Show number of rounds completed successfully delay(1000); } matrix->setRotation(matrix_set_rotation[0]); // Rotate display accordinly 0, 1, 2 or 3 matrix->fillRect(0,0, 8,8, LED_BLACK); // Clear the matrix matrix->show(); if(gameRound-1>gameRecord){ gameRecord=gameRound-1; Serial.print(""gameRecord now updated to: "");Serial.println(gameRecord); EEPROM.write(1, highByte(gameRecord )); EEPROM.write(2, lowByte(gameRecord )); } display_scrolling_text(""Record:"", 2,LED_PURPLE_HIGH,5); for (int i=0; i<4; i++){ matrix->fillRect(0,0, 8,8, LED_BLACK); // Clear the matrix //matrix->setRotation(matrix_set_rotation[i]); // Rotate display accordinly 0, 1, 2 or 3 matrix->setRotation(i); // Rotate display accordinly 0, 1, 2 or 3 display_5x3_integer(gameRecord,LED_PURPLE_HIGH); // Show number of rounds completed successfully delay(1000); } matrix->fillRect(0,0, 8,8, LED_BLACK); // Matrix is black after text has scrolled completely matrix->show(); } if (gameMode == MODE_BATTLE) { play_battle(); // Play game until someone loses play_loser(); // Player lost, play loser tones } start_time=millis(); // for debugging } ",12360,False,1872.7208483529857,median "cmd_drivers/mailbox/zynqmp-ipi-mailbox.o := aarch64-xilinx-linux-gcc -fuse-ld=bfd -fdebug-prefix-map=/home/zw/share/ultra96/mipitest/build/tmp/work/ultra96_zynqmp-xilinx-linux/linux-xlnx/4.19-xilinx-v2019.1+git999-r0=/usr/src/debug/linux-xlnx/4.19-xilinx-v2019.1+git999-r0 -fdebug-prefix-map=/home/zw/share/ultra96/mipitest/build/tmp/work/ultra96_zynqmp-xilinx-linux/linux-xlnx/4.19-xilinx-v2019.1+git999-r0/recipe-sysroot= -fdebug-prefix-map=/home/zw/share/ultra96/mipitest/build/tmp/work/ultra96_zynqmp-xilinx-linux/linux-xlnx/4.19-xilinx-v2019.1+git999-r0/recipe-sysroot-native= -fdebug-prefix-map=/home/zw/share/ultra96/mipitest/build/tmp/work-shared/ultra96-zynqmp/kernel-source=/usr/src/kernel --sysroot=/home/zw/share/ultra96/mipitest/build/tmp/work/ultra96_zynqmp-xilinx-linux/linux-xlnx/4.19-xilinx-v2019.1+git999-r0/recipe-sysroot -Wp,-MD,drivers/mailbox/.zynqmp-ipi-mailbox.o.d -nostdinc -isystem /home/zw/share/ultra96/mipitest/build/tmp/work/ultra96_zynqmp-xilinx-linux/linux-xlnx/4.19-xilinx-v2019.1+git999-r0/recipe-sysroot-native/usr/bin/aarch64-xilinx-linux/../../lib/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/8.2.0/include -I/home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include -I./arch/arm64/include/generated -I/home/zw/share/ultra96/mipitest/linux-xlnx/include -I./include -I/home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi -I./arch/arm64/include/generated/uapi -I/home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi -I./include/generated/uapi -include /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kconfig.h -include /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/compiler_types.h -I/home/zw/share/ultra96/mipitest/linux-xlnx/drivers/mailbox -Idrivers/mailbox -D__KERNEL__ -mlittle-endian -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -DCC_HAVE_ASM_GOTO -mgeneral-regs-only -DCONFIG_AS_LSE=1 -fno-asynchronous-unwind-tables -mabi=lp64 -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-int-in-bool-context -O2 --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -g -Wdeclaration-after-statement -Wno-pointer-sign -Wno-stringop-truncation -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -fmacro-prefix-map=/home/zw/share/ultra96/mipitest/linux-xlnx/= -Wno-packed-not-aligned -DKBUILD_BASENAME='""zynqmp_ipi_mailbox""' -DKBUILD_MODNAME='""zynqmp_ipi_mailbox""' -c -o drivers/mailbox/zynqmp-ipi-mailbox.o /home/zw/share/ultra96/mipitest/linux-xlnx/drivers/mailbox/zynqmp-ipi-mailbox.c source_drivers/mailbox/zynqmp-ipi-mailbox.o := /home/zw/share/ultra96/mipitest/linux-xlnx/drivers/mailbox/zynqmp-ipi-mailbox.c deps_drivers/mailbox/zynqmp-ipi-mailbox.o := \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kconfig.h \\ $(wildcard include/config/cpu/big/endian.h) \\ $(wildcard include/config/booger.h) \\ $(wildcard include/config/foo.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/compiler_types.h \\ $(wildcard include/config/have/arch/compiler/h.h) \\ $(wildcard include/config/enable/must/check.h) \\ $(wildcard include/config/arch/supports/optimized/inlining.h) \\ $(wildcard include/config/optimize/inlining.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/compiler-gcc.h \\ $(wildcard include/config/arch/use/builtin/bswap.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/arm-smccc.h \\ $(wildcard include/config/arm64.h) \\ $(wildcard include/config/arm.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/const.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/linkage.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/compiler_types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/stringify.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/export.h \\ $(wildcard include/config/modules.h) \\ $(wildcard include/config/modversions.h) \\ $(wildcard include/config/module/rel/crcs.h) \\ $(wildcard include/config/have/arch/prel32/relocations.h) \\ $(wildcard include/config/trim/unused/ksyms.h) \\ $(wildcard include/config/unused/symbols.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/compiler.h \\ $(wildcard include/config/trace/branch/profiling.h) \\ $(wildcard include/config/profile/all/branches.h) \\ $(wildcard include/config/stack/validation.h) \\ $(wildcard include/config/kasan.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/types.h \\ arch/arm64/include/generated/uapi/asm/types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/int-ll64.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/int-ll64.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/bitsperlong.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitsperlong.h \\ $(wildcard include/config/64bit.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/bitsperlong.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/posix_types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/stddef.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/stddef.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/posix_types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/posix_types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/barrier.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/barrier.h \\ $(wildcard include/config/smp.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kasan-checks.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/linkage.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/types.h \\ $(wildcard include/config/have/uid16.h) \\ $(wildcard include/config/uid16.h) \\ $(wildcard include/config/lbdaf.h) \\ $(wildcard include/config/arch/dma/addr/t/64bit.h) \\ $(wildcard include/config/phys/addr/t/64bit.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/delay.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kernel.h \\ $(wildcard include/config/preempt/voluntary.h) \\ $(wildcard include/config/debug/atomic/sleep.h) \\ $(wildcard include/config/mmu.h) \\ $(wildcard include/config/prove/locking.h) \\ $(wildcard include/config/arch/has/refcount.h) \\ $(wildcard include/config/panic/timeout.h) \\ $(wildcard include/config/tracing.h) \\ $(wildcard include/config/ftrace/mcount/record.h) \\ /home/zw/share/ultra96/mipitest/build/tmp/work/ultra96_zynqmp-xilinx-linux/linux-xlnx/4.19-xilinx-v2019.1+git999-r0/recipe-sysroot-native/usr/lib/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/8.2.0/include/stdarg.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/bitops.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/bits.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/bitops.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/builtin-__ffs.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/builtin-ffs.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/builtin-__fls.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/builtin-fls.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/ffz.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/fls64.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/find.h \\ $(wildcard include/config/generic/find/first/bit.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/sched.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/hweight.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/arch_hweight.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/const_hweight.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/atomic.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/atomic.h \\ $(wildcard include/config/generic/atomic64.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/atomic.h \\ $(wildcard include/config/arm64/lse/atomics.h) \\ $(wildcard include/config/as/lse.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/lse.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/alternative.h \\ $(wildcard include/config/arm64/uao.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/cpucaps.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/insn.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/init.h \\ $(wildcard include/config/strict/kernel/rwx.h) \\ $(wildcard include/config/strict/module/rwx.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/atomic_lse.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/cmpxchg.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/build_bug.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/atomic-long.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/lock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/non-atomic.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/le.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/byteorder.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/byteorder/little_endian.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/byteorder/little_endian.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/swab.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/swab.h \\ arch/arm64/include/generated/uapi/asm/swab.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/swab.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/byteorder/generic.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/ext2-atomic-setbit.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/log2.h \\ $(wildcard include/config/arch/has/ilog2/u32.h) \\ $(wildcard include/config/arch/has/ilog2/u64.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/typecheck.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/printk.h \\ $(wildcard include/config/message/loglevel/default.h) \\ $(wildcard include/config/console/loglevel/default.h) \\ $(wildcard include/config/console/loglevel/quiet.h) \\ $(wildcard include/config/early/printk.h) \\ $(wildcard include/config/printk/nmi.h) \\ $(wildcard include/config/printk.h) \\ $(wildcard include/config/dynamic/debug.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kern_levels.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/cache.h \\ $(wildcard include/config/arch/has/cache/line/size.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/kernel.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/sysinfo.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/cache.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/cputype.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/sysreg.h \\ $(wildcard include/config/broken/gas/inst.h) \\ $(wildcard include/config/arm64/pa/bits/52.h) \\ $(wildcard include/config/arm64/4k/pages.h) \\ $(wildcard include/config/arm64/16k/pages.h) \\ $(wildcard include/config/arm64/64k/pages.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/compiler.h \\ arch/arm64/include/generated/asm/delay.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/delay.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/device.h \\ $(wildcard include/config/debug/devres.h) \\ $(wildcard include/config/srcu.h) \\ $(wildcard include/config/generic/msi/irq/domain.h) \\ $(wildcard include/config/pinctrl.h) \\ $(wildcard include/config/generic/msi/irq.h) \\ $(wildcard include/config/numa.h) \\ $(wildcard include/config/dma/cma.h) \\ $(wildcard include/config/pm/sleep.h) \\ $(wildcard include/config/of.h) \\ $(wildcard include/config/devtmpfs.h) \\ $(wildcard include/config/sysfs/deprecated.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/ioport.h \\ $(wildcard include/config/memory/hotremove.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kobject.h \\ $(wildcard include/config/uevent/helper.h) \\ $(wildcard include/config/debug/kobject/release.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/list.h \\ $(wildcard include/config/debug/list.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/poison.h \\ $(wildcard include/config/illegal/pointer/value.h) \\ $(wildcard include/config/page/poisoning/zero.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/const.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sysfs.h \\ $(wildcard include/config/debug/lock/alloc.h) \\ $(wildcard include/config/sysfs.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kernfs.h \\ $(wildcard include/config/kernfs.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/err.h \\ arch/arm64/include/generated/uapi/asm/errno.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/errno.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/errno-base.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/mutex.h \\ $(wildcard include/config/mutex/spin/on/owner.h) \\ $(wildcard include/config/debug/mutexes.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/current.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/spinlock_types.h \\ $(wildcard include/config/debug/spinlock.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/spinlock_types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/qspinlock_types.h \\ $(wildcard include/config/paravirt.h) \\ $(wildcard include/config/nr/cpus.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/qrwlock_types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/lockdep.h \\ $(wildcard include/config/lockdep.h) \\ $(wildcard include/config/lock/stat.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rwlock_types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/processor.h \\ $(wildcard include/config/compat.h) \\ $(wildcard include/config/have/hw/breakpoint.h) \\ $(wildcard include/config/gcc/plugin/stackleak.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/string.h \\ $(wildcard include/config/binary/printf.h) \\ $(wildcard include/config/fortify/source.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/string.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/string.h \\ $(wildcard include/config/arch/has/uaccess/flushcache.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/cpufeature.h \\ $(wildcard include/config/arm64/sw/ttbr0/pan.h) \\ $(wildcard include/config/arm64/sve.h) \\ $(wildcard include/config/arm64/ssbd.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/hwcap.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/hwcap.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/bug.h \\ $(wildcard include/config/generic/bug.h) \\ $(wildcard include/config/bug/on/data/corruption.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/bug.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/asm-bug.h \\ $(wildcard include/config/debug/bugverbose.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/brk-imm.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bug.h \\ $(wildcard include/config/bug.h) \\ $(wildcard include/config/generic/bug/relative/pointers.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/jump_label.h \\ $(wildcard include/config/jump/label.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/hw_breakpoint.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/virt.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/ptrace.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/ptrace.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/sigcontext.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/prctl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/ptrace.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/sections.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/sections.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/pgtable-hwdef.h \\ $(wildcard include/config/pgtable/levels.h) \\ $(wildcard include/config/arm64/pa/bits.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/memory.h \\ $(wildcard include/config/arm64/va/bits.h) \\ $(wildcard include/config/vmap/stack.h) \\ $(wildcard include/config/debug/align/rodata.h) \\ $(wildcard include/config/blk/dev/initrd.h) \\ $(wildcard include/config/debug/virtual.h) \\ $(wildcard include/config/sparsemem/vmemmap.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/page-def.h \\ $(wildcard include/config/arm64/page/shift.h) \\ $(wildcard include/config/arm64/cont/shift.h) \\ arch/arm64/include/generated/asm/sizes.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/sizes.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sizes.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/mmdebug.h \\ $(wildcard include/config/debug/vm.h) \\ $(wildcard include/config/debug/vm/pgflags.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/memory_model.h \\ $(wildcard include/config/flatmem.h) \\ $(wildcard include/config/discontigmem.h) \\ $(wildcard include/config/sparsemem.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/pfn.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/fpsimd.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/osq_lock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/debug_locks.h \\ $(wildcard include/config/debug/locking/api/selftests.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/idr.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/radix-tree.h \\ $(wildcard include/config/base/small.h) \\ $(wildcard include/config/radix/tree/multiorder.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/preempt.h \\ $(wildcard include/config/preempt/count.h) \\ $(wildcard include/config/debug/preempt.h) \\ $(wildcard include/config/trace/preempt/toggle.h) \\ $(wildcard include/config/preempt.h) \\ $(wildcard include/config/preempt/notifiers.h) \\ arch/arm64/include/generated/asm/preempt.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/preempt.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/thread_info.h \\ $(wildcard include/config/thread/info/in/task.h) \\ $(wildcard include/config/have/arch/within/stack/frames.h) \\ $(wildcard include/config/hardened/usercopy.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/restart_block.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/time64.h \\ $(wildcard include/config/64bit/time.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/math64.h \\ $(wildcard include/config/arch/supports/int128.h) \\ arch/arm64/include/generated/asm/div64.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/div64.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/time.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/thread_info.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/stack_pointer.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rcupdate.h \\ $(wildcard include/config/preempt/rcu.h) \\ $(wildcard include/config/rcu/stall/common.h) \\ $(wildcard include/config/no/hz/full.h) \\ $(wildcard include/config/rcu/nocb/cpu.h) \\ $(wildcard include/config/tasks/rcu.h) \\ $(wildcard include/config/tree/rcu.h) \\ $(wildcard include/config/tiny/rcu.h) \\ $(wildcard include/config/debug/objects/rcu/head.h) \\ $(wildcard include/config/hotplug/cpu.h) \\ $(wildcard include/config/prove/rcu.h) \\ $(wildcard include/config/rcu/boost.h) \\ $(wildcard include/config/arch/weak/release/acquire.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/irqflags.h \\ $(wildcard include/config/trace/irqflags.h) \\ $(wildcard include/config/irqsoff/tracer.h) \\ $(wildcard include/config/preempt/tracer.h) \\ $(wildcard include/config/trace/irqflags/support.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/irqflags.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/bottom_half.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/cpumask.h \\ $(wildcard include/config/cpumask/offstack.h) \\ $(wildcard include/config/debug/per/cpu/maps.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/threads.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/bitmap.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rcutree.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/spinlock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/spinlock.h \\ arch/arm64/include/generated/asm/qrwlock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/qrwlock.h \\ arch/arm64/include/generated/asm/qspinlock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/qspinlock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rwlock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/spinlock_api_smp.h \\ $(wildcard include/config/inline/spin/lock.h) \\ $(wildcard include/config/inline/spin/lock/bh.h) \\ $(wildcard include/config/inline/spin/lock/irq.h) \\ $(wildcard include/config/inline/spin/lock/irqsave.h) \\ $(wildcard include/config/inline/spin/trylock.h) \\ $(wildcard include/config/inline/spin/trylock/bh.h) \\ $(wildcard include/config/uninline/spin/unlock.h) \\ $(wildcard include/config/inline/spin/unlock/bh.h) \\ $(wildcard include/config/inline/spin/unlock/irq.h) \\ $(wildcard include/config/inline/spin/unlock/irqrestore.h) \\ $(wildcard include/config/generic/lockbreak.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rwlock_api_smp.h \\ $(wildcard include/config/inline/read/lock.h) \\ $(wildcard include/config/inline/write/lock.h) \\ $(wildcard include/config/inline/read/lock/bh.h) \\ $(wildcard include/config/inline/write/lock/bh.h) \\ $(wildcard include/config/inline/read/lock/irq.h) \\ $(wildcard include/config/inline/write/lock/irq.h) \\ $(wildcard include/config/inline/read/lock/irqsave.h) \\ $(wildcard include/config/inline/write/lock/irqsave.h) \\ $(wildcard include/config/inline/read/trylock.h) \\ $(wildcard include/config/inline/write/trylock.h) \\ $(wildcard include/config/inline/read/unlock.h) \\ $(wildcard include/config/inline/write/unlock.h) \\ $(wildcard include/config/inline/read/unlock/bh.h) \\ $(wildcard include/config/inline/write/unlock/bh.h) \\ $(wildcard include/config/inline/read/unlock/irq.h) \\ $(wildcard include/config/inline/write/unlock/irq.h) \\ $(wildcard include/config/inline/read/unlock/irqrestore.h) \\ $(wildcard include/config/inline/write/unlock/irqrestore.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/gfp.h \\ $(wildcard include/config/highmem.h) \\ $(wildcard include/config/zone/dma.h) \\ $(wildcard include/config/zone/dma32.h) \\ $(wildcard include/config/zone/device.h) \\ $(wildcard include/config/memory/isolation.h) \\ $(wildcard include/config/compaction.h) \\ $(wildcard include/config/cma.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/mmzone.h \\ $(wildcard include/config/force/max/zoneorder.h) \\ $(wildcard include/config/zsmalloc.h) \\ $(wildcard include/config/memcg.h) \\ $(wildcard include/config/memory/hotplug.h) \\ $(wildcard include/config/flat/node/mem/map.h) \\ $(wildcard include/config/page/extension.h) \\ $(wildcard include/config/no/bootmem.h) \\ $(wildcard include/config/deferred/struct/page/init.h) \\ $(wildcard include/config/transparent/hugepage.h) \\ $(wildcard include/config/have/memory/present.h) \\ $(wildcard include/config/have/memoryless/nodes.h) \\ $(wildcard include/config/have/memblock/node/map.h) \\ $(wildcard include/config/need/multiple/nodes.h) \\ $(wildcard include/config/have/arch/early/pfn/to/nid.h) \\ $(wildcard include/config/sparsemem/extreme.h) \\ $(wildcard include/config/have/arch/pfn/valid.h) \\ $(wildcard include/config/holes/in/zone.h) \\ $(wildcard include/config/arch/has/holes/memorymodel.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/wait.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/wait.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/numa.h \\ $(wildcard include/config/nodes/shift.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/seqlock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/nodemask.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/pageblock-flags.h \\ $(wildcard include/config/hugetlb/page.h) \\ $(wildcard include/config/hugetlb/page/size/variable.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/page-flags-layout.h \\ $(wildcard include/config/numa/balancing.h) \\ include/generated/bounds.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/sparsemem.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/page.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/personality.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/personality.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/pgtable-types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/pgtable-nopud.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/pgtable-nop4d-hack.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/5level-fixup.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/getorder.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/memory_hotplug.h \\ $(wildcard include/config/arch/has/add/pages.h) \\ $(wildcard include/config/have/arch/nodedata/extension.h) \\ $(wildcard include/config/have/bootmem/info/node.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/notifier.h \\ $(wildcard include/config/tree/srcu.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/errno.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/errno.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rwsem.h \\ $(wildcard include/config/rwsem/spin/on/owner.h) \\ $(wildcard include/config/rwsem/generic/spinlock.h) \\ arch/arm64/include/generated/asm/rwsem.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/rwsem.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/srcu.h \\ $(wildcard include/config/tiny/srcu.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/workqueue.h \\ $(wildcard include/config/debug/objects/work.h) \\ $(wildcard include/config/freezer.h) \\ $(wildcard include/config/wq/watchdog.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/timer.h \\ $(wildcard include/config/debug/objects/timers.h) \\ $(wildcard include/config/no/hz/common.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/ktime.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/time.h \\ $(wildcard include/config/arch/uses/gettimeoffset.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/time32.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/jiffies.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/timex.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/timex.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/param.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/param.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/param.h \\ $(wildcard include/config/hz.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/param.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/timex.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/arch_timer.h \\ $(wildcard include/config/arm/arch/timer/ool/workaround.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/smp.h \\ $(wildcard include/config/up/late/init.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/llist.h \\ $(wildcard include/config/arch/have/nmi/safe/cmpxchg.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/smp.h \\ $(wildcard include/config/arm64/acpi/parking/protocol.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/percpu.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/percpu.h \\ $(wildcard include/config/have/setup/per/cpu/area.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/percpu-defs.h \\ $(wildcard include/config/debug/force/weak/per/cpu.h) \\ $(wildcard include/config/virtualization.h) \\ $(wildcard include/config/amd/mem/encrypt.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/clocksource/arm_arch_timer.h \\ $(wildcard include/config/arm/arch/timer.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/timecounter.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/timex.h \\ include/generated/timeconst.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/timekeeping.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/timekeeping32.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/debugobjects.h \\ $(wildcard include/config/debug/objects.h) \\ $(wildcard include/config/debug/objects/free.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rcu_segcblist.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/srcutree.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rcu_node_tree.h \\ $(wildcard include/config/rcu/fanout.h) \\ $(wildcard include/config/rcu/fanout/leaf.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/completion.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/topology.h \\ $(wildcard include/config/use/percpu/numa/node/id.h) \\ $(wildcard include/config/sched/smt.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/percpu.h \\ $(wildcard include/config/need/per/cpu/embed/first/chunk.h) \\ $(wildcard include/config/need/per/cpu/page/first/chunk.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/topology.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/arch_topology.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/topology.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rbtree.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/uidgid.h \\ $(wildcard include/config/multiuser.h) \\ $(wildcard include/config/user/ns.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/highuid.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kobject_ns.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/stat.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/stat.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/stat.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/stat.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/compat_time.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/compat.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sched.h \\ $(wildcard include/config/virt/cpu/accounting/native.h) \\ $(wildcard include/config/sched/info.h) \\ $(wildcard include/config/schedstats.h) \\ $(wildcard include/config/fair/group/sched.h) \\ $(wildcard include/config/rt/group/sched.h) \\ $(wildcard include/config/cgroup/sched.h) \\ $(wildcard include/config/blk/dev/io/trace.h) \\ $(wildcard include/config/memcg/kmem.h) \\ $(wildcard include/config/compat/brk.h) \\ $(wildcard include/config/cgroups.h) \\ $(wildcard include/config/blk/cgroup.h) \\ $(wildcard include/config/stackprotector.h) \\ $(wildcard include/config/arch/has/scaled/cputime.h) \\ $(wildcard include/config/virt/cpu/accounting/gen.h) \\ $(wildcard include/config/posix/timers.h) \\ $(wildcard include/config/sysvipc.h) \\ $(wildcard include/config/detect/hung/task.h) \\ $(wildcard include/config/auditsyscall.h) \\ $(wildcard include/config/rt/mutexes.h) \\ $(wildcard include/config/ubsan.h) \\ $(wildcard include/config/block.h) \\ $(wildcard include/config/task/xacct.h) \\ $(wildcard include/config/cpusets.h) \\ $(wildcard include/config/intel/rdt.h) \\ $(wildcard include/config/futex.h) \\ $(wildcard include/config/perf/events.h) \\ $(wildcard include/config/rseq.h) \\ $(wildcard include/config/task/delay/acct.h) \\ $(wildcard include/config/fault/injection.h) \\ $(wildcard include/config/latencytop.h) \\ $(wildcard include/config/function/graph/tracer.h) \\ $(wildcard include/config/kcov.h) \\ $(wildcard include/config/uprobes.h) \\ $(wildcard include/config/bcache.h) \\ $(wildcard include/config/livepatch.h) \\ $(wildcard include/config/security.h) \\ $(wildcard include/config/arch/task/struct/on/stack.h) \\ $(wildcard include/config/debug/rseq.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/sched.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/pid.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rculist.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sem.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/sem.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/ipc.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rhashtable-types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/ipc.h \\ arch/arm64/include/generated/uapi/asm/ipcbuf.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/ipcbuf.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/refcount.h \\ $(wildcard include/config/refcount/full.h) \\ arch/arm64/include/generated/uapi/asm/sembuf.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/sembuf.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/shm.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/shm.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/hugetlb_encode.h \\ arch/arm64/include/generated/uapi/asm/shmbuf.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/shmbuf.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/shmparam.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/shmparam.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kcov.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/kcov.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/plist.h \\ $(wildcard include/config/debug/pi/list.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/hrtimer.h \\ $(wildcard include/config/high/res/timers.h) \\ $(wildcard include/config/time/low/res.h) \\ $(wildcard include/config/timerfd.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/timerqueue.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/seccomp.h \\ $(wildcard include/config/seccomp.h) \\ $(wildcard include/config/have/arch/seccomp/filter.h) \\ $(wildcard include/config/seccomp/filter.h) \\ $(wildcard include/config/checkpoint/restore.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/seccomp.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/resource.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/resource.h \\ arch/arm64/include/generated/uapi/asm/resource.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/resource.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/resource.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/latencytop.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sched/prio.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/signal_types.h \\ $(wildcard include/config/old/sigaction.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/signal.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/signal.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/signal.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/signal.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/signal-defs.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/siginfo.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/siginfo.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/mm_types_task.h \\ $(wildcard include/config/arch/want/batched/unmap/tlb/flush.h) \\ $(wildcard include/config/split/ptlock/cpus.h) \\ $(wildcard include/config/arch/enable/split/pmd/ptlock.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/task_io_accounting.h \\ $(wildcard include/config/task/io/accounting.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/rseq.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sched/task_stack.h \\ $(wildcard include/config/stack/growsup.h) \\ $(wildcard include/config/debug/stack/usage.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/magic.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/stat.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kref.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/klist.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/pm.h \\ $(wildcard include/config/vt/console/sleep.h) \\ $(wildcard include/config/pm.h) \\ $(wildcard include/config/pm/clk.h) \\ $(wildcard include/config/pm/generic/domains.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/ratelimit.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/overflow.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/device.h \\ $(wildcard include/config/iommu/api.h) \\ $(wildcard include/config/xen.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/pm_wakeup.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/interrupt.h \\ $(wildcard include/config/irq/forced/threading.h) \\ $(wildcard include/config/generic/irq/probe.h) \\ $(wildcard include/config/proc/fs.h) \\ $(wildcard include/config/irq/timings.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/irqreturn.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/irqnr.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/irqnr.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/hardirq.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/ftrace_irq.h \\ $(wildcard include/config/ftrace/nmi/enter.h) \\ $(wildcard include/config/hwlat/tracer.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/vtime.h \\ $(wildcard include/config/virt/cpu/accounting.h) \\ $(wildcard include/config/irq/time/accounting.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/context_tracking_state.h \\ $(wildcard include/config/context/tracking.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/static_key.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/hardirq.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/irq.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/irq.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/irq_cpustat.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/io.h \\ $(wildcard include/config/have/arch/huge/vmap.h) \\ $(wildcard include/config/has/ioport/map.h) \\ $(wildcard include/config/pci.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/io.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/pgtable.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/proc-fns.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/pgtable-prot.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/fixmap.h \\ $(wildcard include/config/acpi/apei/ghes.h) \\ $(wildcard include/config/unmap/kernel/at/el0.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/boot.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/fixmap.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/mm_types.h \\ $(wildcard include/config/have/aligned/struct/page.h) \\ $(wildcard include/config/userfaultfd.h) \\ $(wildcard include/config/have/arch/compat/mmap/bases.h) \\ $(wildcard include/config/membarrier.h) \\ $(wildcard include/config/aio.h) \\ $(wildcard include/config/mmu/notifier.h) \\ $(wildcard include/config/hmm.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/auxvec.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/auxvec.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/auxvec.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/uprobes.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/mmu.h \\ $(wildcard include/config/harden/branch/predictor.h) \\ $(wildcard include/config/harden/el2/vectors.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/pgtable.h \\ $(wildcard include/config/have/arch/transparent/hugepage/pud.h) \\ $(wildcard include/config/have/arch/soft/dirty.h) \\ $(wildcard include/config/arch/enable/thp/migration.h) \\ $(wildcard include/config/x86/espfix64.h) \\ arch/arm64/include/generated/asm/early_ioremap.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/early_ioremap.h \\ $(wildcard include/config/generic/early/ioremap.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/xen/xen.h \\ $(wildcard include/config/xen/pvh.h) \\ $(wildcard include/config/xen/dom0.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/io.h \\ $(wildcard include/config/generic/iomap.h) \\ $(wildcard include/config/virt/to/bus.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/pci_iomap.h \\ $(wildcard include/config/no/generic/pci/ioport/map.h) \\ $(wildcard include/config/generic/pci/iomap.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/logic_pio.h \\ $(wildcard include/config/indirect/pio.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/fwnode.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/vmalloc.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/mailbox_controller.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/of.h \\ $(wildcard include/config/of/dynamic.h) \\ $(wildcard include/config/sparc.h) \\ $(wildcard include/config/of/promtree.h) \\ $(wildcard include/config/of/kobj.h) \\ $(wildcard include/config/of/numa.h) \\ $(wildcard include/config/of/resolve.h) \\ $(wildcard include/config/of/overlay.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/mod_devicetable.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/uuid.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/uuid.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/property.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/slab.h \\ $(wildcard include/config/debug/slab.h) \\ $(wildcard include/config/failslab.h) \\ $(wildcard include/config/have/hardened/usercopy/allocator.h) \\ $(wildcard include/config/slab.h) \\ $(wildcard include/config/slub.h) \\ $(wildcard include/config/slob.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kasan.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/mailbox/zynqmp-ipi-message.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/module.h \\ $(wildcard include/config/modules/tree/lookup.h) \\ $(wildcard include/config/module/sig.h) \\ $(wildcard include/config/kallsyms.h) \\ $(wildcard include/config/tracepoints.h) \\ $(wildcard include/config/event/tracing.h) \\ $(wildcard include/config/module/unload.h) \\ $(wildcard include/config/constructors.h) \\ $(wildcard include/config/function/error/injection.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kmod.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/umh.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sysctl.h \\ $(wildcard include/config/sysctl.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/sysctl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/elf.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/elf.h \\ arch/arm64/include/generated/asm/user.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/user.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/elf.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/elf-em.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/moduleparam.h \\ $(wildcard include/config/alpha.h) \\ $(wildcard include/config/ia64.h) \\ $(wildcard include/config/ppc64.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rbtree_latch.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/error-injection.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/error-injection.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/tracepoint-defs.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/module.h \\ $(wildcard include/config/arm64/module/plts.h) \\ $(wildcard include/config/dynamic/ftrace.h) \\ $(wildcard include/config/randomize/base.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/module.h \\ $(wildcard include/config/have/mod/arch/specific.h) \\ $(wildcard include/config/modules/use/elf/rel.h) \\ $(wildcard include/config/modules/use/elf/rela.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/of_address.h \\ $(wildcard include/config/of/address.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/of_device.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/cpu.h \\ $(wildcard include/config/pm/sleep/smp.h) \\ $(wildcard include/config/hotplug/smt.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/node.h \\ $(wildcard include/config/memory/hotplug/sparse.h) \\ $(wildcard include/config/hugetlbfs.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/cpuhotplug.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/platform_device.h \\ $(wildcard include/config/suspend.h) \\ $(wildcard include/config/hibernate/callbacks.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/of_platform.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/of_irq.h \\ $(wildcard include/config/ppc32.h) \\ $(wildcard include/config/ppc/pmac.h) \\ $(wildcard include/config/of/irq.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/irq.h \\ $(wildcard include/config/generic/irq/effective/aff/mask.h) \\ $(wildcard include/config/generic/irq/ipi.h) \\ $(wildcard include/config/irq/domain/hierarchy.h) \\ $(wildcard include/config/generic/irq/migration.h) \\ $(wildcard include/config/generic/pending/irq.h) \\ $(wildcard include/config/hardirqs/sw/resend.h) \\ $(wildcard include/config/generic/irq/legacy/alloc/hwirq.h) \\ $(wildcard include/config/generic/irq/legacy.h) \\ $(wildcard include/config/generic/irq/multi/handler.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/irqhandler.h \\ arch/arm64/include/generated/asm/irq_regs.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/irq_regs.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/irqdesc.h \\ $(wildcard include/config/irq/preflow/fasteoi.h) \\ $(wildcard include/config/generic/irq/debugfs.h) \\ $(wildcard include/config/sparse/irq.h) \\ $(wildcard include/config/handle/domain/irq.h) \\ arch/arm64/include/generated/asm/hw_irq.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/hw_irq.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/irqdomain.h \\ $(wildcard include/config/irq/domain.h) \\ drivers/mailbox/zynqmp-ipi-mailbox.o: $(deps_drivers/mailbox/zynqmp-ipi-mailbox.o) $(deps_drivers/mailbox/zynqmp-ipi-mailbox.o): ",16262,True,5284.303142889732,median "cmd_/home/zrd/openvswitch-2.5.0/datapath/linux/gre.o := gcc -Wp,-MD,/home/zrd/openvswitch-2.5.0/datapath/linux/.gre.o.d -nostdinc -isystem /usr/lib/gcc/i686-linux-gnu/5/include -I/home/zrd/openvswitch-2.5.0/include -I/home/zrd/openvswitch-2.5.0/datapath/linux/compat -I/home/zrd/openvswitch-2.5.0/datapath/linux/compat/include -I./arch/x86/include -Iarch/x86/include/generated/uapi -Iarch/x86/include/generated -Iinclude -I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -Iubuntu/include -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -m32 -msoft-float -mregparm=3 -freg-struct-return -fno-pic -mpreferred-stack-boundary=2 -march=i686 -mtune=generic -maccumulate-outgoing-args -Wa,-mtune=generic32 -ffreestanding -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -fno-delete-null-pointer-checks -O2 --param=allow-store-data-races=0 -Wframe-larger-than=1024 -fstack-protector-strong -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -pg -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -DCC_HAVE_ASM_GOTO -DVERSION=\\""2.5.0\\"" -I/home/zrd/openvswitch-2.5.0/datapath/linux/.. -I/home/zrd/openvswitch-2.5.0/datapath/linux/.. -g -include /home/zrd/openvswitch-2.5.0/datapath/linux/kcompat.h -DMODULE -D""KBUILD_STR(s)=\\#s"" -D""KBUILD_BASENAME=KBUILD_STR(gre)"" -D""KBUILD_MODNAME=KBUILD_STR(openvswitch)"" -c -o /home/zrd/openvswitch-2.5.0/datapath/linux/.tmp_gre.o /home/zrd/openvswitch-2.5.0/datapath/linux/gre.c source_/home/zrd/openvswitch-2.5.0/datapath/linux/gre.o := /home/zrd/openvswitch-2.5.0/datapath/linux/gre.c deps_/home/zrd/openvswitch-2.5.0/datapath/linux/gre.o := \\ $(wildcard include/config/net/ipgre/demux.h) \\ /home/zrd/openvswitch-2.5.0/datapath/linux/kcompat.h \\ include/generated/uapi/linux/version.h \\ include/linux/module.h \\ $(wildcard include/config/modules.h) \\ $(wildcard include/config/sysfs.h) \\ $(wildcard include/config/unused/symbols.h) \\ $(wildcard include/config/module/sig.h) \\ $(wildcard include/config/modules/tree/lookup.h) \\ $(wildcard include/config/generic/bug.h) \\ $(wildcard include/config/kallsyms.h) \\ $(wildcard include/config/smp.h) \\ $(wildcard include/config/tracepoints.h) \\ $(wildcard include/config/tracing.h) \\ $(wildcard include/config/event/tracing.h) \\ $(wildcard include/config/ftrace/mcount/record.h) \\ $(wildcard include/config/livepatch.h) \\ $(wildcard include/config/module/unload.h) \\ $(wildcard include/config/constructors.h) \\ $(wildcard include/config/debug/set/module/ronx.h) \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/list.h \\ include/linux/list.h \\ $(wildcard include/config/debug/list.h) \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/types.h \\ include/linux/types.h \\ $(wildcard include/config/uid16.h) \\ $(wildcard include/config/lbdaf.h) \\ $(wildcard include/config/arch/dma/addr/t/64bit.h) \\ $(wildcard include/config/phys/addr/t/64bit.h) \\ $(wildcard include/config/64bit.h) \\ include/uapi/linux/types.h \\ arch/x86/include/uapi/asm/types.h \\ include/uapi/asm-generic/types.h \\ include/asm-generic/int-ll64.h \\ include/uapi/asm-generic/int-ll64.h \\ arch/x86/include/uapi/asm/bitsperlong.h \\ include/asm-generic/bitsperlong.h \\ include/uapi/asm-generic/bitsperlong.h \\ include/uapi/linux/posix_types.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/stddef.h \\ include/linux/stddef.h \\ include/uapi/linux/stddef.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/compiler.h \\ include/linux/compiler.h \\ $(wildcard include/config/sparse/rcu/pointer.h) \\ $(wildcard include/config/trace/branch/profiling.h) \\ $(wildcard include/config/profile/all/branches.h) \\ $(wildcard include/config/enable/must/check.h) \\ $(wildcard include/config/enable/warn/deprecated.h) \\ $(wildcard include/config/kprobes.h) \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/compiler-gcc.h \\ include/linux/compiler-gcc.h \\ $(wildcard include/config/arch/supports/optimized/inlining.h) \\ $(wildcard include/config/optimize/inlining.h) \\ $(wildcard include/config/gcov/kernel.h) \\ $(wildcard include/config/arch/use/builtin/bswap.h) \\ arch/x86/include/asm/posix_types.h \\ $(wildcard include/config/x86/32.h) \\ arch/x86/include/uapi/asm/posix_types_32.h \\ include/uapi/asm-generic/posix_types.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/poison.h \\ include/linux/poison.h \\ $(wildcard include/config/illegal/pointer/value.h) \\ include/uapi/linux/const.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/kernel.h \\ include/linux/kernel.h \\ $(wildcard include/config/preempt/voluntary.h) \\ $(wildcard include/config/debug/atomic/sleep.h) \\ $(wildcard include/config/mmu.h) \\ $(wildcard include/config/prove/locking.h) \\ $(wildcard include/config/panic/timeout.h) \\ /usr/lib/gcc/i686-linux-gnu/5/include/stdarg.h \\ include/linux/linkage.h \\ include/linux/stringify.h \\ include/linux/export.h \\ $(wildcard include/config/have/underscore/symbol/prefix.h) \\ $(wildcard include/config/modversions.h) \\ arch/x86/include/asm/linkage.h \\ $(wildcard include/config/x86/64.h) \\ $(wildcard include/config/x86/alignment/16.h) \\ include/linux/bitops.h \\ arch/x86/include/asm/bitops.h \\ $(wildcard include/config/x86/cmov.h) \\ arch/x86/include/asm/alternative.h \\ $(wildcard include/config/paravirt.h) \\ arch/x86/include/asm/asm.h \\ arch/x86/include/asm/ptrace.h \\ $(wildcard include/config/x86/debugctlmsr.h) \\ arch/x86/include/asm/segment.h \\ $(wildcard include/config/cc/stackprotector.h) \\ $(wildcard include/config/x86/32/lazy/gs.h) \\ arch/x86/include/asm/page_types.h \\ $(wildcard include/config/physical/start.h) \\ $(wildcard include/config/physical/align.h) \\ arch/x86/include/asm/page_32_types.h \\ $(wildcard include/config/highmem4g.h) \\ $(wildcard include/config/highmem64g.h) \\ $(wildcard include/config/page/offset.h) \\ $(wildcard include/config/x86/pae.h) \\ arch/x86/include/uapi/asm/ptrace.h \\ arch/x86/include/uapi/asm/ptrace-abi.h \\ arch/x86/include/asm/processor-flags.h \\ $(wildcard include/config/vm86.h) \\ arch/x86/include/uapi/asm/processor-flags.h \\ arch/x86/include/asm/paravirt_types.h \\ $(wildcard include/config/x86/local/apic.h) \\ $(wildcard include/config/pgtable/levels.h) \\ $(wildcard include/config/queued/spinlocks.h) \\ $(wildcard include/config/paravirt/debug.h) \\ arch/x86/include/asm/desc_defs.h \\ arch/x86/include/asm/kmap_types.h \\ $(wildcard include/config/debug/highmem.h) \\ include/asm-generic/kmap_types.h \\ arch/x86/include/asm/pgtable_types.h \\ $(wildcard include/config/kmemcheck.h) \\ $(wildcard include/config/mem/soft/dirty.h) \\ $(wildcard include/config/proc/fs.h) \\ arch/x86/include/asm/pgtable_32_types.h \\ $(wildcard include/config/highmem.h) \\ arch/x86/include/asm/pgtable-3level_types.h \\ include/asm-generic/pgtable-nopud.h \\ arch/x86/include/asm/spinlock_types.h \\ $(wildcard include/config/paravirt/spinlocks.h) \\ $(wildcard include/config/nr/cpus.h) \\ include/asm-generic/qspinlock_types.h \\ include/asm-generic/qrwlock_types.h \\ include/asm-generic/ptrace.h \\ arch/x86/include/asm/cpufeature.h \\ $(wildcard include/config/x86/feature/names.h) \\ $(wildcard include/config/x86/debug/static/cpu/has.h) \\ arch/x86/include/asm/required-features.h \\ $(wildcard include/config/x86/minimum/cpu/family.h) \\ $(wildcard include/config/math/emulation.h) \\ $(wildcard include/config/x86/cmpxchg64.h) \\ $(wildcard include/config/x86/use/3dnow.h) \\ $(wildcard include/config/x86/p6/nop.h) \\ $(wildcard include/config/matom.h) \\ arch/x86/include/asm/disabled-features.h \\ $(wildcard include/config/x86/intel/mpx.h) \\ arch/x86/include/asm/rmwcc.h \\ arch/x86/include/asm/barrier.h \\ $(wildcard include/config/x86/ppro/fence.h) \\ arch/x86/include/asm/nops.h \\ $(wildcard include/config/mk7.h) \\ include/asm-generic/bitops/fls64.h \\ include/asm-generic/bitops/find.h \\ $(wildcard include/config/generic/find/first/bit.h) \\ include/asm-generic/bitops/sched.h \\ arch/x86/include/asm/arch_hweight.h \\ include/asm-generic/bitops/const_hweight.h \\ include/asm-generic/bitops/le.h \\ arch/x86/include/uapi/asm/byteorder.h \\ include/linux/byteorder/little_endian.h \\ include/uapi/linux/byteorder/little_endian.h \\ include/linux/swab.h \\ include/uapi/linux/swab.h \\ arch/x86/include/uapi/asm/swab.h \\ include/linux/byteorder/generic.h \\ include/asm-generic/bitops/ext2-atomic-setbit.h \\ include/linux/log2.h \\ $(wildcard include/config/arch/has/ilog2/u32.h) \\ $(wildcard include/config/arch/has/ilog2/u64.h) \\ include/linux/typecheck.h \\ include/linux/printk.h \\ $(wildcard include/config/message/loglevel/default.h) \\ $(wildcard include/config/early/printk.h) \\ $(wildcard include/config/printk.h) \\ $(wildcard include/config/dynamic/debug.h) \\ include/linux/init.h \\ $(wildcard include/config/broken/rodata.h) \\ $(wildcard include/config/lto.h) \\ include/linux/kern_levels.h \\ include/linux/cache.h \\ $(wildcard include/config/arch/has/cache/line/size.h) \\ include/uapi/linux/kernel.h \\ include/uapi/linux/sysinfo.h \\ arch/x86/include/asm/cache.h \\ $(wildcard include/config/x86/l1/cache/shift.h) \\ $(wildcard include/config/x86/internode/cache/shift.h) \\ $(wildcard include/config/x86/vsmp.h) \\ include/linux/dynamic_debug.h \\ arch/x86/include/asm/div64.h \\ include/linux/stat.h \\ arch/x86/include/uapi/asm/stat.h \\ include/uapi/linux/stat.h \\ include/linux/time.h \\ $(wildcard include/config/arch/uses/gettimeoffset.h) \\ include/linux/seqlock.h \\ $(wildcard include/config/debug/lock/alloc.h) \\ include/linux/spinlock.h \\ $(wildcard include/config/debug/spinlock.h) \\ $(wildcard include/config/generic/lockbreak.h) \\ $(wildcard include/config/preempt.h) \\ include/linux/preempt.h \\ $(wildcard include/config/preempt/count.h) \\ $(wildcard include/config/debug/preempt.h) \\ $(wildcard include/config/preempt/tracer.h) \\ $(wildcard include/config/preempt/notifiers.h) \\ arch/x86/include/asm/preempt.h \\ arch/x86/include/asm/percpu.h \\ $(wildcard include/config/x86/64/smp.h) \\ include/asm-generic/percpu.h \\ $(wildcard include/config/have/setup/per/cpu/area.h) \\ include/linux/threads.h \\ $(wildcard include/config/base/small.h) \\ include/linux/percpu-defs.h \\ $(wildcard include/config/debug/force/weak/per/cpu.h) \\ include/linux/thread_info.h \\ $(wildcard include/config/compat.h) \\ $(wildcard include/config/debug/stack/usage.h) \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/bug.h \\ include/linux/bug.h \\ arch/x86/include/asm/bug.h \\ $(wildcard include/config/debug/bugverbose.h) \\ include/asm-generic/bug.h \\ $(wildcard include/config/bug.h) \\ $(wildcard include/config/generic/bug/relative/pointers.h) \\ arch/x86/include/asm/thread_info.h \\ $(wildcard include/config/ia32/emulation.h) \\ arch/x86/include/asm/page.h \\ arch/x86/include/asm/page_32.h \\ $(wildcard include/config/debug/virtual.h) \\ $(wildcard include/config/flatmem.h) \\ $(wildcard include/config/x86/3dnow.h) \\ include/linux/string.h \\ $(wildcard include/config/binary/printf.h) \\ include/uapi/linux/string.h \\ arch/x86/include/asm/string.h \\ arch/x86/include/asm/string_32.h \\ include/linux/range.h \\ include/asm-generic/memory_model.h \\ $(wildcard include/config/discontigmem.h) \\ $(wildcard include/config/sparsemem/vmemmap.h) \\ $(wildcard include/config/sparsemem.h) \\ include/asm-generic/getorder.h \\ arch/x86/include/asm/processor.h \\ $(wildcard include/config/m486.h) \\ $(wildcard include/config/xen.h) \\ arch/x86/include/asm/math_emu.h \\ arch/x86/include/asm/sigcontext.h \\ arch/x86/include/uapi/asm/sigcontext.h \\ arch/x86/include/asm/current.h \\ arch/x86/include/asm/msr.h \\ arch/x86/include/asm/msr-index.h \\ arch/x86/include/uapi/asm/errno.h \\ include/uapi/asm-generic/errno.h \\ include/uapi/asm-generic/errno-base.h \\ arch/x86/include/asm/cpumask.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/cpumask.h \\ include/linux/cpumask.h \\ $(wildcard include/config/cpumask/offstack.h) \\ $(wildcard include/config/hotplug/cpu.h) \\ $(wildcard include/config/debug/per/cpu/maps.h) \\ include/linux/bitmap.h \\ arch/x86/include/uapi/asm/msr.h \\ include/uapi/linux/ioctl.h \\ arch/x86/include/uapi/asm/ioctl.h \\ include/asm-generic/ioctl.h \\ include/uapi/asm-generic/ioctl.h \\ arch/x86/include/asm/paravirt.h \\ arch/x86/include/asm/special_insns.h \\ arch/x86/include/asm/fpu/types.h \\ include/linux/personality.h \\ include/uapi/linux/personality.h \\ include/linux/math64.h \\ $(wildcard include/config/arch/supports/int128.h) \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/err.h \\ include/linux/err.h \\ include/linux/irqflags.h \\ $(wildcard include/config/trace/irqflags.h) \\ $(wildcard include/config/irqsoff/tracer.h) \\ $(wildcard include/config/trace/irqflags/support.h) \\ arch/x86/include/asm/irqflags.h \\ include/linux/atomic.h \\ $(wildcard include/config/arch/has/atomic/or.h) \\ $(wildcard include/config/generic/atomic64.h) \\ arch/x86/include/asm/atomic.h \\ arch/x86/include/asm/cmpxchg.h \\ arch/x86/include/asm/cmpxchg_32.h \\ arch/x86/include/asm/atomic64_32.h \\ include/asm-generic/atomic-long.h \\ include/linux/bottom_half.h \\ include/linux/spinlock_types.h \\ include/linux/lockdep.h \\ $(wildcard include/config/lockdep.h) \\ $(wildcard include/config/lock/stat.h) \\ include/linux/rwlock_types.h \\ arch/x86/include/asm/spinlock.h \\ include/linux/jump_label.h \\ $(wildcard include/config/jump/label.h) \\ arch/x86/include/asm/jump_label.h \\ arch/x86/include/asm/qspinlock.h \\ include/asm-generic/qspinlock.h \\ arch/x86/include/asm/qrwlock.h \\ include/asm-generic/qrwlock.h \\ include/linux/rwlock.h \\ include/linux/spinlock_api_smp.h \\ $(wildcard include/config/inline/spin/lock.h) \\ $(wildcard include/config/inline/spin/lock/bh.h) \\ $(wildcard include/config/inline/spin/lock/irq.h) \\ $(wildcard include/config/inline/spin/lock/irqsave.h) \\ $(wildcard include/config/inline/spin/trylock.h) \\ $(wildcard include/config/inline/spin/trylock/bh.h) \\ $(wildcard include/config/uninline/spin/unlock.h) \\ $(wildcard include/config/inline/spin/unlock/bh.h) \\ $(wildcard include/config/inline/spin/unlock/irq.h) \\ $(wildcard include/config/inline/spin/unlock/irqrestore.h) \\ include/linux/rwlock_api_smp.h \\ $(wildcard include/config/inline/read/lock.h) \\ $(wildcard include/config/inline/write/lock.h) \\ $(wildcard include/config/inline/read/lock/bh.h) \\ $(wildcard include/config/inline/write/lock/bh.h) \\ $(wildcard include/config/inline/read/lock/irq.h) \\ $(wildcard include/config/inline/write/lock/irq.h) \\ $(wildcard include/config/inline/read/lock/irqsave.h) \\ $(wildcard include/config/inline/write/lock/irqsave.h) \\ $(wildcard include/config/inline/read/trylock.h) \\ $(wildcard include/config/inline/write/trylock.h) \\ $(wildcard include/config/inline/read/unlock.h) \\ $(wildcard include/config/inline/write/unlock.h) \\ $(wildcard include/config/inline/read/unlock/bh.h) \\ $(wildcard include/config/inline/write/unlock/bh.h) \\ $(wildcard include/config/inline/read/unlock/irq.h) \\ $(wildcard include/config/inline/write/unlock/irq.h) \\ $(wildcard include/config/inline/read/unlock/irqrestore.h) \\ $(wildcard include/config/inline/write/unlock/irqrestore.h) \\ include/linux/time64.h \\ include/uapi/linux/time.h \\ include/linux/uidgid.h \\ $(wildcard include/config/multiuser.h) \\ $(wildcard include/config/user/ns.h) \\ include/linux/highuid.h \\ include/linux/kmod.h \\ include/linux/gfp.h \\ $(wildcard include/config/zone/dma.h) \\ $(wildcard include/config/zone/dma32.h) \\ $(wildcard include/config/numa.h) \\ $(wildcard include/config/deferred/struct/page/init.h) \\ $(wildcard include/config/pm/sleep.h) \\ $(wildcard include/config/cma.h) \\ include/linux/mmdebug.h \\ $(wildcard include/config/debug/vm.h) \\ include/linux/mmzone.h \\ $(wildcard include/config/force/max/zoneorder.h) \\ $(wildcard include/config/memory/isolation.h) \\ $(wildcard include/config/memcg.h) \\ $(wildcard include/config/memory/hotplug.h) \\ $(wildcard include/config/compaction.h) \\ $(wildcard include/config/have/memblock/node/map.h) \\ $(wildcard include/config/flat/node/mem/map.h) \\ $(wildcard include/config/page/extension.h) \\ $(wildcard include/config/no/bootmem.h) \\ $(wildcard include/config/numa/balancing.h) \\ $(wildcard include/config/have/memory/present.h) \\ $(wildcard include/config/have/memoryless/nodes.h) \\ $(wildcard include/config/need/node/memmap/size.h) \\ $(wildcard include/config/need/multiple/nodes.h) \\ $(wildcard include/config/have/arch/early/pfn/to/nid.h) \\ $(wildcard include/config/sparsemem/extreme.h) \\ $(wildcard include/config/have/arch/pfn/valid.h) \\ $(wildcard include/config/holes/in/zone.h) \\ $(wildcard include/config/arch/has/holes/memorymodel.h) \\ include/linux/wait.h \\ include/uapi/linux/wait.h \\ include/linux/numa.h \\ $(wildcard include/config/nodes/shift.h) \\ include/linux/nodemask.h \\ $(wildcard include/config/movable/node.h) \\ include/linux/pageblock-flags.h \\ $(wildcard include/config/hugetlb/page.h) \\ $(wildcard include/config/hugetlb/page/size/variable.h) \\ include/linux/page-flags-layout.h \\ include/generated/bounds.h \\ arch/x86/include/asm/sparsemem.h \\ include/linux/memory_hotplug.h \\ $(wildcard include/config/memory/hotremove.h) \\ $(wildcard include/config/have/arch/nodedata/extension.h) \\ $(wildcard include/config/have/bootmem/info/node.h) \\ include/linux/notifier.h \\ include/linux/errno.h \\ include/uapi/linux/errno.h \\ include/linux/mutex.h \\ $(wildcard include/config/debug/mutexes.h) \\ $(wildcard include/config/mutex/spin/on/owner.h) \\ include/linux/osq_lock.h \\ include/linux/rwsem.h \\ $(wildcard include/config/rwsem/spin/on/owner.h) \\ $(wildcard include/config/rwsem/generic/spinlock.h) \\ arch/x86/include/asm/rwsem.h \\ include/linux/srcu.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/rcupdate.h \\ include/linux/rcupdate.h \\ $(wildcard include/config/tiny/rcu.h) \\ $(wildcard include/config/tree/rcu.h) \\ $(wildcard include/config/preempt/rcu.h) \\ $(wildcard include/config/rcu/trace.h) \\ $(wildcard include/config/rcu/stall/common.h) \\ $(wildcard include/config/rcu/user/qs.h) \\ $(wildcard include/config/rcu/nocb/cpu.h) \\ $(wildcard include/config/tasks/rcu.h) \\ $(wildcard include/config/debug/objects/rcu/head.h) \\ $(wildcard include/config/prove/rcu.h) \\ $(wildcard include/config/rcu/boost.h) \\ $(wildcard include/config/rcu/nocb/cpu/all.h) \\ $(wildcard include/config/no/hz/full/sysidle.h) \\ include/linux/completion.h \\ include/linux/debugobjects.h \\ $(wildcard include/config/debug/objects.h) \\ $(wildcard include/config/debug/objects/free.h) \\ include/linux/ktime.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/jiffies.h \\ include/linux/jiffies.h \\ include/linux/timex.h \\ include/uapi/linux/timex.h \\ include/uapi/linux/param.h \\ arch/x86/include/uapi/asm/param.h \\ include/asm-generic/param.h \\ $(wildcard include/config/hz.h) \\ include/uapi/asm-generic/param.h \\ arch/x86/include/asm/timex.h \\ arch/x86/include/asm/tsc.h \\ $(wildcard include/config/x86/tsc.h) \\ include/generated/timeconst.h \\ include/linux/timekeeping.h \\ include/linux/rcutree.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/workqueue.h \\ include/linux/workqueue.h \\ $(wildcard include/config/debug/objects/work.h) \\ $(wildcard include/config/freezer.h) \\ include/linux/timer.h \\ $(wildcard include/config/timer/stats.h) \\ $(wildcard include/config/debug/objects/timers.h) \\ $(wildcard include/config/no/hz/common.h) \\ include/linux/sysctl.h \\ $(wildcard include/config/sysctl.h) \\ include/linux/rbtree.h \\ include/uapi/linux/sysctl.h \\ include/linux/topology.h \\ $(wildcard include/config/use/percpu/numa/node/id.h) \\ $(wildcard include/config/sched/smt.h) \\ include/linux/smp.h \\ $(wildcard include/config/up/late/init.h) \\ include/linux/llist.h \\ $(wildcard include/config/arch/have/nmi/safe/cmpxchg.h) \\ arch/x86/include/asm/smp.h \\ $(wildcard include/config/x86/io/apic.h) \\ $(wildcard include/config/x86/32/smp.h) \\ $(wildcard include/config/debug/nmi/selftest.h) \\ arch/x86/include/asm/mpspec.h \\ $(wildcard include/config/eisa.h) \\ $(wildcard include/config/x86/mpparse.h) \\ arch/x86/include/asm/mpspec_def.h \\ arch/x86/include/asm/x86_init.h \\ arch/x86/include/uapi/asm/bootparam.h \\ include/linux/screen_info.h \\ include/uapi/linux/screen_info.h \\ include/linux/apm_bios.h \\ include/uapi/linux/apm_bios.h \\ include/linux/edd.h \\ include/uapi/linux/edd.h \\ arch/x86/include/asm/e820.h \\ $(wildcard include/config/efi.h) \\ $(wildcard include/config/hibernation.h) \\ arch/x86/include/uapi/asm/e820.h \\ $(wildcard include/config/x86/pmem/legacy.h) \\ $(wildcard include/config/intel/txt.h) \\ include/linux/ioport.h \\ arch/x86/include/asm/ist.h \\ arch/x86/include/uapi/asm/ist.h \\ include/video/edid.h \\ $(wildcard include/config/x86.h) \\ include/uapi/video/edid.h \\ arch/x86/include/asm/apicdef.h \\ arch/x86/include/asm/apic.h \\ $(wildcard include/config/x86/x2apic.h) \\ include/linux/pm.h \\ $(wildcard include/config/vt/console/sleep.h) \\ $(wildcard include/config/pm.h) \\ $(wildcard include/config/pm/clk.h) \\ $(wildcard include/config/pm/generic/domains.h) \\ arch/x86/include/asm/fixmap.h \\ $(wildcard include/config/x86/vsyscall/emulation.h) \\ $(wildcard include/config/paravirt/clock.h) \\ $(wildcard include/config/provide/ohci1394/dma/init.h) \\ $(wildcard include/config/pci/mmconfig.h) \\ $(wildcard include/config/x86/intel/mid.h) \\ arch/x86/include/asm/acpi.h \\ $(wildcard include/config/acpi.h) \\ $(wildcard include/config/acpi/numa.h) \\ include/acpi/pdc_intel.h \\ arch/x86/include/asm/numa.h \\ $(wildcard include/config/numa/emu.h) \\ arch/x86/include/asm/topology.h \\ include/asm-generic/topology.h \\ arch/x86/include/asm/numa_32.h \\ arch/x86/include/asm/mmu.h \\ $(wildcard include/config/modify/ldt/syscall.h) \\ arch/x86/include/asm/realmode.h \\ $(wildcard include/config/acpi/sleep.h) \\ arch/x86/include/asm/io.h \\ $(wildcard include/config/mtrr.h) \\ arch/x86/include/generated/asm/early_ioremap.h \\ include/asm-generic/early_ioremap.h \\ $(wildcard include/config/generic/early/ioremap.h) \\ include/asm-generic/iomap.h \\ $(wildcard include/config/has/ioport/map.h) \\ $(wildcard include/config/pci.h) \\ $(wildcard include/config/generic/iomap.h) \\ include/asm-generic/pci_iomap.h \\ $(wildcard include/config/no/generic/pci/ioport/map.h) \\ $(wildcard include/config/generic/pci/iomap.h) \\ include/xen/xen.h \\ $(wildcard include/config/xen/dom0.h) \\ $(wildcard include/config/xen/pvh.h) \\ include/xen/interface/xen.h \\ arch/x86/include/asm/xen/interface.h \\ arch/x86/include/asm/xen/interface_32.h \\ arch/x86/include/asm/pvclock-abi.h \\ arch/x86/include/asm/xen/hypervisor.h \\ arch/x86/include/asm/pvclock.h \\ include/linux/clocksource.h \\ $(wildcard include/config/arch/clocksource/data.h) \\ $(wildcard include/config/clocksource/watchdog.h) \\ $(wildcard include/config/clksrc/of.h) \\ arch/x86/include/asm/clocksource.h \\ include/asm-generic/fixmap.h \\ arch/x86/include/asm/idle.h \\ arch/x86/include/asm/io_apic.h \\ arch/x86/include/asm/irq_vectors.h \\ $(wildcard include/config/have/kvm.h) \\ $(wildcard include/config/pci/msi.h) \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/percpu.h \\ include/linux/percpu.h \\ $(wildcard include/config/need/per/cpu/embed/first/chunk.h) \\ $(wildcard include/config/need/per/cpu/page/first/chunk.h) \\ include/linux/pfn.h \\ include/linux/elf.h \\ arch/x86/include/asm/elf.h \\ $(wildcard include/config/x86/x32/abi.h) \\ arch/x86/include/asm/user.h \\ arch/x86/include/asm/user_32.h \\ arch/x86/include/uapi/asm/auxvec.h \\ arch/x86/include/asm/vdso.h \\ $(wildcard include/config/x86/x32.h) \\ include/linux/mm_types.h \\ $(wildcard include/config/split/ptlock/cpus.h) \\ $(wildcard include/config/arch/enable/split/pmd/ptlock.h) \\ $(wildcard include/config/have/cmpxchg/double.h) \\ $(wildcard include/config/have/aligned/struct/page.h) \\ $(wildcard include/config/transparent/hugepage.h) \\ $(wildcard include/config/aio.h) \\ $(wildcard include/config/mmu/notifier.h) \\ include/linux/auxvec.h \\ include/uapi/linux/auxvec.h \\ include/linux/uprobes.h \\ $(wildcard include/config/uprobes.h) \\ arch/x86/include/asm/uprobes.h \\ arch/x86/include/asm/desc.h \\ arch/x86/include/uapi/asm/ldt.h \\ include/uapi/linux/elf.h \\ include/uapi/linux/elf-em.h \\ include/linux/kobject.h \\ $(wildcard include/config/uevent/helper.h) \\ $(wildcard include/config/debug/kobject/release.h) \\ include/linux/sysfs.h \\ include/linux/kernfs.h \\ $(wildcard include/config/kernfs.h) \\ include/linux/idr.h \\ include/linux/kobject_ns.h \\ include/linux/kref.h \\ include/linux/moduleparam.h \\ $(wildcard include/config/alpha.h) \\ $(wildcard include/config/ia64.h) \\ $(wildcard include/config/ppc64.h) \\ include/linux/rbtree_latch.h \\ arch/x86/include/asm/module.h \\ $(wildcard include/config/m586.h) \\ $(wildcard include/config/m586tsc.h) \\ $(wildcard include/config/m586mmx.h) \\ $(wildcard include/config/mcore2.h) \\ $(wildcard include/config/m686.h) \\ $(wildcard include/config/mpentiumii.h) \\ $(wildcard include/config/mpentiumiii.h) \\ $(wildcard include/config/mpentiumm.h) \\ $(wildcard include/config/mpentium4.h) \\ $(wildcard include/config/mk6.h) \\ $(wildcard include/config/mk8.h) \\ $(wildcard include/config/melan.h) \\ $(wildcard include/config/mcrusoe.h) \\ $(wildcard include/config/mefficeon.h) \\ $(wildcard include/config/mwinchipc6.h) \\ $(wildcard include/config/mwinchip3d.h) \\ $(wildcard include/config/mcyrixiii.h) \\ $(wildcard include/config/mviac3/2.h) \\ $(wildcard include/config/mviac7.h) \\ $(wildcard include/config/mgeodegx1.h) \\ $(wildcard include/config/mgeode/lx.h) \\ include/asm-generic/module.h \\ $(wildcard include/config/have/mod/arch/specific.h) \\ $(wildcard include/config/modules/use/elf/rel.h) \\ $(wildcard include/config/modules/use/elf/rela.h) \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/if.h \\ include/uapi/linux/if.h \\ include/linux/socket.h \\ arch/x86/include/uapi/asm/socket.h \\ include/uapi/asm-generic/socket.h \\ arch/x86/include/uapi/asm/sockios.h \\ include/uapi/asm-generic/sockios.h \\ include/uapi/linux/sockios.h \\ include/linux/uio.h \\ include/uapi/linux/uio.h \\ include/uapi/linux/socket.h \\ include/uapi/linux/hdlc/ioctl.h \\ include/linux/if_tunnel.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/ip.h \\ include/linux/ip.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/skbuff.h \\ include/linux/skbuff.h \\ $(wildcard include/config/nf/conntrack.h) \\ $(wildcard include/config/bridge/netfilter.h) \\ $(wildcard include/config/xfrm.h) \\ $(wildcard include/config/ipv6/ndisc/nodetype.h) \\ $(wildcard include/config/net/sched.h) \\ $(wildcard include/config/net/cls/act.h) \\ $(wildcard include/config/net/rx/busy/poll.h) \\ $(wildcard include/config/xps.h) \\ $(wildcard include/config/network/secmark.h) \\ $(wildcard include/config/network/phy/timestamping.h) \\ $(wildcard include/config/netfilter/xt/target/trace.h) \\ $(wildcard include/config/nf/tables.h) \\ include/linux/kmemcheck.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/net.h \\ include/linux/net.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/random.h \\ include/linux/random.h \\ $(wildcard include/config/arch/random.h) \\ include/uapi/linux/random.h \\ include/linux/irqnr.h \\ include/uapi/linux/irqnr.h \\ arch/x86/include/asm/archrandom.h \\ include/linux/fcntl.h \\ include/uapi/linux/fcntl.h \\ arch/x86/include/uapi/asm/fcntl.h \\ include/uapi/asm-generic/fcntl.h \\ include/uapi/linux/net.h \\ include/linux/textsearch.h \\ include/linux/slab.h \\ $(wildcard include/config/debug/slab.h) \\ $(wildcard include/config/failslab.h) \\ $(wildcard include/config/slab.h) \\ $(wildcard include/config/slub.h) \\ $(wildcard include/config/slob.h) \\ include/linux/kmemleak.h \\ $(wildcard include/config/debug/kmemleak.h) \\ include/linux/kasan.h \\ $(wildcard include/config/kasan.h) \\ $(wildcard include/config/kasan/shadow/offset.h) \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/net/checksum.h \\ include/net/checksum.h \\ arch/x86/include/asm/uaccess.h \\ $(wildcard include/config/x86/intel/usercopy.h) \\ $(wildcard include/config/debug/strict/user/copy/checks.h) \\ arch/x86/include/asm/smap.h \\ $(wildcard include/config/x86/smap.h) \\ arch/x86/include/asm/uaccess_32.h \\ arch/x86/include/asm/checksum.h \\ arch/x86/include/asm/checksum_32.h \\ include/linux/in6.h \\ include/uapi/linux/in6.h \\ include/uapi/linux/libc-compat.h \\ include/linux/hrtimer.h \\ $(wildcard include/config/high/res/timers.h) \\ $(wildcard include/config/timerfd.h) \\ include/linux/timerqueue.h \\ include/linux/dma-mapping.h \\ $(wildcard include/config/has/dma.h) \\ $(wildcard include/config/arch/has/dma/set/coherent/mask.h) \\ $(wildcard include/config/have/dma/attrs.h) \\ $(wildcard include/config/need/dma/map/state.h) \\ include/linux/device.h \\ $(wildcard include/config/debug/devres.h) \\ $(wildcard include/config/pinctrl.h) \\ $(wildcard include/config/dma/cma.h) \\ $(wildcard include/config/of.h) \\ $(wildcard include/config/devtmpfs.h) \\ $(wildcard include/config/sysfs/deprecated.h) \\ include/linux/klist.h \\ include/linux/pinctrl/devinfo.h \\ include/linux/pinctrl/consumer.h \\ include/linux/seq_file.h \\ include/linux/pinctrl/pinctrl-state.h \\ include/linux/ratelimit.h \\ arch/x86/include/asm/device.h \\ $(wildcard include/config/x86/dev/dma/ops.h) \\ $(wildcard include/config/intel/iommu.h) \\ $(wildcard include/config/amd/iommu.h) \\ include/linux/pm_wakeup.h \\ include/linux/dma-attrs.h \\ include/linux/dma-direction.h \\ include/linux/scatterlist.h \\ $(wildcard include/config/debug/sg.h) \\ $(wildcard include/config/need/sg/dma/length.h) \\ $(wildcard include/config/arch/has/sg/chain.h) \\ include/linux/mm.h \\ $(wildcard include/config/ppc.h) \\ $(wildcard include/config/parisc.h) \\ $(wildcard include/config/metag.h) \\ $(wildcard include/config/stack/growsup.h) \\ $(wildcard include/config/shmem.h) \\ $(wildcard include/config/debug/vm/rb.h) \\ $(wildcard include/config/debug/pagealloc.h) \\ $(wildcard include/config/hugetlbfs.h) \\ include/linux/debug_locks.h \\ $(wildcard include/config/debug/locking/api/selftests.h) \\ include/linux/bit_spinlock.h \\ include/linux/shrinker.h \\ include/linux/resource.h \\ include/uapi/linux/resource.h \\ arch/x86/include/uapi/asm/resource.h \\ include/asm-generic/resource.h \\ include/uapi/asm-generic/resource.h \\ include/linux/page_ext.h \\ $(wildcard include/config/page/owner.h) \\ include/linux/stacktrace.h \\ $(wildcard include/config/stacktrace.h) \\ $(wildcard include/config/user/stacktrace/support.h) \\ arch/x86/include/asm/pgtable.h \\ $(wildcard include/config/have/arch/soft/dirty.h) \\ arch/x86/include/asm/pgtable_32.h \\ $(wildcard include/config/highpte.h) \\ arch/x86/include/asm/pgtable-3level.h \\ include/asm-generic/pgtable.h \\ $(wildcard include/config/have/arch/huge/vmap.h) \\ include/linux/page-flags.h \\ $(wildcard include/config/pageflags/extended.h) \\ $(wildcard include/config/arch/uses/pg/uncached.h) \\ $(wildcard include/config/memory/failure.h) \\ $(wildcard include/config/swap.h) \\ $(wildcard include/config/ksm.h) \\ include/linux/huge_mm.h \\ include/linux/vmstat.h \\ $(wildcard include/config/vm/event/counters.h) \\ $(wildcard include/config/debug/tlbflush.h) \\ $(wildcard include/config/debug/vm/vmacache.h) \\ include/linux/vm_event_item.h \\ $(wildcard include/config/migration.h) \\ $(wildcard include/config/memory/balloon.h) \\ $(wildcard include/config/balloon/compaction.h) \\ arch/x86/include/asm/dma-mapping.h \\ $(wildcard include/config/isa.h) \\ $(wildcard include/config/x86/dma/remap.h) \\ include/linux/dma-debug.h \\ $(wildcard include/config/dma/api/debug.h) \\ arch/x86/include/asm/swiotlb.h \\ $(wildcard include/config/swiotlb.h) \\ include/linux/swiotlb.h \\ include/asm-generic/dma-coherent.h \\ $(wildcard include/config/have/generic/dma/coherent.h) \\ include/linux/dma-contiguous.h \\ include/asm-generic/dma-mapping-common.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/netdev_features.h \\ include/linux/netdev_features.h \\ include/linux/sched.h \\ $(wildcard include/config/sched/debug.h) \\ $(wildcard include/config/lockup/detector.h) \\ $(wildcard include/config/detect/hung/task.h) \\ $(wildcard include/config/core/dump/default/elf/headers.h) \\ $(wildcard include/config/sched/autogroup.h) \\ $(wildcard include/config/virt/cpu/accounting/native.h) \\ $(wildcard include/config/bsd/process/acct.h) \\ $(wildcard include/config/taskstats.h) \\ $(wildcard include/config/audit.h) \\ $(wildcard include/config/inotify/user.h) \\ $(wildcard include/config/fanotify.h) \\ $(wildcard include/config/epoll.h) \\ $(wildcard include/config/posix/mqueue.h) \\ $(wildcard include/config/keys.h) \\ $(wildcard include/config/perf/events.h) \\ $(wildcard include/config/sched/info.h) \\ $(wildcard include/config/task/delay/acct.h) \\ $(wildcard include/config/schedstats.h) \\ $(wildcard include/config/sched/mc.h) \\ $(wildcard include/config/fair/group/sched.h) \\ $(wildcard include/config/rt/group/sched.h) \\ $(wildcard include/config/cgroup/sched.h) \\ $(wildcard include/config/blk/dev/io/trace.h) \\ $(wildcard include/config/memcg/kmem.h) \\ $(wildcard include/config/compat/brk.h) \\ $(wildcard include/config/virt/cpu/accounting/gen.h) \\ $(wildcard include/config/sysvipc.h) \\ $(wildcard include/config/auditsyscall.h) \\ $(wildcard include/config/rt/mutexes.h) \\ $(wildcard include/config/block.h) \\ $(wildcard include/config/task/xacct.h) \\ $(wildcard include/config/cpusets.h) \\ $(wildcard include/config/cgroups.h) \\ $(wildcard include/config/futex.h) \\ $(wildcard include/config/fault/injection.h) \\ $(wildcard include/config/latencytop.h) \\ $(wildcard include/config/function/graph/tracer.h) \\ $(wildcard include/config/bcache.h) \\ $(wildcard include/config/arch/wants/dynamic/task/struct.h) \\ $(wildcard include/config/have/unstable/sched/clock.h) \\ $(wildcard include/config/irq/time/accounting.h) \\ $(wildcard include/config/no/hz/full.h) \\ $(wildcard include/config/have/copy/thread/tls.h) \\ include/uapi/linux/sched.h \\ include/linux/sched/prio.h \\ include/linux/capability.h \\ include/uapi/linux/capability.h \\ include/linux/plist.h \\ $(wildcard include/config/debug/pi/list.h) \\ include/linux/cputime.h \\ arch/x86/include/generated/asm/cputime.h \\ include/asm-generic/cputime.h \\ $(wildcard include/config/virt/cpu/accounting.h) \\ include/asm-generic/cputime_jiffies.h \\ include/linux/sem.h \\ include/uapi/linux/sem.h \\ include/linux/ipc.h \\ include/uapi/linux/ipc.h \\ arch/x86/include/uapi/asm/ipcbuf.h \\ include/uapi/asm-generic/ipcbuf.h \\ arch/x86/include/uapi/asm/sembuf.h \\ include/linux/shm.h \\ include/uapi/linux/shm.h \\ arch/x86/include/uapi/asm/shmbuf.h \\ include/uapi/asm-generic/shmbuf.h \\ arch/x86/include/asm/shmparam.h \\ include/linux/signal.h \\ $(wildcard include/config/old/sigaction.h) \\ include/uapi/linux/signal.h \\ arch/x86/include/asm/signal.h \\ arch/x86/include/uapi/asm/signal.h \\ include/uapi/asm-generic/signal-defs.h \\ arch/x86/include/uapi/asm/siginfo.h \\ include/asm-generic/siginfo.h \\ include/uapi/asm-generic/siginfo.h \\ include/linux/pid.h \\ include/linux/proportions.h \\ include/linux/percpu_counter.h \\ include/linux/seccomp.h \\ $(wildcard include/config/seccomp.h) \\ $(wildcard include/config/have/arch/seccomp/filter.h) \\ $(wildcard include/config/seccomp/filter.h) \\ include/uapi/linux/seccomp.h \\ arch/x86/include/asm/seccomp.h \\ arch/x86/include/asm/unistd.h \\ arch/x86/include/uapi/asm/unistd.h \\ arch/x86/include/generated/uapi/asm/unistd_32.h \\ include/asm-generic/seccomp.h \\ include/uapi/linux/unistd.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/rculist.h \\ include/linux/rculist.h \\ include/linux/rtmutex.h \\ $(wildcard include/config/debug/rt/mutexes.h) \\ include/linux/task_io_accounting.h \\ $(wildcard include/config/task/io/accounting.h) \\ include/linux/latencytop.h \\ include/linux/cred.h \\ $(wildcard include/config/debug/credentials.h) \\ $(wildcard include/config/security.h) \\ include/linux/key.h \\ include/linux/assoc_array.h \\ $(wildcard include/config/associative/array.h) \\ include/linux/selinux.h \\ $(wildcard include/config/security/selinux.h) \\ include/uapi/linux/magic.h \\ include/linux/cgroup-defs.h \\ include/uapi/linux/limits.h \\ include/linux/percpu-refcount.h \\ include/linux/percpu-rwsem.h \\ include/linux/cgroup_subsys.h \\ $(wildcard include/config/cgroup/cpuacct.h) \\ $(wildcard include/config/blk/cgroup.h) \\ $(wildcard include/config/cgroup/device.h) \\ $(wildcard include/config/cgroup/freezer.h) \\ $(wildcard include/config/cgroup/net/classid.h) \\ $(wildcard include/config/cgroup/perf.h) \\ $(wildcard include/config/cgroup/net/prio.h) \\ $(wildcard include/config/cgroup/hugetlb.h) \\ $(wildcard include/config/cgroup/debug.h) \\ include/net/flow_dissector.h \\ include/uapi/linux/if_ether.h \\ include/linux/splice.h \\ include/linux/pipe_fs_i.h \\ include/linux/jhash.h \\ include/linux/unaligned/packed_struct.h \\ include/uapi/linux/ip.h \\ include/uapi/linux/if_tunnel.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/u64_stats_sync.h \\ include/linux/u64_stats_sync.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/icmp.h \\ include/linux/icmp.h \\ include/uapi/linux/icmp.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/in.h \\ include/linux/in.h \\ include/uapi/linux/in.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/netdevice.h \\ include/linux/netdevice.h \\ $(wildcard include/config/dcb.h) \\ $(wildcard include/config/wlan.h) \\ $(wildcard include/config/ax25.h) \\ $(wildcard include/config/mac80211/mesh.h) \\ $(wildcard include/config/net/ipip.h) \\ $(wildcard include/config/net/ipgre.h) \\ $(wildcard include/config/ipv6/sit.h) \\ $(wildcard include/config/ipv6/tunnel.h) \\ $(wildcard include/config/rps.h) \\ $(wildcard include/config/netpoll.h) \\ $(wildcard include/config/bql.h) \\ $(wildcard include/config/rfs/accel.h) \\ $(wildcard include/config/fcoe.h) \\ $(wildcard include/config/net/poll/controller.h) \\ $(wildcard include/config/libfcoe.h) \\ $(wildcard include/config/wireless/ext.h) \\ $(wildcard include/config/net/switchdev.h) \\ $(wildcard include/config/vlan/8021q.h) \\ $(wildcard include/config/net/dsa.h) \\ $(wildcard include/config/tipc.h) \\ $(wildcard include/config/mpls/routing.h) \\ $(wildcard include/config/netfilter/ingress.h) \\ $(wildcard include/config/net/flow/limit.h) \\ include/linux/delay.h \\ arch/x86/include/asm/delay.h \\ include/asm-generic/delay.h \\ include/linux/prefetch.h \\ include/linux/dmaengine.h \\ $(wildcard include/config/async/tx/enable/channel/switch.h) \\ $(wildcard include/config/dma/engine.h) \\ $(wildcard include/config/rapidio/dma/engine.h) \\ $(wildcard include/config/async/tx/dma.h) \\ include/linux/dynamic_queue_limits.h \\ include/linux/ethtool.h \\ include/linux/compat.h \\ $(wildcard include/config/compat/old/sigaction.h) \\ $(wildcard include/config/odd/rt/sigaction.h) \\ include/uapi/linux/ethtool.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/if_ether.h \\ include/linux/if_ether.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/net/net_namespace.h \\ $(wildcard include/config/net/ns.h) \\ include/net/net_namespace.h \\ $(wildcard include/config/ipv6.h) \\ $(wildcard include/config/ieee802154/6lowpan.h) \\ $(wildcard include/config/ip/sctp.h) \\ $(wildcard include/config/ip/dccp.h) \\ $(wildcard include/config/netfilter.h) \\ $(wildcard include/config/nf/defrag/ipv6.h) \\ $(wildcard include/config/wext/core.h) \\ $(wildcard include/config/ip/vs.h) \\ $(wildcard include/config/mpls.h) \\ include/net/flow.h \\ include/net/netns/core.h \\ include/net/netns/mib.h \\ $(wildcard include/config/xfrm/statistics.h) \\ include/net/snmp.h \\ include/uapi/linux/snmp.h \\ include/net/netns/unix.h \\ include/net/netns/packet.h \\ include/net/netns/ipv4.h \\ $(wildcard include/config/ip/multiple/tables.h) \\ $(wildcard include/config/ip/route/classid.h) \\ $(wildcard include/config/ip/mroute.h) \\ $(wildcard include/config/ip/mroute/multiple/tables.h) \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/net/inet_frag.h \\ include/net/inet_frag.h \\ include/net/netns/ipv6.h \\ $(wildcard include/config/ipv6/multiple/tables.h) \\ $(wildcard include/config/ipv6/mroute.h) \\ $(wildcard include/config/ipv6/mroute/multiple/tables.h) \\ include/net/dst_ops.h \\ include/net/netns/ieee802154_6lowpan.h \\ include/net/netns/sctp.h \\ include/net/netns/dccp.h \\ include/net/netns/netfilter.h \\ include/linux/netfilter_defs.h \\ include/uapi/linux/netfilter.h \\ include/net/netns/x_tables.h \\ $(wildcard include/config/bridge/nf/ebtables.h) \\ include/net/netns/conntrack.h \\ $(wildcard include/config/nf/conntrack/proc/compat.h) \\ $(wildcard include/config/nf/conntrack/events.h) \\ $(wildcard include/config/nf/conntrack/labels.h) \\ $(wildcard include/config/nf/nat/needed.h) \\ include/linux/list_nulls.h \\ include/linux/netfilter/nf_conntrack_tcp.h \\ include/uapi/linux/netfilter/nf_conntrack_tcp.h \\ include/net/netns/nftables.h \\ include/net/netns/xfrm.h \\ include/uapi/linux/xfrm.h \\ include/net/flowcache.h \\ include/linux/interrupt.h \\ $(wildcard include/config/irq/forced/threading.h) \\ $(wildcard include/config/generic/irq/probe.h) \\ include/linux/irqreturn.h \\ include/linux/hardirq.h \\ include/linux/ftrace_irq.h \\ $(wildcard include/config/ftrace/nmi/enter.h) \\ include/linux/vtime.h \\ include/linux/context_tracking_state.h \\ $(wildcard include/config/context/tracking.h) \\ include/linux/static_key.h \\ arch/x86/include/asm/hardirq.h \\ $(wildcard include/config/x86/thermal/vector.h) \\ $(wildcard include/config/x86/mce/threshold.h) \\ $(wildcard include/config/x86/mce/amd.h) \\ $(wildcard include/config/hyperv.h) \\ include/linux/irq.h \\ $(wildcard include/config/irq/domain/hierarchy.h) \\ $(wildcard include/config/generic/pending/irq.h) \\ $(wildcard include/config/hardirqs/sw/resend.h) \\ $(wildcard include/config/generic/irq/legacy/alloc/hwirq.h) \\ $(wildcard include/config/generic/irq/legacy.h) \\ include/linux/irqhandler.h \\ include/linux/io.h \\ arch/x86/include/asm/irq.h \\ arch/x86/include/asm/irq_regs.h \\ include/linux/irqdesc.h \\ $(wildcard include/config/irq/preflow/fasteoi.h) \\ $(wildcard include/config/sparse/irq.h) \\ $(wildcard include/config/handle/domain/irq.h) \\ arch/x86/include/asm/hw_irq.h \\ $(wildcard include/config/hpet/timer.h) \\ $(wildcard include/config/dmar/table.h) \\ $(wildcard include/config/ht/irq.h) \\ $(wildcard include/config/x86/uv.h) \\ include/linux/profile.h \\ $(wildcard include/config/profiling.h) \\ arch/x86/include/asm/sections.h \\ $(wildcard include/config/debug/rodata.h) \\ include/asm-generic/sections.h \\ include/net/netns/mpls.h \\ include/linux/ns_common.h \\ include/linux/seq_file_net.h \\ include/net/dsa.h \\ $(wildcard include/config/net/dsa/hwmon.h) \\ include/linux/of.h \\ $(wildcard include/config/sparc.h) \\ $(wildcard include/config/of/dynamic.h) \\ $(wildcard include/config/attach/node.h) \\ $(wildcard include/config/detach/node.h) \\ $(wildcard include/config/add/property.h) \\ $(wildcard include/config/remove/property.h) \\ $(wildcard include/config/update/property.h) \\ $(wildcard include/config/no/change.h) \\ $(wildcard include/config/change/add.h) \\ $(wildcard include/config/change/remove.h) \\ $(wildcard include/config/of/resolve.h) \\ $(wildcard include/config/of/overlay.h) \\ include/linux/mod_devicetable.h \\ include/linux/uuid.h \\ include/uapi/linux/uuid.h \\ include/linux/property.h \\ include/linux/fwnode.h \\ include/linux/phy.h \\ include/linux/mii.h \\ include/uapi/linux/mii.h \\ include/linux/phy_fixed.h \\ $(wildcard include/config/fixed/phy.h) \\ include/net/dcbnl.h \\ include/uapi/linux/dcbnl.h \\ include/net/netprio_cgroup.h \\ include/linux/cgroup.h \\ include/uapi/linux/cgroupstats.h \\ include/uapi/linux/taskstats.h \\ include/linux/fs.h \\ $(wildcard include/config/fs/posix/acl.h) \\ $(wildcard include/config/cgroup/writeback.h) \\ $(wildcard include/config/ima.h) \\ $(wildcard include/config/fsnotify.h) \\ $(wildcard include/config/file/locking.h) \\ $(wildcard include/config/quota.h) \\ $(wildcard include/config/blk/dev/loop.h) \\ $(wildcard include/config/fs/dax.h) \\ include/linux/kdev_t.h \\ include/uapi/linux/kdev_t.h \\ include/linux/dcache.h \\ include/linux/rculist_bl.h \\ include/linux/list_bl.h \\ include/linux/lockref.h \\ $(wildcard include/config/arch/use/cmpxchg/lockref.h) \\ include/linux/path.h \\ include/linux/list_lru.h \\ include/linux/radix-tree.h \\ include/linux/semaphore.h \\ include/uapi/linux/fiemap.h \\ include/linux/migrate_mode.h \\ include/linux/blk_types.h \\ $(wildcard include/config/blk/dev/integrity.h) \\ include/uapi/linux/fs.h \\ include/linux/quota.h \\ $(wildcard include/config/quota/netlink/interface.h) \\ include/uapi/linux/dqblk_xfs.h \\ include/linux/dqblk_v1.h \\ include/linux/dqblk_v2.h \\ include/linux/dqblk_qtree.h \\ include/linux/projid.h \\ include/uapi/linux/quota.h \\ include/linux/nfs_fs_i.h \\ include/uapi/linux/neighbour.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/netlink.h \\ include/linux/netlink.h \\ include/net/scm.h \\ $(wildcard include/config/security/network.h) \\ include/linux/security.h \\ $(wildcard include/config/security/network/xfrm.h) \\ $(wildcard include/config/security/path.h) \\ $(wildcard include/config/securityfs.h) \\ include/linux/nsproxy.h \\ include/uapi/linux/netlink.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/net/netlink.h \\ include/net/netlink.h \\ include/linux/in6.h \\ include/uapi/linux/netdevice.h \\ include/uapi/linux/if_packet.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/if_link.h \\ include/linux/if_link.h \\ include/uapi/linux/if_link.h \\ include/uapi/linux/if_bonding.h \\ include/linux/if_bridge.h \\ $(wildcard include/config/bridge.h) \\ $(wildcard include/config/bridge/igmp/snooping.h) \\ include/uapi/linux/if_bridge.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/net/gre.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/net/ip_tunnels.h \\ include/net/dsfield.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/ipv6.h \\ include/linux/ipv6.h \\ $(wildcard include/config/ipv6/router/pref.h) \\ $(wildcard include/config/ipv6/route/info.h) \\ $(wildcard include/config/ipv6/optimistic/dad.h) \\ $(wildcard include/config/ipv6/mip6.h) \\ $(wildcard include/config/ipv6/subtrees.h) \\ include/uapi/linux/ipv6.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/icmpv6.h \\ include/linux/icmpv6.h \\ include/uapi/linux/icmpv6.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/tcp.h \\ include/linux/tcp.h \\ $(wildcard include/config/tcp/md5sig.h) \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/net/sock.h \\ include/net/sock.h \\ $(wildcard include/config/net.h) \\ $(wildcard include/config/inet.h) \\ include/linux/uaccess.h \\ include/linux/page_counter.h \\ include/linux/memcontrol.h \\ $(wildcard include/config/memcg/swap.h) \\ include/linux/filter.h \\ $(wildcard include/config/bpf/jit.h) \\ arch/x86/include/asm/cacheflush.h \\ $(wildcard include/config/debug/rodata/test.h) \\ include/asm-generic/cacheflush.h \\ include/uapi/linux/filter.h \\ include/uapi/linux/bpf_common.h \\ include/uapi/linux/bpf.h \\ include/linux/rculist_nulls.h \\ include/linux/poll.h \\ include/uapi/linux/poll.h \\ arch/x86/include/uapi/asm/poll.h \\ include/uapi/asm-generic/poll.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/net/dst.h \\ include/net/dst.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/rtnetlink.h \\ include/linux/rtnetlink.h \\ $(wildcard include/config/net/ingress.h) \\ include/uapi/linux/rtnetlink.h \\ include/uapi/linux/if_addr.h \\ include/net/neighbour.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/net/rtnetlink.h \\ include/net/rtnetlink.h \\ include/net/tcp_states.h \\ include/uapi/linux/net_tstamp.h \\ include/net/inet_connection_sock.h \\ include/net/inet_sock.h \\ include/net/request_sock.h \\ include/net/netns/hash.h \\ include/net/inet_timewait_sock.h \\ include/net/timewait_sock.h \\ include/uapi/linux/tcp.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/udp.h \\ include/linux/udp.h \\ include/uapi/linux/udp.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/net/inet_ecn.h \\ include/net/inet_ecn.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/net/ip.h \\ include/net/ip.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/net/route.h \\ include/net/route.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/net/inetpeer.h \\ include/net/inetpeer.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/net/ipv6.h \\ $(wildcard include/config/have/efficient/unaligned/access.h) \\ include/net/ipv6.h \\ include/net/if_inet6.h \\ include/net/ndisc.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/if_arp.h \\ include/linux/if_arp.h \\ $(wildcard include/config/firewire/net.h) \\ include/uapi/linux/if_arp.h \\ include/linux/hash.h \\ $(wildcard include/config/arch/has/fast/multiplier.h) \\ include/uapi/linux/in_route.h \\ include/uapi/linux/route.h \\ include/net/gre.h \\ include/net/icmp.h \\ include/net/protocol.h \\ include/net/xfrm.h \\ $(wildcard include/config/xfrm/sub/policy.h) \\ $(wildcard include/config/xfrm/migrate.h) \\ include/uapi/linux/pfkeyv2.h \\ include/uapi/linux/ipsec.h \\ include/linux/audit.h \\ $(wildcard include/config/audit/compat/generic.h) \\ include/linux/ptrace.h \\ include/linux/pid_namespace.h \\ $(wildcard include/config/pid/ns.h) \\ include/uapi/linux/ptrace.h \\ include/uapi/linux/audit.h \\ $(wildcard include/config/change.h) \\ arch/x86/include/asm/syscall.h \\ arch/x86/include/asm/asm-offsets.h \\ include/generated/asm-offsets.h \\ include/net/ip6_fib.h \\ include/linux/ipv6_route.h \\ include/uapi/linux/ipv6_route.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/gso.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/../datapath.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/../compat.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/net/netfilter/ipv6/nf_defrag_ipv6.h \\ include/net/netfilter/ipv6/nf_defrag_ipv6.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/../flow.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/openvswitch.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/flex_array.h \\ include/linux/flex_array.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/reciprocal_div.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/net/dst_metadata.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/../flow_table.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/../vlan.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/if_vlan.h \\ include/linux/if_vlan.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/compat/include/linux/etherdevice.h \\ include/linux/etherdevice.h \\ arch/x86/include/asm/unaligned.h \\ include/linux/unaligned/access_ok.h \\ include/linux/unaligned/generic.h \\ include/uapi/linux/if_vlan.h \\ /home/zrd/openvswitch-2.5.0/datapath/linux/gre.o: $(deps_/home/zrd/openvswitch-2.5.0/datapath/linux/gre.o) $(deps_/home/zrd/openvswitch-2.5.0/datapath/linux/gre.o): ",16238,True,4469.924291319824,median "cmd_/home/tank/br4/openvswitch-2.7.0/datapath/linux/utils.o := gcc -Wp,-MD,/home/tank/br4/openvswitch-2.7.0/datapath/linux/.utils.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/5/include -I/home/tank/br4/openvswitch-2.7.0/include -I/home/tank/br4/openvswitch-2.7.0/datapath/linux/compat -I/home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include -I./arch/x86/include -Iarch/x86/include/generated/uapi -Iarch/x86/include/generated -Iinclude -I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -Iubuntu/include -D__KERNEL__ -fno-pie -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -fno-pie -no-pie -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -Wno-maybe-uninitialized -O2 --param=allow-store-data-races=0 -DCC_HAVE_ASM_GOTO -Wframe-larger-than=1024 -fstack-protector-strong -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -pg -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -DVERSION=\\""2.7.0\\"" -I/home/tank/br4/openvswitch-2.7.0/datapath/linux/.. -I/home/tank/br4/openvswitch-2.7.0/datapath/linux/.. -g -include /home/tank/br4/openvswitch-2.7.0/datapath/linux/kcompat.h -DMODULE -D""KBUILD_STR(s)=\\#s"" -D""KBUILD_BASENAME=KBUILD_STR(utils)"" -D""KBUILD_MODNAME=KBUILD_STR(openvswitch)"" -c -o /home/tank/br4/openvswitch-2.7.0/datapath/linux/.tmp_utils.o /home/tank/br4/openvswitch-2.7.0/datapath/linux/utils.c source_/home/tank/br4/openvswitch-2.7.0/datapath/linux/utils.o := /home/tank/br4/openvswitch-2.7.0/datapath/linux/utils.c deps_/home/tank/br4/openvswitch-2.7.0/datapath/linux/utils.o := \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/kcompat.h \\ include/generated/uapi/linux/version.h \\ include/linux/module.h \\ $(wildcard include/config/modules.h) \\ $(wildcard include/config/sysfs.h) \\ $(wildcard include/config/module/sig.h) \\ $(wildcard include/config/modules/tree/lookup.h) \\ $(wildcard include/config/unused/symbols.h) \\ $(wildcard include/config/generic/bug.h) \\ $(wildcard include/config/kallsyms.h) \\ $(wildcard include/config/smp.h) \\ $(wildcard include/config/tracepoints.h) \\ $(wildcard include/config/tracing.h) \\ $(wildcard include/config/event/tracing.h) \\ $(wildcard include/config/ftrace/mcount/record.h) \\ $(wildcard include/config/livepatch.h) \\ $(wildcard include/config/module/unload.h) \\ $(wildcard include/config/constructors.h) \\ $(wildcard include/config/debug/set/module/ronx.h) \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/linux/list.h \\ include/linux/list.h \\ $(wildcard include/config/debug/list.h) \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/linux/types.h \\ include/linux/types.h \\ $(wildcard include/config/have/uid16.h) \\ $(wildcard include/config/uid16.h) \\ $(wildcard include/config/lbdaf.h) \\ $(wildcard include/config/arch/dma/addr/t/64bit.h) \\ $(wildcard include/config/phys/addr/t/64bit.h) \\ $(wildcard include/config/64bit.h) \\ include/uapi/linux/types.h \\ arch/x86/include/uapi/asm/types.h \\ include/uapi/asm-generic/types.h \\ include/asm-generic/int-ll64.h \\ include/uapi/asm-generic/int-ll64.h \\ arch/x86/include/uapi/asm/bitsperlong.h \\ include/asm-generic/bitsperlong.h \\ include/uapi/asm-generic/bitsperlong.h \\ include/uapi/linux/posix_types.h \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/linux/stddef.h \\ include/linux/stddef.h \\ include/uapi/linux/stddef.h \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/linux/compiler.h \\ include/linux/compiler.h \\ $(wildcard include/config/sparse/rcu/pointer.h) \\ $(wildcard include/config/trace/branch/profiling.h) \\ $(wildcard include/config/profile/all/branches.h) \\ $(wildcard include/config/kasan.h) \\ $(wildcard include/config/enable/must/check.h) \\ $(wildcard include/config/enable/warn/deprecated.h) \\ $(wildcard include/config/kprobes.h) \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/linux/compiler-gcc.h \\ include/linux/compiler-gcc.h \\ $(wildcard include/config/arch/supports/optimized/inlining.h) \\ $(wildcard include/config/optimize/inlining.h) \\ $(wildcard include/config/gcov/kernel.h) \\ $(wildcard include/config/arch/use/builtin/bswap.h) \\ arch/x86/include/asm/posix_types.h \\ $(wildcard include/config/x86/32.h) \\ arch/x86/include/uapi/asm/posix_types_64.h \\ include/uapi/asm-generic/posix_types.h \\ include/linux/poison.h \\ $(wildcard include/config/illegal/pointer/value.h) \\ include/uapi/linux/const.h \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/linux/kernel.h \\ include/linux/kernel.h \\ $(wildcard include/config/preempt/voluntary.h) \\ $(wildcard include/config/debug/atomic/sleep.h) \\ $(wildcard include/config/mmu.h) \\ $(wildcard include/config/prove/locking.h) \\ $(wildcard include/config/panic/timeout.h) \\ /usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h \\ include/linux/linkage.h \\ include/linux/stringify.h \\ include/linux/export.h \\ $(wildcard include/config/have/underscore/symbol/prefix.h) \\ $(wildcard include/config/modversions.h) \\ arch/x86/include/asm/linkage.h \\ $(wildcard include/config/x86/64.h) \\ $(wildcard include/config/x86/alignment/16.h) \\ include/linux/bitops.h \\ arch/x86/include/asm/bitops.h \\ $(wildcard include/config/x86/cmov.h) \\ arch/x86/include/asm/alternative.h \\ $(wildcard include/config/paravirt.h) \\ arch/x86/include/asm/asm.h \\ arch/x86/include/asm/ptrace.h \\ $(wildcard include/config/x86/debugctlmsr.h) \\ arch/x86/include/asm/segment.h \\ $(wildcard include/config/cc/stackprotector.h) \\ $(wildcard include/config/x86/32/lazy/gs.h) \\ arch/x86/include/asm/cache.h \\ $(wildcard include/config/x86/l1/cache/shift.h) \\ $(wildcard include/config/x86/internode/cache/shift.h) \\ $(wildcard include/config/x86/vsmp.h) \\ arch/x86/include/asm/page_types.h \\ $(wildcard include/config/physical/start.h) \\ $(wildcard include/config/physical/align.h) \\ arch/x86/include/asm/page_64_types.h \\ $(wildcard include/config/randomize/base.h) \\ $(wildcard include/config/randomize/base/max/offset.h) \\ arch/x86/include/uapi/asm/ptrace.h \\ arch/x86/include/uapi/asm/ptrace-abi.h \\ arch/x86/include/asm/processor-flags.h \\ $(wildcard include/config/vm86.h) \\ arch/x86/include/uapi/asm/processor-flags.h \\ arch/x86/include/asm/paravirt_types.h \\ $(wildcard include/config/x86/local/apic.h) \\ $(wildcard include/config/pgtable/levels.h) \\ $(wildcard include/config/x86/pae.h) \\ $(wildcard include/config/queued/spinlocks.h) \\ $(wildcard include/config/paravirt/debug.h) \\ arch/x86/include/asm/desc_defs.h \\ arch/x86/include/asm/kmap_types.h \\ $(wildcard include/config/debug/highmem.h) \\ include/asm-generic/kmap_types.h \\ arch/x86/include/asm/pgtable_types.h \\ $(wildcard include/config/kmemcheck.h) \\ $(wildcard include/config/mem/soft/dirty.h) \\ $(wildcard include/config/proc/fs.h) \\ arch/x86/include/asm/pgtable_64_types.h \\ arch/x86/include/asm/sparsemem.h \\ $(wildcard include/config/sparsemem.h) \\ arch/x86/include/asm/spinlock_types.h \\ $(wildcard include/config/paravirt/spinlocks.h) \\ $(wildcard include/config/nr/cpus.h) \\ include/asm-generic/qspinlock_types.h \\ include/asm-generic/qrwlock_types.h \\ include/asm-generic/ptrace.h \\ arch/x86/include/asm/rmwcc.h \\ arch/x86/include/asm/barrier.h \\ $(wildcard include/config/x86/ppro/fence.h) \\ arch/x86/include/asm/nops.h \\ $(wildcard include/config/mk7.h) \\ $(wildcard include/config/x86/p6/nop.h) \\ include/asm-generic/barrier.h \\ include/asm-generic/bitops/find.h \\ $(wildcard include/config/generic/find/first/bit.h) \\ include/asm-generic/bitops/sched.h \\ arch/x86/include/asm/arch_hweight.h \\ arch/x86/include/asm/cpufeatures.h \\ arch/x86/include/asm/required-features.h \\ $(wildcard include/config/x86/minimum/cpu/family.h) \\ $(wildcard include/config/math/emulation.h) \\ $(wildcard include/config/x86/cmpxchg64.h) \\ $(wildcard include/config/x86/use/3dnow.h) \\ $(wildcard include/config/matom.h) \\ arch/x86/include/asm/disabled-features.h \\ $(wildcard include/config/x86/intel/mpx.h) \\ include/asm-generic/bitops/const_hweight.h \\ include/asm-generic/bitops/le.h \\ arch/x86/include/uapi/asm/byteorder.h \\ include/linux/byteorder/little_endian.h \\ include/uapi/linux/byteorder/little_endian.h \\ include/linux/swab.h \\ include/uapi/linux/swab.h \\ arch/x86/include/uapi/asm/swab.h \\ include/linux/byteorder/generic.h \\ include/asm-generic/bitops/ext2-atomic-setbit.h \\ include/linux/log2.h \\ $(wildcard include/config/arch/has/ilog2/u32.h) \\ $(wildcard include/config/arch/has/ilog2/u64.h) \\ include/linux/typecheck.h \\ include/linux/printk.h \\ $(wildcard include/config/message/loglevel/default.h) \\ $(wildcard include/config/early/printk.h) \\ $(wildcard include/config/printk.h) \\ $(wildcard include/config/dynamic/debug.h) \\ include/linux/init.h \\ $(wildcard include/config/broken/rodata.h) \\ $(wildcard include/config/lto.h) \\ include/linux/kern_levels.h \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/linux/cache.h \\ include/linux/cache.h \\ $(wildcard include/config/arch/has/cache/line/size.h) \\ include/uapi/linux/kernel.h \\ include/uapi/linux/sysinfo.h \\ include/linux/dynamic_debug.h \\ include/linux/stat.h \\ arch/x86/include/uapi/asm/stat.h \\ include/uapi/linux/stat.h \\ include/linux/time.h \\ $(wildcard include/config/arch/uses/gettimeoffset.h) \\ include/linux/seqlock.h \\ $(wildcard include/config/debug/lock/alloc.h) \\ include/linux/spinlock.h \\ $(wildcard include/config/debug/spinlock.h) \\ $(wildcard include/config/generic/lockbreak.h) \\ $(wildcard include/config/preempt.h) \\ include/linux/preempt.h \\ $(wildcard include/config/preempt/count.h) \\ $(wildcard include/config/debug/preempt.h) \\ $(wildcard include/config/preempt/tracer.h) \\ $(wildcard include/config/preempt/notifiers.h) \\ arch/x86/include/asm/preempt.h \\ arch/x86/include/asm/percpu.h \\ $(wildcard include/config/x86/64/smp.h) \\ include/asm-generic/percpu.h \\ $(wildcard include/config/have/setup/per/cpu/area.h) \\ include/linux/threads.h \\ $(wildcard include/config/base/small.h) \\ include/linux/percpu-defs.h \\ $(wildcard include/config/debug/force/weak/per/cpu.h) \\ include/linux/thread_info.h \\ $(wildcard include/config/compat.h) \\ $(wildcard include/config/debug/stack/usage.h) \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/linux/bug.h \\ include/linux/bug.h \\ arch/x86/include/asm/bug.h \\ $(wildcard include/config/debug/bugverbose.h) \\ include/asm-generic/bug.h \\ $(wildcard include/config/bug.h) \\ $(wildcard include/config/generic/bug/relative/pointers.h) \\ arch/x86/include/asm/thread_info.h \\ $(wildcard include/config/ia32/emulation.h) \\ arch/x86/include/asm/page.h \\ arch/x86/include/asm/page_64.h \\ $(wildcard include/config/debug/virtual.h) \\ $(wildcard include/config/flatmem.h) \\ $(wildcard include/config/x86/vsyscall/emulation.h) \\ include/linux/range.h \\ include/asm-generic/memory_model.h \\ $(wildcard include/config/discontigmem.h) \\ $(wildcard include/config/sparsemem/vmemmap.h) \\ include/asm-generic/getorder.h \\ arch/x86/include/asm/cpufeature.h \\ $(wildcard include/config/x86/feature/names.h) \\ $(wildcard include/config/x86/debug/static/cpu/has.h) \\ arch/x86/include/asm/processor.h \\ $(wildcard include/config/m486.h) \\ $(wildcard include/config/xen.h) \\ arch/x86/include/asm/math_emu.h \\ arch/x86/include/uapi/asm/sigcontext.h \\ arch/x86/include/asm/current.h \\ arch/x86/include/asm/msr.h \\ arch/x86/include/asm/msr-index.h \\ $(wildcard include/config/tdp/nominal.h) \\ $(wildcard include/config/tdp/level/1.h) \\ $(wildcard include/config/tdp/level/2.h) \\ $(wildcard include/config/tdp/control.h) \\ $(wildcard include/config/tdp/level1.h) \\ $(wildcard include/config/tdp/level2.h) \\ arch/x86/include/uapi/asm/errno.h \\ include/uapi/asm-generic/errno.h \\ include/uapi/asm-generic/errno-base.h \\ arch/x86/include/asm/cpumask.h \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/linux/cpumask.h \\ include/linux/cpumask.h \\ $(wildcard include/config/cpumask/offstack.h) \\ $(wildcard include/config/hotplug/cpu.h) \\ $(wildcard include/config/debug/per/cpu/maps.h) \\ include/linux/bitmap.h \\ include/linux/string.h \\ $(wildcard include/config/binary/printf.h) \\ include/uapi/linux/string.h \\ arch/x86/include/asm/string.h \\ arch/x86/include/asm/string_64.h \\ arch/x86/include/uapi/asm/msr.h \\ include/uapi/linux/ioctl.h \\ arch/x86/include/uapi/asm/ioctl.h \\ include/asm-generic/ioctl.h \\ include/uapi/asm-generic/ioctl.h \\ arch/x86/include/asm/paravirt.h \\ arch/x86/include/asm/special_insns.h \\ arch/x86/include/asm/fpu/types.h \\ include/linux/personality.h \\ include/uapi/linux/personality.h \\ include/linux/math64.h \\ $(wildcard include/config/arch/supports/int128.h) \\ arch/x86/include/asm/div64.h \\ include/asm-generic/div64.h \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/linux/err.h \\ include/linux/err.h \\ include/linux/irqflags.h \\ $(wildcard include/config/trace/irqflags.h) \\ $(wildcard include/config/irqsoff/tracer.h) \\ $(wildcard include/config/trace/irqflags/support.h) \\ arch/x86/include/asm/irqflags.h \\ include/linux/atomic.h \\ $(wildcard include/config/generic/atomic64.h) \\ arch/x86/include/asm/atomic.h \\ arch/x86/include/asm/cmpxchg.h \\ arch/x86/include/asm/cmpxchg_64.h \\ arch/x86/include/asm/atomic64_64.h \\ include/asm-generic/atomic-long.h \\ include/linux/bottom_half.h \\ include/linux/spinlock_types.h \\ include/linux/lockdep.h \\ $(wildcard include/config/lockdep.h) \\ $(wildcard include/config/lock/stat.h) \\ include/linux/rwlock_types.h \\ arch/x86/include/asm/spinlock.h \\ include/linux/jump_label.h \\ $(wildcard include/config/jump/label.h) \\ arch/x86/include/asm/jump_label.h \\ arch/x86/include/asm/qspinlock.h \\ include/asm-generic/qspinlock.h \\ arch/x86/include/asm/qrwlock.h \\ include/asm-generic/qrwlock.h \\ include/linux/rwlock.h \\ include/linux/spinlock_api_smp.h \\ $(wildcard include/config/inline/spin/lock.h) \\ $(wildcard include/config/inline/spin/lock/bh.h) \\ $(wildcard include/config/inline/spin/lock/irq.h) \\ $(wildcard include/config/inline/spin/lock/irqsave.h) \\ $(wildcard include/config/inline/spin/trylock.h) \\ $(wildcard include/config/inline/spin/trylock/bh.h) \\ $(wildcard include/config/uninline/spin/unlock.h) \\ $(wildcard include/config/inline/spin/unlock/bh.h) \\ $(wildcard include/config/inline/spin/unlock/irq.h) \\ $(wildcard include/config/inline/spin/unlock/irqrestore.h) \\ include/linux/rwlock_api_smp.h \\ $(wildcard include/config/inline/read/lock.h) \\ $(wildcard include/config/inline/write/lock.h) \\ $(wildcard include/config/inline/read/lock/bh.h) \\ $(wildcard include/config/inline/write/lock/bh.h) \\ $(wildcard include/config/inline/read/lock/irq.h) \\ $(wildcard include/config/inline/write/lock/irq.h) \\ $(wildcard include/config/inline/read/lock/irqsave.h) \\ $(wildcard include/config/inline/write/lock/irqsave.h) \\ $(wildcard include/config/inline/read/trylock.h) \\ $(wildcard include/config/inline/write/trylock.h) \\ $(wildcard include/config/inline/read/unlock.h) \\ $(wildcard include/config/inline/write/unlock.h) \\ $(wildcard include/config/inline/read/unlock/bh.h) \\ $(wildcard include/config/inline/write/unlock/bh.h) \\ $(wildcard include/config/inline/read/unlock/irq.h) \\ $(wildcard include/config/inline/write/unlock/irq.h) \\ $(wildcard include/config/inline/read/unlock/irqrestore.h) \\ $(wildcard include/config/inline/write/unlock/irqrestore.h) \\ include/linux/time64.h \\ include/uapi/linux/time.h \\ include/linux/uidgid.h \\ $(wildcard include/config/multiuser.h) \\ $(wildcard include/config/user/ns.h) \\ include/linux/highuid.h \\ include/linux/kmod.h \\ include/linux/gfp.h \\ $(wildcard include/config/highmem.h) \\ $(wildcard include/config/zone/dma.h) \\ $(wildcard include/config/zone/dma32.h) \\ $(wildcard include/config/zone/device.h) \\ $(wildcard include/config/numa.h) \\ $(wildcard include/config/deferred/struct/page/init.h) \\ $(wildcard include/config/pm/sleep.h) \\ $(wildcard include/config/cma.h) \\ include/linux/mmdebug.h \\ $(wildcard include/config/debug/vm.h) \\ include/linux/mmzone.h \\ $(wildcard include/config/force/max/zoneorder.h) \\ $(wildcard include/config/memory/isolation.h) \\ $(wildcard include/config/memcg.h) \\ $(wildcard include/config/memory/hotplug.h) \\ $(wildcard include/config/compaction.h) \\ $(wildcard include/config/flat/node/mem/map.h) \\ $(wildcard include/config/page/extension.h) \\ $(wildcard include/config/no/bootmem.h) \\ $(wildcard include/config/numa/balancing.h) \\ $(wildcard include/config/have/memory/present.h) \\ $(wildcard include/config/have/memoryless/nodes.h) \\ $(wildcard include/config/need/node/memmap/size.h) \\ $(wildcard include/config/have/memblock/node/map.h) \\ $(wildcard include/config/need/multiple/nodes.h) \\ $(wildcard include/config/have/arch/early/pfn/to/nid.h) \\ $(wildcard include/config/sparsemem/extreme.h) \\ $(wildcard include/config/have/arch/pfn/valid.h) \\ $(wildcard include/config/holes/in/zone.h) \\ $(wildcard include/config/arch/has/holes/memorymodel.h) \\ include/linux/wait.h \\ include/uapi/linux/wait.h \\ include/linux/numa.h \\ $(wildcard include/config/nodes/shift.h) \\ include/linux/nodemask.h \\ $(wildcard include/config/movable/node.h) \\ include/linux/pageblock-flags.h \\ $(wildcard include/config/hugetlb/page.h) \\ $(wildcard include/config/hugetlb/page/size/variable.h) \\ include/linux/page-flags-layout.h \\ include/generated/bounds.h \\ include/linux/memory_hotplug.h \\ $(wildcard include/config/memory/hotremove.h) \\ $(wildcard include/config/have/arch/nodedata/extension.h) \\ $(wildcard include/config/have/bootmem/info/node.h) \\ include/linux/notifier.h \\ include/linux/errno.h \\ include/uapi/linux/errno.h \\ include/linux/mutex.h \\ $(wildcard include/config/debug/mutexes.h) \\ $(wildcard include/config/mutex/spin/on/owner.h) \\ include/linux/osq_lock.h \\ include/linux/rwsem.h \\ $(wildcard include/config/rwsem/spin/on/owner.h) \\ $(wildcard include/config/rwsem/generic/spinlock.h) \\ arch/x86/include/asm/rwsem.h \\ include/linux/srcu.h \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/linux/rcupdate.h \\ include/linux/rcupdate.h \\ $(wildcard include/config/tiny/rcu.h) \\ $(wildcard include/config/tree/rcu.h) \\ $(wildcard include/config/preempt/rcu.h) \\ $(wildcard include/config/rcu/trace.h) \\ $(wildcard include/config/rcu/stall/common.h) \\ $(wildcard include/config/no/hz/full.h) \\ $(wildcard include/config/rcu/nocb/cpu.h) \\ $(wildcard include/config/tasks/rcu.h) \\ $(wildcard include/config/debug/objects/rcu/head.h) \\ $(wildcard include/config/prove/rcu.h) \\ $(wildcard include/config/rcu/boost.h) \\ $(wildcard include/config/rcu/nocb/cpu/all.h) \\ $(wildcard include/config/no/hz/full/sysidle.h) \\ include/linux/completion.h \\ include/linux/debugobjects.h \\ $(wildcard include/config/debug/objects.h) \\ $(wildcard include/config/debug/objects/free.h) \\ include/linux/ktime.h \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/linux/jiffies.h \\ include/linux/jiffies.h \\ include/linux/timex.h \\ include/uapi/linux/timex.h \\ include/uapi/linux/param.h \\ arch/x86/include/uapi/asm/param.h \\ include/asm-generic/param.h \\ $(wildcard include/config/hz.h) \\ include/uapi/asm-generic/param.h \\ arch/x86/include/asm/timex.h \\ arch/x86/include/asm/tsc.h \\ $(wildcard include/config/x86/tsc.h) \\ include/generated/timeconst.h \\ include/linux/timekeeping.h \\ include/linux/rcutree.h \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/linux/workqueue.h \\ include/linux/workqueue.h \\ $(wildcard include/config/debug/objects/work.h) \\ $(wildcard include/config/freezer.h) \\ include/linux/timer.h \\ $(wildcard include/config/timer/stats.h) \\ $(wildcard include/config/debug/objects/timers.h) \\ $(wildcard include/config/no/hz/common.h) \\ include/linux/sysctl.h \\ $(wildcard include/config/sysctl.h) \\ include/linux/rbtree.h \\ include/uapi/linux/sysctl.h \\ arch/x86/include/asm/mmzone.h \\ arch/x86/include/asm/mmzone_64.h \\ arch/x86/include/asm/smp.h \\ $(wildcard include/config/x86/io/apic.h) \\ $(wildcard include/config/x86/32/smp.h) \\ $(wildcard include/config/debug/nmi/selftest.h) \\ arch/x86/include/asm/mpspec.h \\ $(wildcard include/config/eisa.h) \\ $(wildcard include/config/x86/mpparse.h) \\ arch/x86/include/asm/mpspec_def.h \\ arch/x86/include/asm/x86_init.h \\ arch/x86/include/uapi/asm/bootparam.h \\ include/linux/screen_info.h \\ include/uapi/linux/screen_info.h \\ include/linux/apm_bios.h \\ include/uapi/linux/apm_bios.h \\ include/linux/edd.h \\ include/uapi/linux/edd.h \\ arch/x86/include/asm/e820.h \\ $(wildcard include/config/efi.h) \\ $(wildcard include/config/hibernation.h) \\ arch/x86/include/uapi/asm/e820.h \\ $(wildcard include/config/x86/pmem/legacy.h) \\ $(wildcard include/config/intel/txt.h) \\ include/linux/ioport.h \\ arch/x86/include/asm/ist.h \\ arch/x86/include/uapi/asm/ist.h \\ include/video/edid.h \\ $(wildcard include/config/x86.h) \\ include/uapi/video/edid.h \\ arch/x86/include/asm/apicdef.h \\ arch/x86/include/asm/apic.h \\ $(wildcard include/config/x86/x2apic.h) \\ include/linux/pm.h \\ $(wildcard include/config/vt/console/sleep.h) \\ $(wildcard include/config/pm.h) \\ $(wildcard include/config/pm/clk.h) \\ $(wildcard include/config/pm/generic/domains.h) \\ arch/x86/include/asm/fixmap.h \\ $(wildcard include/config/paravirt/clock.h) \\ $(wildcard include/config/provide/ohci1394/dma/init.h) \\ $(wildcard include/config/pci/mmconfig.h) \\ $(wildcard include/config/x86/intel/mid.h) \\ arch/x86/include/asm/acpi.h \\ $(wildcard include/config/acpi/apei.h) \\ $(wildcard include/config/acpi.h) \\ $(wildcard include/config/acpi/numa.h) \\ include/acpi/pdc_intel.h \\ arch/x86/include/asm/numa.h \\ $(wildcard include/config/numa/emu.h) \\ arch/x86/include/asm/topology.h \\ include/asm-generic/topology.h \\ arch/x86/include/asm/mmu.h \\ $(wildcard include/config/modify/ldt/syscall.h) \\ arch/x86/include/asm/realmode.h \\ $(wildcard include/config/acpi/sleep.h) \\ arch/x86/include/asm/io.h \\ $(wildcard include/config/mtrr.h) \\ arch/x86/include/generated/asm/early_ioremap.h \\ include/asm-generic/early_ioremap.h \\ $(wildcard include/config/generic/early/ioremap.h) \\ include/asm-generic/iomap.h \\ $(wildcard include/config/has/ioport/map.h) \\ $(wildcard include/config/pci.h) \\ $(wildcard include/config/generic/iomap.h) \\ include/asm-generic/pci_iomap.h \\ $(wildcard include/config/no/generic/pci/ioport/map.h) \\ $(wildcard include/config/generic/pci/iomap.h) \\ include/xen/xen.h \\ $(wildcard include/config/xen/dom0.h) \\ $(wildcard include/config/xen/pvh.h) \\ include/xen/interface/xen.h \\ arch/x86/include/asm/xen/interface.h \\ arch/x86/include/asm/xen/interface_64.h \\ arch/x86/include/asm/pvclock-abi.h \\ arch/x86/include/asm/xen/hypervisor.h \\ include/xen/features.h \\ include/xen/interface/features.h \\ arch/x86/include/asm/pvclock.h \\ include/linux/clocksource.h \\ $(wildcard include/config/arch/clocksource/data.h) \\ $(wildcard include/config/clocksource/watchdog.h) \\ $(wildcard include/config/clksrc/probe.h) \\ arch/x86/include/asm/clocksource.h \\ arch/x86/include/uapi/asm/vsyscall.h \\ include/asm-generic/fixmap.h \\ arch/x86/include/asm/idle.h \\ arch/x86/include/asm/io_apic.h \\ arch/x86/include/asm/irq_vectors.h \\ $(wildcard include/config/have/kvm.h) \\ $(wildcard include/config/pci/msi.h) \\ include/linux/topology.h \\ $(wildcard include/config/use/percpu/numa/node/id.h) \\ $(wildcard include/config/sched/smt.h) \\ include/linux/smp.h \\ $(wildcard include/config/up/late/init.h) \\ include/linux/llist.h \\ $(wildcard include/config/arch/have/nmi/safe/cmpxchg.h) \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/linux/percpu.h \\ include/linux/percpu.h \\ $(wildcard include/config/need/per/cpu/embed/first/chunk.h) \\ $(wildcard include/config/need/per/cpu/page/first/chunk.h) \\ include/linux/pfn.h \\ include/linux/elf.h \\ arch/x86/include/asm/elf.h \\ $(wildcard include/config/x86/x32/abi.h) \\ arch/x86/include/asm/user.h \\ arch/x86/include/asm/user_64.h \\ arch/x86/include/uapi/asm/auxvec.h \\ arch/x86/include/asm/vdso.h \\ $(wildcard include/config/x86/x32.h) \\ include/linux/mm_types.h \\ $(wildcard include/config/split/ptlock/cpus.h) \\ $(wildcard include/config/arch/enable/split/pmd/ptlock.h) \\ $(wildcard include/config/have/cmpxchg/double.h) \\ $(wildcard include/config/have/aligned/struct/page.h) \\ $(wildcard include/config/transparent/hugepage.h) \\ $(wildcard include/config/userfaultfd.h) \\ $(wildcard include/config/aio.h) \\ $(wildcard include/config/mmu/notifier.h) \\ $(wildcard include/config/arch/want/batched/unmap/tlb/flush.h) \\ include/linux/auxvec.h \\ include/uapi/linux/auxvec.h \\ include/linux/uprobes.h \\ $(wildcard include/config/uprobes.h) \\ arch/x86/include/asm/uprobes.h \\ include/uapi/linux/elf.h \\ include/uapi/linux/elf-em.h \\ include/linux/kobject.h \\ $(wildcard include/config/uevent/helper.h) \\ $(wildcard include/config/debug/kobject/release.h) \\ include/linux/sysfs.h \\ include/linux/kernfs.h \\ $(wildcard include/config/kernfs.h) \\ include/linux/idr.h \\ include/linux/kobject_ns.h \\ include/linux/kref.h \\ include/linux/moduleparam.h \\ $(wildcard include/config/alpha.h) \\ $(wildcard include/config/ia64.h) \\ $(wildcard include/config/ppc64.h) \\ include/linux/rbtree_latch.h \\ arch/x86/include/asm/module.h \\ $(wildcard include/config/m586.h) \\ $(wildcard include/config/m586tsc.h) \\ $(wildcard include/config/m586mmx.h) \\ $(wildcard include/config/mcore2.h) \\ $(wildcard include/config/m686.h) \\ $(wildcard include/config/mpentiumii.h) \\ $(wildcard include/config/mpentiumiii.h) \\ $(wildcard include/config/mpentiumm.h) \\ $(wildcard include/config/mpentium4.h) \\ $(wildcard include/config/mk6.h) \\ $(wildcard include/config/mk8.h) \\ $(wildcard include/config/melan.h) \\ $(wildcard include/config/mcrusoe.h) \\ $(wildcard include/config/mefficeon.h) \\ $(wildcard include/config/mwinchipc6.h) \\ $(wildcard include/config/mwinchip3d.h) \\ $(wildcard include/config/mcyrixiii.h) \\ $(wildcard include/config/mviac3/2.h) \\ $(wildcard include/config/mviac7.h) \\ $(wildcard include/config/mgeodegx1.h) \\ $(wildcard include/config/mgeode/lx.h) \\ include/asm-generic/module.h \\ $(wildcard include/config/have/mod/arch/specific.h) \\ $(wildcard include/config/modules/use/elf/rel.h) \\ $(wildcard include/config/modules/use/elf/rela.h) \\ include/linux/ctype.h \\ include/linux/inet.h \\ include/linux/mm.h \\ $(wildcard include/config/ppc.h) \\ $(wildcard include/config/parisc.h) \\ $(wildcard include/config/metag.h) \\ $(wildcard include/config/stack/growsup.h) \\ $(wildcard include/config/shmem.h) \\ $(wildcard include/config/debug/vm/rb.h) \\ $(wildcard include/config/debug/pagealloc.h) \\ $(wildcard include/config/hugetlbfs.h) \\ include/linux/debug_locks.h \\ $(wildcard include/config/debug/locking/api/selftests.h) \\ include/linux/bit_spinlock.h \\ include/linux/shrinker.h \\ include/linux/resource.h \\ include/uapi/linux/resource.h \\ arch/x86/include/uapi/asm/resource.h \\ include/asm-generic/resource.h \\ include/uapi/asm-generic/resource.h \\ include/linux/page_ext.h \\ $(wildcard include/config/idle/page/tracking.h) \\ $(wildcard include/config/page/owner.h) \\ include/linux/stacktrace.h \\ $(wildcard include/config/stacktrace.h) \\ $(wildcard include/config/user/stacktrace/support.h) \\ arch/x86/include/asm/pgtable.h \\ $(wildcard include/config/debug/wx.h) \\ $(wildcard include/config/have/arch/soft/dirty.h) \\ arch/x86/include/asm/pgtable_64.h \\ include/asm-generic/pgtable.h \\ $(wildcard include/config/have/arch/huge/vmap.h) \\ include/linux/page-flags.h \\ $(wildcard include/config/arch/uses/pg/uncached.h) \\ $(wildcard include/config/memory/failure.h) \\ $(wildcard include/config/swap.h) \\ $(wildcard include/config/ksm.h) \\ include/linux/huge_mm.h \\ include/linux/vmstat.h \\ $(wildcard include/config/vm/event/counters.h) \\ $(wildcard include/config/debug/tlbflush.h) \\ $(wildcard include/config/debug/vm/vmacache.h) \\ include/linux/vm_event_item.h \\ $(wildcard include/config/migration.h) \\ $(wildcard include/config/memory/balloon.h) \\ $(wildcard include/config/balloon/compaction.h) \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/linux/net.h \\ include/linux/net.h \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/linux/random.h \\ include/linux/random.h \\ $(wildcard include/config/arch/random.h) \\ include/linux/once.h \\ include/uapi/linux/random.h \\ include/linux/irqnr.h \\ include/uapi/linux/irqnr.h \\ arch/x86/include/asm/archrandom.h \\ include/linux/fcntl.h \\ include/uapi/linux/fcntl.h \\ arch/x86/include/uapi/asm/fcntl.h \\ include/uapi/asm-generic/fcntl.h \\ include/linux/kmemcheck.h \\ include/uapi/linux/net.h \\ include/linux/socket.h \\ arch/x86/include/uapi/asm/socket.h \\ include/uapi/asm-generic/socket.h \\ arch/x86/include/uapi/asm/sockios.h \\ include/uapi/asm-generic/sockios.h \\ include/uapi/linux/sockios.h \\ include/linux/uio.h \\ include/uapi/linux/uio.h \\ include/uapi/linux/socket.h \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/net/checksum.h \\ include/net/checksum.h \\ arch/x86/include/asm/uaccess.h \\ $(wildcard include/config/x86/intel/usercopy.h) \\ $(wildcard include/config/debug/strict/user/copy/checks.h) \\ arch/x86/include/asm/smap.h \\ $(wildcard include/config/x86/smap.h) \\ arch/x86/include/asm/uaccess_64.h \\ arch/x86/include/asm/checksum.h \\ arch/x86/include/asm/checksum_64.h \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/net/ip.h \\ include/net/ip.h \\ $(wildcard include/config/inet.h) \\ $(wildcard include/config/ipv6.h) \\ include/linux/ip.h \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/linux/skbuff.h \\ include/linux/skbuff.h \\ $(wildcard include/config/nf/conntrack.h) \\ $(wildcard include/config/bridge/netfilter.h) \\ $(wildcard include/config/xfrm.h) \\ $(wildcard include/config/ipv6/ndisc/nodetype.h) \\ $(wildcard include/config/net/sched.h) \\ $(wildcard include/config/net/cls/act.h) \\ $(wildcard include/config/net/rx/busy/poll.h) \\ $(wildcard include/config/xps.h) \\ $(wildcard include/config/network/secmark.h) \\ $(wildcard include/config/net/switchdev.h) \\ $(wildcard include/config/network/phy/timestamping.h) \\ $(wildcard include/config/netfilter/xt/target/trace.h) \\ $(wildcard include/config/nf/tables.h) \\ include/linux/textsearch.h \\ include/linux/slab.h \\ $(wildcard include/config/debug/slab.h) \\ $(wildcard include/config/failslab.h) \\ $(wildcard include/config/slab.h) \\ $(wildcard include/config/slub.h) \\ $(wildcard include/config/slob.h) \\ include/linux/kmemleak.h \\ $(wildcard include/config/debug/kmemleak.h) \\ include/linux/kasan.h \\ include/linux/hrtimer.h \\ $(wildcard include/config/high/res/timers.h) \\ $(wildcard include/config/time/low/res.h) \\ $(wildcard include/config/timerfd.h) \\ include/linux/timerqueue.h \\ include/linux/dma-mapping.h \\ $(wildcard include/config/has/dma.h) \\ $(wildcard include/config/arch/has/dma/set/coherent/mask.h) \\ $(wildcard include/config/have/dma/attrs.h) \\ $(wildcard include/config/need/dma/map/state.h) \\ include/linux/sizes.h \\ include/linux/device.h \\ $(wildcard include/config/debug/devres.h) \\ $(wildcard include/config/generic/msi/irq/domain.h) \\ $(wildcard include/config/pinctrl.h) \\ $(wildcard include/config/generic/msi/irq.h) \\ $(wildcard include/config/dma/cma.h) \\ $(wildcard include/config/of.h) \\ $(wildcard include/config/devtmpfs.h) \\ $(wildcard include/config/sysfs/deprecated.h) \\ include/linux/klist.h \\ include/linux/pinctrl/devinfo.h \\ include/linux/pinctrl/consumer.h \\ include/linux/seq_file.h \\ include/linux/fs.h \\ $(wildcard include/config/fs/posix/acl.h) \\ $(wildcard include/config/security.h) \\ $(wildcard include/config/cgroup/writeback.h) \\ $(wildcard include/config/ima.h) \\ $(wildcard include/config/fsnotify.h) \\ $(wildcard include/config/epoll.h) \\ $(wildcard include/config/file/locking.h) \\ $(wildcard include/config/quota.h) \\ $(wildcard include/config/blk/dev/loop.h) \\ $(wildcard include/config/fs/dax.h) \\ $(wildcard include/config/block.h) \\ include/linux/kdev_t.h \\ include/uapi/linux/kdev_t.h \\ include/linux/dcache.h \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/linux/rculist.h \\ include/linux/rculist.h \\ include/linux/rculist_bl.h \\ include/linux/list_bl.h \\ include/linux/lockref.h \\ $(wildcard include/config/arch/use/cmpxchg/lockref.h) \\ include/linux/path.h \\ include/linux/list_lru.h \\ $(wildcard include/config/memcg/kmem.h) \\ include/linux/radix-tree.h \\ include/linux/pid.h \\ include/linux/capability.h \\ include/uapi/linux/capability.h \\ include/linux/semaphore.h \\ include/uapi/linux/fiemap.h \\ include/linux/migrate_mode.h \\ include/linux/percpu-rwsem.h \\ include/linux/rcu_sync.h \\ include/linux/blk_types.h \\ $(wildcard include/config/blk/cgroup.h) \\ $(wildcard include/config/blk/dev/integrity.h) \\ include/uapi/linux/fs.h \\ include/uapi/linux/limits.h \\ include/linux/quota.h \\ $(wildcard include/config/quota/netlink/interface.h) \\ include/linux/percpu_counter.h \\ include/uapi/linux/dqblk_xfs.h \\ include/linux/dqblk_v1.h \\ include/linux/dqblk_v2.h \\ include/linux/dqblk_qtree.h \\ include/linux/projid.h \\ include/uapi/linux/quota.h \\ include/linux/nfs_fs_i.h \\ include/linux/cred.h \\ $(wildcard include/config/debug/credentials.h) \\ $(wildcard include/config/keys.h) \\ include/linux/key.h \\ include/linux/assoc_array.h \\ $(wildcard include/config/associative/array.h) \\ include/linux/selinux.h \\ $(wildcard include/config/security/selinux.h) \\ include/linux/pinctrl/pinctrl-state.h \\ include/linux/ratelimit.h \\ arch/x86/include/asm/device.h \\ $(wildcard include/config/x86/dev/dma/ops.h) \\ $(wildcard include/config/intel/iommu.h) \\ $(wildcard include/config/amd/iommu.h) \\ include/linux/pm_wakeup.h \\ include/linux/dma-attrs.h \\ include/linux/dma-direction.h \\ include/linux/scatterlist.h \\ $(wildcard include/config/debug/sg.h) \\ $(wildcard include/config/need/sg/dma/length.h) \\ arch/x86/include/asm/dma-mapping.h \\ $(wildcard include/config/isa.h) \\ $(wildcard include/config/x86/dma/remap.h) \\ include/linux/dma-debug.h \\ $(wildcard include/config/dma/api/debug.h) \\ arch/x86/include/asm/swiotlb.h \\ $(wildcard include/config/swiotlb.h) \\ include/linux/swiotlb.h \\ include/linux/dma-contiguous.h \\ include/asm-generic/dma-mapping-common.h \\ include/asm-generic/dma-coherent.h \\ $(wildcard include/config/have/generic/dma/coherent.h) \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/linux/netdev_features.h \\ include/linux/netdev_features.h \\ include/linux/sched.h \\ $(wildcard include/config/sched/debug.h) \\ $(wildcard include/config/lockup/detector.h) \\ $(wildcard include/config/detect/hung/task.h) \\ $(wildcard include/config/core/dump/default/elf/headers.h) \\ $(wildcard include/config/virt/cpu/accounting/native.h) \\ $(wildcard include/config/sched/autogroup.h) \\ $(wildcard include/config/bsd/process/acct.h) \\ $(wildcard include/config/taskstats.h) \\ $(wildcard include/config/audit.h) \\ $(wildcard include/config/inotify/user.h) \\ $(wildcard include/config/fanotify.h) \\ $(wildcard include/config/posix/mqueue.h) \\ $(wildcard include/config/perf/events.h) \\ $(wildcard include/config/bpf/syscall.h) \\ $(wildcard include/config/sched/info.h) \\ $(wildcard include/config/task/delay/acct.h) \\ $(wildcard include/config/schedstats.h) \\ $(wildcard include/config/sched/mc.h) \\ $(wildcard include/config/fair/group/sched.h) \\ $(wildcard include/config/rt/group/sched.h) \\ $(wildcard include/config/cgroup/sched.h) \\ $(wildcard include/config/blk/dev/io/trace.h) \\ $(wildcard include/config/compat/brk.h) \\ $(wildcard include/config/cgroups.h) \\ $(wildcard include/config/virt/cpu/accounting/gen.h) \\ $(wildcard include/config/sysvipc.h) \\ $(wildcard include/config/auditsyscall.h) \\ $(wildcard include/config/rt/mutexes.h) \\ $(wildcard include/config/task/xacct.h) \\ $(wildcard include/config/cpusets.h) \\ $(wildcard include/config/futex.h) \\ $(wildcard include/config/fault/injection.h) \\ $(wildcard include/config/latencytop.h) \\ $(wildcard include/config/function/graph/tracer.h) \\ $(wildcard include/config/bcache.h) \\ $(wildcard include/config/arch/wants/dynamic/task/struct.h) \\ $(wildcard include/config/have/unstable/sched/clock.h) \\ $(wildcard include/config/irq/time/accounting.h) \\ $(wildcard include/config/have/copy/thread/tls.h) \\ include/uapi/linux/sched.h \\ include/linux/sched/prio.h \\ include/linux/plist.h \\ $(wildcard include/config/debug/pi/list.h) \\ include/linux/cputime.h \\ arch/x86/include/generated/asm/cputime.h \\ include/asm-generic/cputime.h \\ $(wildcard include/config/virt/cpu/accounting.h) \\ include/asm-generic/cputime_jiffies.h \\ include/linux/sem.h \\ include/uapi/linux/sem.h \\ include/linux/ipc.h \\ include/uapi/linux/ipc.h \\ arch/x86/include/uapi/asm/ipcbuf.h \\ include/uapi/asm-generic/ipcbuf.h \\ arch/x86/include/uapi/asm/sembuf.h \\ include/linux/shm.h \\ include/uapi/linux/shm.h \\ arch/x86/include/uapi/asm/shmbuf.h \\ include/uapi/asm-generic/shmbuf.h \\ arch/x86/include/asm/shmparam.h \\ include/linux/signal.h \\ $(wildcard include/config/old/sigaction.h) \\ include/uapi/linux/signal.h \\ arch/x86/include/asm/signal.h \\ arch/x86/include/uapi/asm/signal.h \\ include/uapi/asm-generic/signal-defs.h \\ arch/x86/include/uapi/asm/siginfo.h \\ include/asm-generic/siginfo.h \\ include/uapi/asm-generic/siginfo.h \\ include/linux/proportions.h \\ include/linux/seccomp.h \\ $(wildcard include/config/seccomp.h) \\ $(wildcard include/config/have/arch/seccomp/filter.h) \\ $(wildcard include/config/seccomp/filter.h) \\ $(wildcard include/config/checkpoint/restore.h) \\ include/uapi/linux/seccomp.h \\ arch/x86/include/asm/seccomp.h \\ arch/x86/include/asm/unistd.h \\ arch/x86/include/uapi/asm/unistd.h \\ arch/x86/include/generated/uapi/asm/unistd_64.h \\ arch/x86/include/generated/asm/unistd_64_x32.h \\ arch/x86/include/asm/ia32_unistd.h \\ arch/x86/include/generated/asm/unistd_32_ia32.h \\ include/asm-generic/seccomp.h \\ include/uapi/linux/unistd.h \\ include/linux/rtmutex.h \\ $(wildcard include/config/debug/rt/mutexes.h) \\ include/linux/task_io_accounting.h \\ $(wildcard include/config/task/io/accounting.h) \\ include/linux/latencytop.h \\ include/uapi/linux/magic.h \\ include/linux/cgroup-defs.h \\ include/linux/percpu-refcount.h \\ include/linux/cgroup_subsys.h \\ $(wildcard include/config/cgroup/cpuacct.h) \\ $(wildcard include/config/cgroup/device.h) \\ $(wildcard include/config/cgroup/freezer.h) \\ $(wildcard include/config/cgroup/net/classid.h) \\ $(wildcard include/config/cgroup/perf.h) \\ $(wildcard include/config/cgroup/net/prio.h) \\ $(wildcard include/config/cgroup/hugetlb.h) \\ $(wildcard include/config/cgroup/pids.h) \\ $(wildcard include/config/cgroup/debug.h) \\ include/net/flow_dissector.h \\ include/linux/in6.h \\ include/uapi/linux/in6.h \\ include/uapi/linux/libc-compat.h \\ include/uapi/linux/if_ether.h \\ include/linux/splice.h \\ include/linux/pipe_fs_i.h \\ include/net/flow.h \\ include/linux/jhash.h \\ include/linux/unaligned/packed_struct.h \\ include/uapi/linux/ip.h \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/linux/in.h \\ include/linux/in.h \\ include/uapi/linux/in.h \\ include/net/inet_sock.h \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/linux/netdevice.h \\ include/linux/netdevice.h \\ $(wildcard include/config/dcb.h) \\ $(wildcard include/config/hyperv/net.h) \\ $(wildcard include/config/wlan.h) \\ $(wildcard include/config/ax25.h) \\ $(wildcard include/config/mac80211/mesh.h) \\ $(wildcard include/config/net/ipip.h) \\ $(wildcard include/config/net/ipgre.h) \\ $(wildcard include/config/ipv6/sit.h) \\ $(wildcard include/config/ipv6/tunnel.h) \\ $(wildcard include/config/rps.h) \\ $(wildcard include/config/netpoll.h) \\ $(wildcard include/config/bql.h) \\ $(wildcard include/config/rfs/accel.h) \\ $(wildcard include/config/fcoe.h) \\ $(wildcard include/config/net/poll/controller.h) \\ $(wildcard include/config/libfcoe.h) \\ $(wildcard include/config/wireless/ext.h) \\ $(wildcard include/config/net/l3/master/dev.h) \\ $(wildcard include/config/vlan/8021q.h) \\ $(wildcard include/config/net/dsa.h) \\ $(wildcard include/config/tipc.h) \\ $(wildcard include/config/mpls/routing.h) \\ $(wildcard include/config/netfilter/ingress.h) \\ $(wildcard include/config/net/flow/limit.h) \\ include/linux/delay.h \\ arch/x86/include/asm/delay.h \\ include/asm-generic/delay.h \\ include/linux/prefetch.h \\ include/linux/dmaengine.h \\ $(wildcard include/config/async/tx/enable/channel/switch.h) \\ $(wildcard include/config/dma/engine.h) \\ $(wildcard include/config/rapidio/dma/engine.h) \\ $(wildcard include/config/async/tx/dma.h) \\ include/linux/dynamic_queue_limits.h \\ include/linux/ethtool.h \\ include/linux/compat.h \\ $(wildcard include/config/compat/old/sigaction.h) \\ $(wildcard include/config/odd/rt/sigaction.h) \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/linux/if.h \\ include/uapi/linux/if.h \\ include/uapi/linux/hdlc/ioctl.h \\ include/uapi/linux/aio_abi.h \\ arch/x86/include/asm/compat.h \\ arch/x86/include/asm/user32.h \\ include/uapi/linux/ethtool.h \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/linux/if_ether.h \\ include/linux/if_ether.h \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/net/net_namespace.h \\ $(wildcard include/config/net/ns.h) \\ include/net/net_namespace.h \\ $(wildcard include/config/ieee802154/6lowpan.h) \\ $(wildcard include/config/ip/sctp.h) \\ $(wildcard include/config/ip/dccp.h) \\ $(wildcard include/config/netfilter.h) \\ $(wildcard include/config/nf/defrag/ipv6.h) \\ $(wildcard include/config/netfilter/netlink/acct.h) \\ $(wildcard include/config/wext/core.h) \\ $(wildcard include/config/ip/vs.h) \\ $(wildcard include/config/mpls.h) \\ include/net/netns/core.h \\ include/net/netns/mib.h \\ $(wildcard include/config/xfrm/statistics.h) \\ include/net/snmp.h \\ include/uapi/linux/snmp.h \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/linux/u64_stats_sync.h \\ include/linux/u64_stats_sync.h \\ include/net/netns/unix.h \\ include/net/netns/packet.h \\ include/net/netns/ipv4.h \\ $(wildcard include/config/ip/multiple/tables.h) \\ $(wildcard include/config/ip/route/classid.h) \\ $(wildcard include/config/ip/mroute.h) \\ $(wildcard include/config/ip/mroute/multiple/tables.h) \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/net/inet_frag.h \\ include/net/inet_frag.h \\ include/net/netns/ipv6.h \\ $(wildcard include/config/ipv6/multiple/tables.h) \\ $(wildcard include/config/ipv6/mroute.h) \\ $(wildcard include/config/ipv6/mroute/multiple/tables.h) \\ include/net/dst_ops.h \\ include/net/netns/ieee802154_6lowpan.h \\ include/net/netns/sctp.h \\ include/net/netns/dccp.h \\ include/net/netns/netfilter.h \\ include/linux/netfilter_defs.h \\ include/uapi/linux/netfilter.h \\ include/net/netns/x_tables.h \\ $(wildcard include/config/bridge/nf/ebtables.h) \\ include/net/netns/conntrack.h \\ $(wildcard include/config/nf/conntrack/proc/compat.h) \\ $(wildcard include/config/nf/conntrack/events.h) \\ $(wildcard include/config/nf/conntrack/labels.h) \\ $(wildcard include/config/nf/nat/needed.h) \\ include/linux/list_nulls.h \\ include/linux/netfilter/nf_conntrack_tcp.h \\ include/uapi/linux/netfilter/nf_conntrack_tcp.h \\ include/net/netns/nftables.h \\ include/net/netns/xfrm.h \\ include/uapi/linux/xfrm.h \\ include/net/flowcache.h \\ include/linux/interrupt.h \\ $(wildcard include/config/irq/forced/threading.h) \\ $(wildcard include/config/generic/irq/probe.h) \\ include/linux/irqreturn.h \\ include/linux/hardirq.h \\ include/linux/ftrace_irq.h \\ $(wildcard include/config/ftrace/nmi/enter.h) \\ include/linux/vtime.h \\ include/linux/context_tracking_state.h \\ $(wildcard include/config/context/tracking.h) \\ include/linux/static_key.h \\ arch/x86/include/asm/hardirq.h \\ $(wildcard include/config/x86/thermal/vector.h) \\ $(wildcard include/config/x86/mce/threshold.h) \\ $(wildcard include/config/x86/mce/amd.h) \\ $(wildcard include/config/hyperv.h) \\ include/linux/irq.h \\ $(wildcard include/config/irq/domain/hierarchy.h) \\ $(wildcard include/config/generic/pending/irq.h) \\ $(wildcard include/config/hardirqs/sw/resend.h) \\ $(wildcard include/config/generic/irq/legacy/alloc/hwirq.h) \\ $(wildcard include/config/generic/irq/legacy.h) \\ include/linux/irqhandler.h \\ include/linux/io.h \\ arch/x86/include/asm/irq.h \\ arch/x86/include/asm/irq_regs.h \\ include/linux/irqdesc.h \\ $(wildcard include/config/irq/preflow/fasteoi.h) \\ $(wildcard include/config/sparse/irq.h) \\ $(wildcard include/config/handle/domain/irq.h) \\ arch/x86/include/asm/hw_irq.h \\ $(wildcard include/config/hpet/timer.h) \\ $(wildcard include/config/dmar/table.h) \\ $(wildcard include/config/ht/irq.h) \\ $(wildcard include/config/x86/uv.h) \\ include/linux/profile.h \\ $(wildcard include/config/profiling.h) \\ arch/x86/include/asm/sections.h \\ $(wildcard include/config/debug/rodata.h) \\ include/asm-generic/sections.h \\ include/net/netns/mpls.h \\ include/linux/ns_common.h \\ include/linux/seq_file_net.h \\ include/net/dsa.h \\ $(wildcard include/config/net/dsa/hwmon.h) \\ include/linux/of.h \\ $(wildcard include/config/sparc.h) \\ $(wildcard include/config/of/dynamic.h) \\ $(wildcard include/config/attach/node.h) \\ $(wildcard include/config/detach/node.h) \\ $(wildcard include/config/add/property.h) \\ $(wildcard include/config/remove/property.h) \\ $(wildcard include/config/update/property.h) \\ $(wildcard include/config/of/numa.h) \\ $(wildcard include/config/no/change.h) \\ $(wildcard include/config/change/add.h) \\ $(wildcard include/config/change/remove.h) \\ $(wildcard include/config/of/resolve.h) \\ $(wildcard include/config/of/overlay.h) \\ include/linux/mod_devicetable.h \\ include/linux/uuid.h \\ include/uapi/linux/uuid.h \\ include/linux/property.h \\ include/linux/fwnode.h \\ include/linux/phy.h \\ include/linux/mii.h \\ include/uapi/linux/mii.h \\ include/linux/phy_fixed.h \\ $(wildcard include/config/fixed/phy.h) \\ include/net/dcbnl.h \\ include/uapi/linux/dcbnl.h \\ include/net/netprio_cgroup.h \\ include/linux/cgroup.h \\ include/uapi/linux/cgroupstats.h \\ include/uapi/linux/taskstats.h \\ include/linux/nsproxy.h \\ include/linux/user_namespace.h \\ $(wildcard include/config/persistent/keyrings.h) \\ include/uapi/linux/neighbour.h \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/linux/netlink.h \\ include/linux/netlink.h \\ include/net/scm.h \\ $(wildcard include/config/security/network.h) \\ include/linux/security.h \\ $(wildcard include/config/security/network/xfrm.h) \\ $(wildcard include/config/security/path.h) \\ $(wildcard include/config/securityfs.h) \\ include/uapi/linux/netlink.h \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/net/netlink.h \\ $(wildcard include/config/have/efficient/unaligned/access.h) \\ include/net/netlink.h \\ include/linux/in6.h \\ include/uapi/linux/netdevice.h \\ include/uapi/linux/if_packet.h \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/linux/if_link.h \\ include/linux/if_link.h \\ include/uapi/linux/if_link.h \\ $(wildcard include/config/pending.h) \\ include/uapi/linux/if_bonding.h \\ include/uapi/linux/pkt_cls.h \\ $(wildcard include/config/net/cls/ind.h) \\ include/uapi/linux/pkt_sched.h \\ include/linux/if_bridge.h \\ $(wildcard include/config/bridge.h) \\ $(wildcard include/config/bridge/igmp/snooping.h) \\ include/uapi/linux/if_bridge.h \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/net/sock.h \\ include/net/sock.h \\ $(wildcard include/config/net.h) \\ include/linux/uaccess.h \\ include/linux/page_counter.h \\ include/linux/memcontrol.h \\ $(wildcard include/config/memcg/swap.h) \\ include/linux/vmpressure.h \\ include/linux/eventfd.h \\ $(wildcard include/config/eventfd.h) \\ include/linux/writeback.h \\ include/linux/flex_proportions.h \\ include/linux/backing-dev-defs.h \\ $(wildcard include/config/debug/fs.h) \\ include/linux/bio.h \\ include/linux/highmem.h \\ arch/x86/include/asm/cacheflush.h \\ $(wildcard include/config/debug/rodata/test.h) \\ include/asm-generic/cacheflush.h \\ include/linux/mempool.h \\ include/linux/ioprio.h \\ include/linux/iocontext.h \\ include/linux/filter.h \\ $(wildcard include/config/bpf/jit.h) \\ include/net/sch_generic.h \\ include/uapi/linux/pkt_cls.h \\ include/net/gen_stats.h \\ include/uapi/linux/gen_stats.h \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/linux/rtnetlink.h \\ include/linux/rtnetlink.h \\ $(wildcard include/config/net/ingress.h) \\ include/uapi/linux/rtnetlink.h \\ include/uapi/linux/if_addr.h \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/net/rtnetlink.h \\ include/net/rtnetlink.h \\ include/uapi/linux/filter.h \\ include/uapi/linux/bpf_common.h \\ include/uapi/linux/bpf.h \\ include/linux/rculist_nulls.h \\ include/linux/poll.h \\ include/uapi/linux/poll.h \\ arch/x86/include/uapi/asm/poll.h \\ include/uapi/asm-generic/poll.h \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/net/dst.h \\ include/net/dst.h \\ include/net/neighbour.h \\ include/net/tcp_states.h \\ include/uapi/linux/net_tstamp.h \\ include/net/request_sock.h \\ include/net/netns/hash.h \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/net/route.h \\ include/net/route.h \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/net/inetpeer.h \\ include/net/inetpeer.h \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/net/ipv6.h \\ include/net/ipv6.h \\ include/linux/ipv6.h \\ $(wildcard include/config/ipv6/router/pref.h) \\ $(wildcard include/config/ipv6/route/info.h) \\ $(wildcard include/config/ipv6/optimistic/dad.h) \\ $(wildcard include/config/ipv6/mip6.h) \\ $(wildcard include/config/ipv6/subtrees.h) \\ include/uapi/linux/ipv6.h \\ include/linux/icmpv6.h \\ include/uapi/linux/icmpv6.h \\ include/linux/tcp.h \\ $(wildcard include/config/tcp/md5sig.h) \\ include/net/inet_connection_sock.h \\ include/net/inet_timewait_sock.h \\ include/net/timewait_sock.h \\ include/uapi/linux/tcp.h \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/compat/include/linux/udp.h \\ include/linux/udp.h \\ include/uapi/linux/udp.h \\ include/net/if_inet6.h \\ include/net/ndisc.h \\ include/linux/if_arp.h \\ $(wildcard include/config/firewire/net.h) \\ include/uapi/linux/if_arp.h \\ include/linux/hash.h \\ include/net/ip_fib.h \\ $(wildcard include/config/ip/route/multipath.h) \\ include/net/fib_rules.h \\ include/uapi/linux/fib_rules.h \\ include/net/l3mdev.h \\ include/uapi/linux/in_route.h \\ include/uapi/linux/route.h \\ /home/tank/br4/openvswitch-2.7.0/datapath/linux/utils.o: $(deps_/home/tank/br4/openvswitch-2.7.0/datapath/linux/utils.o) $(deps_/home/tank/br4/openvswitch-2.7.0/datapath/linux/utils.o): ",16147,True,4375.667742342248,median "// Just to clarify comments, I'm describing the palette pattern // in terms of the palettes index. Or it'll be copied from the // PaletteKnife shit // // W == White // B == Black // RB == Rainbow, uses global hue position // X == Input to the function ////////////////////////////////////////////////////////////////////////////////// // These template need to be updated before each fill call. This is because // // they are either dependend on an input or they rely on some global variable // // that is changed in the animations. // ////////////////////////////////////////////////////////////////////////////////// // RB|B|B|B repeating void update_RainbowBlack_p() { // Instead of blacking out, fill backgroud with rainbow, then // fill every thing with black except fill_palette(gPalette, 16, gHue, 16, RainbowColors_p, gBrightness, gBlending); for (uint8_t i = 0 ; i < 16; i++) { if ( i % 4 == 0) { continue; } gPalette[i] = CRGB::Black; } } void update_Rainbow_p() { fill_palette(gPalette, 16, gHue, 16, RainbowColors_p, gBrightness, gBlending); } // W|RB|RB|RB repeating void update_WhiteRainbow_p() { fill_palette(gPalette, 16, gHue, 16, RainbowColors_p, gBrightness, gBlending); gPalette[0] = CHSV(255, 0, gBrightness); gPalette[4] = CHSV(255, 0, gBrightness); gPalette[8] = CHSV(255, 0, gBrightness); gPalette[12] = CHSV(255, 0, gBrightness); } // W|X|X|X repeating void update_WhiteCol_p() { fill_solid( gPalette, 16, CHSV(gHue, 255, gBrightness)); gPalette[0] = CHSV(255, 0, gBrightness); gPalette[4] = CHSV(255, 0, gBrightness); gPalette[8] = CHSV(255, 0, gBrightness); gPalette[12] = CHSV(255, 0, gBrightness); } // Hue adjustable palettes!!! const uint8_t val_offset = 100; void update_PureCol_p() { fill_solid(gPalette, 16, CHSV(gHue, 255, gBrightness + val_offset)); } // X_LEAD|X_BACK|X_BACK|X_BACK repeating void update_TwoCol_p() { for (uint8_t i = 0; i < 16; i++) { if (i % 4 == 0) { gPalette[i] = CHSV(gHue, 255, gBrightness + val_offset); } else { gPalette[i] = CHSV((gHue + 128) % 255, 255, gBrightness + val_offset); } } } void update_FourCol_p() { for (uint8_t i = 0; i < 16; i++) { if (i % 4 == 0) { gPalette[i] = CHSV(gHue, 255, gBrightness); } else if (i % 4 == 1) { gPalette[i] = CHSV((gHue + 64) % 255, 255, gBrightness + val_offset); } else if (i % 4 == 2) { gPalette[i] = CHSV((gHue + 128) % 255, 255, gBrightness + val_offset); } else if (i % 4 == 3) { gPalette[i] = CHSV((gHue + 192) % 255, 255, gBrightness + val_offset); } } } // One color at the front and nothing else void update_ColLead_p() { for (uint8_t i = 0; i < 16; i++) { if (i % 4 == 0) { gPalette[i] = CHSV(gHue, 255, gBrightness + val_offset); } else { gPalette[i] = CRGB::Black; } } } void update_WhiteBlack_p() { for (uint8_t i = 0; i < 16; i++) { if (i % 4 == 0) { gPalette[i] = CHSV(255, 0, gBrightness); } else { gPalette[i] = CRGB::Black; } } } ////////////////////////////////////////////////////////////////////////////////// // Static templates. These are templates that do not need to be update // // since they are not modular and don't have any dependence on global variables // ////////////////////////////////////////////////////////////////////////////////// // Gradient palette ""chroma_gp"", originally from // http://soliton.vm.bytemark.co.uk/pub/cpt-city/fractint/base/tn/chroma.png.index.html // converted for FastLED with gammas (2.6, 2.2, 2.5) // Size: 2840 bytes of program space. DEFINE_GRADIENT_PALETTE( chroma_gp ) { 0, 4, 6, 5, 0, 4, 6, 5, 0, 7, 6, 8, 1, 7, 6, 8, 1, 9, 6, 10, 2, 9, 6, 10, 2, 12, 6, 14, 2, 12, 6, 14, 2, 16, 6, 17, 3, 16, 6, 17, 3, 20, 6, 22, 4, 20, 6, 22, 4, 24, 6, 27, 5, 24, 6, 27, 5, 30, 6, 32, 5, 30, 6, 32, 5, 35, 6, 38, 6, 35, 6, 38, 6, 42, 6, 45, 7, 42, 6, 45, 7, 49, 6, 52, 7, 49, 6, 52, 7, 57, 6, 61, 8, 57, 6, 61, 8, 66, 6, 69, 9, 66, 6, 69, 9, 75, 6, 79, 10, 75, 6, 79, 10, 86, 6, 89, 10, 86, 6, 89, 10, 97, 6, 100, 11, 97, 6, 100, 11, 109, 6, 112, 12, 109, 6, 112, 12, 121, 6, 125, 12, 121, 6, 125, 12, 135, 37, 182, 9, 3, 237, 182, 9, 3, 237, 182, 6, 3, 238, 182, 6, 3, 238, 165, 6, 3, 239, 165, 6, 3, 239, 150, 6, 3, 239, 150, 6, 3, 239, 135, 6, 3, 240, 135, 6, 3, 240, 121, 6, 3, 241, 121, 6, 3, 241, 109, 6, 3, 242, 109, 6, 3, 242, 97, 6, 3, 242, 97, 6, 3, 242, 86, 6, 3, 243, 86, 6, 3, 243, 75, 6, 3, 244, 75, 6, 3, 244, 66, 6, 3, 244, 66, 6, 3, 244, 57, 6, 3, 245, 57, 6, 3, 245, 49, 6, 3, 246, 49, 6, 3, 246, 42, 6, 3, 247, 42, 6, 3, 247, 35, 6, 3, 247, 35, 6, 3, 247, 30, 6, 3, 248, 30, 6, 3, 248, 24, 6, 3, 249, 24, 6, 3, 249, 20, 6, 3, 249, 20, 6, 3, 249, 16, 6, 3, 250, 16, 6, 3, 250, 12, 6, 3, 251, 12, 6, 3, 251, 9, 6, 3, 252, 9, 6, 3, 252, 7, 6, 3, 252, 7, 6, 3, 252, 4, 6, 3, 253, 4, 6, 3, 253, 3, 6, 3, 254, 3, 6, 3, 254, 2, 6, 3, 255, 2, 6, 3 }; // Gradient palette ""sprinkles_gp"", originally from // http://soliton.vm.bytemark.co.uk/pub/cpt-city/colo/alpen/tn/sprinkles.png.index.html // converted for FastLED with gammas (2.6, 2.2, 2.5) // Size: 40 bytes of program space. DEFINE_GRADIENT_PALETTE( sprinkles_gp ) { 0, 67, 1, 10, 109, 67, 1, 10, 109, 194, 3, 8, 145, 194, 3, 8, 145, 229, 39, 2, 158, 229, 39, 2, 158, 217, 119, 8, 170, 217, 119, 8, 170, 55, 217, 242, 255, 55, 217, 242 }; // Gradient palette ""GMT_no_green_gp"", originally from // http://soliton.vm.bytemark.co.uk/pub/cpt-city/gmt/tn/GMT_no_green.png.index.html // converted for FastLED with gammas (2.6, 2.2, 2.5) // Size: 128 bytes of program space. DEFINE_GRADIENT_PALETTE( GMT_no_green_gp ) { 0, 1, 29, 255, 15, 1, 29, 255, 15, 1, 90, 255, 31, 1, 90, 255, 31, 1, 135, 255, 47, 1, 135, 255, 47, 0, 161, 255, 63, 0, 161, 255, 63, 2, 255, 255, 79, 2, 255, 255, 79, 14, 255, 255, 95, 14, 255, 255, 95, 41, 255, 255, 111, 41, 255, 255, 111, 88, 255, 255, 127, 88, 255, 255, 127, 255, 255, 15, 143, 255, 255, 15, 143, 255, 223, 0, 159, 255, 223, 0, 159, 255, 135, 0, 175, 255, 135, 0, 175, 255, 101, 0, 191, 255, 101, 0, 191, 255, 66, 0, 207, 255, 66, 0, 207, 255, 41, 0, 223, 255, 41, 0, 223, 255, 18, 0, 239, 255, 18, 0, 239, 255, 0, 0, 255, 255, 0, 0 }; // Gradient palette ""GMT_sealand_gp"", originally from // http://soliton.vm.bytemark.co.uk/pub/cpt-city/gmt/tn/GMT_sealand.png.index.html // converted for FastLED with gammas (2.6, 2.2, 2.5) // Size: 80 bytes of program space. DEFINE_GRADIENT_PALETTE( GMT_sealand_gp ) { 0, 53, 33, 255, 14, 23, 33, 255, 28, 23, 68, 255, 42, 23, 115, 255, 56, 23, 178, 255, 70, 23, 255, 255, 84, 23, 255, 170, 99, 23, 255, 103, 113, 23, 255, 56, 127, 23, 255, 25, 141, 53, 255, 25, 155, 100, 255, 25, 170, 167, 255, 25, 170, 255, 255, 87, 184, 255, 193, 87, 198, 255, 141, 87, 212, 255, 99, 87, 226, 255, 115, 135, 240, 255, 135, 182, 255, 255, 156, 223 }; // Gradient palette ""GMT_cool_gp"", originally from // http://soliton.vm.bytemark.co.uk/pub/cpt-city/gmt/tn/GMT_cool.png.index.html // converted for FastLED with gammas (2.6, 2.2, 2.5) // Size: 8 bytes of program space. DEFINE_GRADIENT_PALETTE( GMT_cool_gp ) { 0, 0, 255, 255, 255, 255, 0, 255 }; // Gradient palette ""aspectcolr_gp"", originally from // http://soliton.vm.bytemark.co.uk/pub/cpt-city/grass/tn/aspectcolr.png.index.html // converted for FastLED with gammas (2.6, 2.2, 2.5) // Size: 24 bytes of program space. DEFINE_GRADIENT_PALETTE( aspectcolr_gp ) { 0, 255, 255, 255, 0, 255, 255, 0, 63, 0, 255, 0, 127, 0, 255, 255, 191, 255, 0, 0, 255, 255, 255, 0 }; // Gradient palette ""haxby_gp"", originally from // http://soliton.vm.bytemark.co.uk/pub/cpt-city/grass/tn/haxby.png.index.html // converted for FastLED with gammas (2.6, 2.2, 2.5) // Size: 44 bytes of program space. DEFINE_GRADIENT_PALETTE( haxby_gp ) { 0, 1, 9, 99, 25, 2, 55, 245, 51, 3, 133, 255, 76, 26, 213, 255, 102, 51, 215, 98, 127, 144, 255, 82, 153, 217, 215, 39, 178, 255, 131, 17, 204, 255, 92, 9, 229, 255, 127, 50, 255, 255, 255, 255 }; // Gradient palette ""differences_gp"", originally from // http://soliton.vm.bytemark.co.uk/pub/cpt-city/grass/tn/differences.png.index.html // converted for FastLED with gammas (2.6, 2.2, 2.5) // Size: 12 bytes of program space. DEFINE_GRADIENT_PALETTE( differences_gp ) { 0, 0, 0, 255, 127, 255, 255, 255, 255, 255, 0, 0 }; // Gradient palette ""cool_warm_d05_gp"", originally from // http://soliton.vm.bytemark.co.uk/pub/cpt-city/km/tn/cool-warm-d05.png.index.html // converted for FastLED with gammas (2.6, 2.2, 2.5) // Size: 40 bytes of program space. DEFINE_GRADIENT_PALETTE( cool_warm_d05_gp ) { 0, 8, 38, 180, 51, 8, 38, 180, 51, 36, 111, 230, 102, 36, 111, 230, 102, 179, 189, 182, 153, 179, 189, 182, 153, 255, 37, 27, 204, 255, 37, 27, 204, 232, 2, 6, 255, 232, 2, 6 }; // Gradient palette ""purple_orange_d07_gp"", originally from // http://soliton.vm.bytemark.co.uk/pub/cpt-city/km/tn/purple-orange-d07.png.index.html // converted for FastLED with gammas (2.6, 2.2, 2.5) // Size: 56 bytes of program space. DEFINE_GRADIENT_PALETTE( purple_orange_d07_gp ) { 0, 53, 27, 91, 36, 53, 27, 91, 36, 121, 55, 111, 72, 121, 55, 111, 72, 179, 107, 137, 109, 179, 107, 137, 109, 179, 189, 182, 145, 179, 189, 182, 145, 234, 152, 59, 182, 234, 152, 59, 182, 227, 92, 11, 218, 227, 92, 11, 218, 165, 40, 1, 255, 165, 40, 1 }; // Gradient palette ""Lucy_in_the_Sky_gp"", originally from // http://soliton.vm.bytemark.co.uk/pub/cpt-city/colo/vredeling/tn/Lucy_in_the_Sky.png.index.html // converted for FastLED with gammas (2.6, 2.2, 2.5) // Size: 40 bytes of program space. DEFINE_GRADIENT_PALETTE( Lucy_in_the_Sky_gp ) { 0, 175, 1, 44, 51, 175, 1, 44, 51, 194, 14, 35, 102, 194, 14, 35, 102, 213, 40, 27, 153, 213, 40, 27, 153, 234, 80, 21, 204, 234, 80, 21, 204, 255, 136, 15, 255, 255, 136, 15 }; // Gradient palette ""Alive_And_Kicking_gp"", originally from // http://soliton.vm.bytemark.co.uk/pub/cpt-city/colo/rphnick/tn/Alive_And_Kicking.png.index.html // converted for FastLED with gammas (2.6, 2.2, 2.5) // Size: 40 bytes of program space. DEFINE_GRADIENT_PALETTE( Alive_And_Kicking_gp ) { 0, 192, 50, 207, 51, 192, 50, 207, 51, 87, 50, 207, 102, 87, 50, 207, 102, 37, 73, 207, 153, 37, 73, 207, 153, 37, 127, 207, 204, 37, 127, 207, 204, 37, 213, 140, 255, 37, 213, 140 }; // Gradient palette ""firestrm_gp"", originally from // http://soliton.vm.bytemark.co.uk/pub/cpt-city/fractint/base/tn/firestrm.png.index.html // converted for FastLED with gammas (2.6, 2.2, 2.5) // Size: 2040 bytes of program space. DEFINE_GRADIENT_PALETTE( firestrm_gp ) { 0, 57, 1, 194, 0, 57, 1, 194, 0, 60, 1, 190, 1, 60, 1, 190, 1, 64, 1, 186, 3, 64, 1, 186, 3, 67, 1, 182, 4, 67, 1, 182, 4, 71, 1, 178, 4, 71, 1, 178, 4, 74, 1, 172, 5, 74, 1, 172, 5, 78, 1, 168, 7, 78, 1, 168, 7, 82, 1, 164, 8, 82, 1, 164, 8, 86, 1, 160, 9, 86, 1, 160, 9, 90, 1, 155, 9, 90, 1, 155, 9, 94, 1, 151, 10, 94, 1, 151, 10, 98, 1, 145, 12, 98, 1, 145, 12, 103, 1, 142, 13, 103, 1, 142, 13, 107, 0, 137, 13, 107, 0, 137, 13, 112, 0, 133, 14, 112, 0, 133, 14, 117, 0, 128, 15, 117, 0, 128, 15, 120, 0, 123, 17, 120, 0, 123, 17, 125, 0, 120, 18, 125, 0, 120, 18, 30, 8, 10, 255, 231, 8, 10, 255, 231, 9, 9, 255, 231, 9, 9, 255, 231, 9, 8, 255, 232, 9, 8, 255, 232, 10, 7, 252, 233, 10, 7, 252, 233, 12, 6, 252, 235, 12, 6, 252, 235, 13, 6, 250, 236, 13, 6, 250, 236, 14, 5, 250, 236, 14, 5, 250, 236, 16, 4, 247, 237, 16, 4, 247, 237, 17, 4, 247, 239, 17, 4, 247, 239, 19, 3, 245, 240, 19, 3, 245, 240, 20, 3, 242, 241, 20, 3, 242, 241, 22, 2, 240, 241, 22, 2, 240, 241, 24, 2, 237, 242, 24, 2, 237, 242, 26, 2, 235, 244, 26, 2, 235, 244, 27, 1, 233, 245, 27, 1, 233, 245, 30, 1, 230, 245, 30, 1, 230, 245, 32, 1, 226, 246, 32, 1, 226, 246, 35, 1, 223, 247, 35, 1, 223, 247, 37, 1, 221, 249, 37, 1, 221, 249, 39, 1, 216, 250, 39, 1, 216, 250, 42, 1, 214, 250, 42, 1, 214, 250, 45, 1, 210, 251, 45, 1, 210, 251, 48, 1, 205, 253, 48, 1, 205, 253, 51, 1, 201, 254, 51, 1, 201, 254, 54, 1, 197, 255, 54, 1, 197 }; // Gradient palette ""royal_gp"", originally from // http://soliton.vm.bytemark.co.uk/pub/cpt-city/fractint/base/tn/royal.png.index.html // converted for FastLED with gammas (2.6, 2.2, 2.5) // Size: 1896 bytes of program space. DEFINE_GRADIENT_PALETTE( royal_gp ) { 0, 5, 0, 14, 0, 5, 0, 14, 1, 5, 0, 14, 1, 5, 0, 15, 3, 5, 0, 15, 3, 7, 0, 15, 4, 7, 0, 15, 4, 7, 0, 15, 4, 7, 0, 17, 5, 7, 0, 17, 7, 7, 0, 17, 7, 8, 0, 17, 8, 8, 0, 17, 8, 8, 0, 19, 9, 8, 0, 19, 9, 8, 0, 19, 10, 8, 0, 19, 10, 9, 0, 22, 12, 9, 0, 22, 13, 9, 0, 22, 13, 9, 0, 22, 13, 9, 0, 24, 14, 9, 0, 24, 14, 10, 0, 24, 15, 10, 0, 24, 17, 10, 0, 24, 17, 10, 0, 27, 18, 10, 0, 27, 18, 10, 0, 27, 19, 10, 0, 27, 19, 12, 0, 27, 21, 12, 0, 27, 21, 12, 0, 29, 22, 12, 0, 29, 23, 12, 0, 29, 23, 12, 0, 29, 23, 14, 0, 28, 46, 29, 3, 228, 46, 27, 3, 230, 46, 27, 3, 230, 42, 24, 4, 231, 42, 24, 4, 231, 39, 22, 4, 231, 39, 22, 4, 231, 35, 19, 4, 232, 35, 19, 4, 232, 32, 17, 5, 233, 32, 17, 5, 233, 32, 15, 5, 235, 32, 15, 5, 235, 30, 13, 5, 236, 30, 13, 5, 236, 27, 12, 6, 236, 27, 12, 6, 236, 24, 10, 6, 237, 24, 10, 6, 237, 24, 9, 6, 239, 24, 9, 6, 239, 22, 7, 8, 240, 22, 7, 8, 240, 20, 6, 8, 241, 20, 6, 8, 241, 18, 5, 8, 241, 18, 5, 8, 241, 16, 4, 9, 242, 16, 4, 9, 242, 16, 3, 9, 244, 16, 3, 9, 244, 14, 2, 9, 245, 14, 2, 9, 245, 12, 1, 10, 245, 12, 1, 10, 245, 10, 1, 10, 246, 10, 1, 10, 246, 10, 1, 10, 247, 10, 1, 10, 247, 9, 1, 12, 249, 9, 1, 12, 249, 8, 1, 12, 250, 8, 1, 12, 250, 7, 1, 12, 250, 7, 1, 12, 250, 5, 0, 14, 251, 5, 0, 14, 253, 5, 0, 14, 254, 5, 0, 14, 255, 5, 0, 14 }; // Gradient palette ""moldy_bread_gp"", originally from // http://soliton.vm.bytemark.co.uk/pub/cpt-city/colo/phill/tn/moldy_bread.png.index.html // converted for FastLED with gammas (2.6, 2.2, 2.5) // Size: 40 bytes of program space. DEFINE_GRADIENT_PALETTE( moldy_bread_gp ) { 0, 32, 105, 51, 51, 32, 105, 51, 51, 34, 139, 60, 102, 34, 139, 60, 102, 110, 182, 19, 153, 110, 182, 19, 153, 184, 203, 22, 204, 184, 203, 22, 204, 239, 248, 72, 255, 239, 248, 72 }; // Gradient palette ""Floating_Away_gp"", originally from // http://soliton.vm.bytemark.co.uk/pub/cpt-city/colo/lightningmccarl/tn/Floating_Away.png.index.html // converted for FastLED with gammas (2.6, 2.2, 2.5) // Size: 40 bytes of program space. DEFINE_GRADIENT_PALETTE( Floating_Away_gp ) { 0, 82, 205, 223, 51, 82, 205, 223, 51, 39, 144, 155, 102, 39, 144, 155, 102, 46, 112, 112, 153, 46, 112, 112, 153, 39, 70, 62, 204, 39, 70, 62, 204, 22, 33, 25, 255, 22, 33, 25 }; // Gradient palette ""3_girls_reclining_gp"", originally from // http://soliton.vm.bytemark.co.uk/pub/cpt-city/colo/evad/tn/3_girls_reclining.png.index.html // converted for FastLED with gammas (2.6, 2.2, 2.5) // Size: 40 bytes of program space. DEFINE_GRADIENT_PALETTE( three_girls_reclining_gp ) { 0, 6, 45, 16, 51, 6, 45, 16, 51, 135, 201, 108, 102, 135, 201, 108, 102, 227, 221, 151, 153, 227, 221, 151, 153, 83, 182, 186, 204, 83, 182, 186, 204, 159, 127, 178, 255, 159, 127, 178 }; // Gradient palette ""iCreate_gp"", originally from // http://soliton.vm.bytemark.co.uk/pub/cpt-city/colo/electroluv/tn/iCreate.png.index.html // converted for FastLED with gammas (2.6, 2.2, 2.5) // Size: 40 bytes of program space. DEFINE_GRADIENT_PALETTE( iCreate_gp ) { 0, 210, 80, 22, 20, 210, 80, 22, 20, 255, 23, 17, 58, 255, 23, 17, 58, 167, 1, 21, 107, 167, 1, 21, 107, 46, 1, 8, 163, 46, 1, 8, 163, 12, 1, 4, 255, 12, 1, 4 }; // Gradient palette ""Opaque_gp"", originally from // http://soliton.vm.bytemark.co.uk/pub/cpt-city/colo/drumma/tn/Opaque.png.index.html // converted for FastLED with gammas (2.6, 2.2, 2.5) // Size: 40 bytes of program space. DEFINE_GRADIENT_PALETTE( Opaque_gp ) { 0, 192, 203, 112, 51, 192, 203, 112, 51, 132, 169, 112, 102, 132, 169, 112, 102, 27, 99, 83, 153, 27, 99, 83, 153, 46, 36, 28, 204, 46, 36, 28, 204, 71, 7, 19, 255, 71, 7, 19 }; // Gradient palette ""500_LOVERS_ThankYou_gp"", originally from // http://soliton.vm.bytemark.co.uk/pub/cpt-city/colo/adgrapho/tn/500_LOVERS_ThankYou.png.index.html // converted for FastLED with gammas (2.6, 2.2, 2.5) // Size: 40 bytes of program space. DEFINE_GRADIENT_PALETTE( FiveHundo_LOVERS_ThankYou_gp ) { 0, 222, 10, 7, 51, 222, 10, 7, 51, 255, 71, 21, 102, 255, 71, 21, 102, 242, 173, 47, 153, 242, 173, 47, 153, 184, 233, 91, 204, 184, 233, 91, 204, 39, 182, 137, 255, 39, 182, 137 }; // Gradient palette ""mellon_ball_surprise_gp"", originally from // http://soliton.vm.bytemark.co.uk/pub/cpt-city/colo/Skyblue2u/tn/mellon_ball_surprise.png.index.html // converted for FastLED with gammas (2.6, 2.2, 2.5) // Size: 40 bytes of program space. DEFINE_GRADIENT_PALETTE( mellon_ball_surprise_gp ) { 0, 152, 227, 85, 51, 152, 227, 85, 51, 215, 244, 106, 102, 215, 244, 106, 102, 255, 142, 56, 153, 255, 142, 56, 153, 255, 90, 45, 204, 255, 90, 45, 204, 229, 36, 62, 255, 229, 36, 62 }; // This has to be hand counted and updated whenever we add more palettes. There are also some predefined palettes // that need to get accounted for :( const uint8_t numPalettes = 29; // This handles the switching of palettes based on the global palette counter. Need to add palettes to this function // whenever they are added up above. Declare it down here so we can get away with not having to use the Gradient Palette // Pointer array. void updateGPalette() { switch (gPaletteCounter) { case 0: update_RainbowBlack_p(); break; case 1: update_WhiteRainbow_p(); break; case 2: update_Rainbow_p(); break; case 3: update_PureCol_p(); break; case 4: update_WhiteCol_p(); break; case 5: update_TwoCol_p(); break; case 6: update_ColLead_p(); break; case 7: update_WhiteBlack_p(); break; // Have to use gGradientPalettes array because the gradient defines // are below us. Maybe we should move this to the Palettes tab so we don't // have to use this array shit. case 8: gPalette = chroma_gp; break; case 9: gPalette = sprinkles_gp; break; case 10: gPalette = GMT_no_green_gp; break; case 11: gPalette = GMT_sealand_gp; break; case 12: gPalette = GMT_cool_gp; break; case 13: gPalette = aspectcolr_gp; break; case 14: gPalette = haxby_gp; break; case 15: gPalette = differences_gp; break; case 16: gPalette = cool_warm_d05_gp; break; case 17: gPalette = purple_orange_d07_gp; break; case 18: gPalette = Lucy_in_the_Sky_gp; break; case 19: gPalette = Alive_And_Kicking_gp; break; case 20: gPalette = firestrm_gp; break; case 21: gPalette = royal_gp; break; case 22: gPalette = moldy_bread_gp; break; case 23: gPalette = Floating_Away_gp; break; case 24: gPalette = three_girls_reclining_gp; break; case 25: gPalette = iCreate_gp; break; case 26: gPalette = Opaque_gp; break; case 27: gPalette = FiveHundo_LOVERS_ThankYou_gp; break; case 28: gPalette = mellon_ball_surprise_gp; break; } } ",12354,True,3062.9365151654047,median "// SPDX-FileCopyrightText: 2019 Phillip Burgess for Adafruit Industries // // SPDX-License-Identifier: MIT // Animated eyes for Adafruit MONSTER M4SK and HALLOWING M4 dev boards. // This code is pretty tightly coupled to the resources of these boards // (one or two ST7789 240x240 pixel TFTs on separate SPI buses, and a // SAMD51 microcontroller), and not as generally portable as the prior // ""Uncanny Eyes"" project (better for SAMD21 chips or Teensy 3.X and // 128x128 TFT or OLED screens, single SPI bus). // IMPORTANT: in rare situations, a board may get ""bricked"" when running // this code while simultaneously connected to USB. A quick-flashing status // LED indicates the filesystem has gone corrupt. If this happens, install // CircuitPython to reinitialize the filesystem, copy over your eye files // (keep backups!), then re-upload this code. It seems to happen more often // at high optimization settings (above -O3), but there's not 1:1 causality. // The exact cause has not yet been found...possibly insufficient yield() // calls, or some rare alignment in the Arcada library or USB-handling code. // LET'S HAVE A WORD ABOUT COORDINATE SYSTEMS before continuing. From an // outside observer's point of view, looking at the display(s) on these // boards, the eyes are rendered COLUMN AT A TIME, working LEFT TO RIGHT, // rather than the horizontal scanline order of Uncanny Eyes and most other // graphics-heavy code. It was found much easier to animate the eyelids when // working along this axis. A ""column major"" display is easily achieved by // setting the screen(s) to ROTATION 3, which is a 90 degree // counterclockwise rotation relative to the default. This places (0,0) at // the BOTTOM-LEFT of the display, with +X being UP and +Y being RIGHT -- // so, conceptually, just swapping axes you have a traditional Cartesian // coordinate system and trigonometric functions work As Intended, and the // code tends to ""think"" that way in most places. Since the rotation is done // in hardware though...from the display driver's point of view, one might // think of these as ""horizontal"" ""scanlines,"" and that the eye is being // drawn sideways, with a left and right eyelid rather than bottom and top. // Just mentioning it here because there may still be lingering comments // and/or variables in the code where I refer to ""scanlines"" even though // visually/spatially these are columns. Will do my best to comment local // coordinate systems in different spots. (Any raster images loaded by // Adafruit_ImageReader are referenced in typical +Y = DOWN order.) // Oh also, ""left eye"" and ""right eye"" refer to the MONSTER'S left and // right. From an observer's point of view, looking AT the monster, the // ""right eye"" is on the left. #if !defined(USE_TINYUSB) #error ""Please select Tools->USB Stack->TinyUSB before compiling"" #endif #define GLOBAL_VAR #include ""globals.h"" // Global eye state that applies to all eyes (not per-eye): bool eyeInMotion = false; float eyeOldX, eyeOldY, eyeNewX, eyeNewY; uint32_t eyeMoveStartTime = 0L; int32_t eyeMoveDuration = 0L; uint32_t lastSaccadeStop = 0L; int32_t saccadeInterval = 0L; // Some sloppy eye state stuff, some carried over from old eye code... // kinda messy and badly named and will get cleaned up/moved/etc. uint32_t timeOfLastBlink = 0L, timeToNextBlink = 0L; int xPositionOverMap = 0; int yPositionOverMap = 0; uint8_t eyeNum = 0; uint32_t frames = 0; uint32_t lastFrameRateReportTime = 0; uint32_t lastLightReadTime = 0; float lastLightValue = 0.5; double irisValue = 0.5; int iPupilFactor = 42; uint32_t boopSum = 0, boopSumFiltered = 0; bool booped = false; int fixate = 7; uint8_t lightSensorFailCount = 0; // For autonomous iris scaling #define IRIS_LEVELS 7 float iris_prev[IRIS_LEVELS] = { 0 }; float iris_next[IRIS_LEVELS] = { 0 }; uint16_t iris_frame = 0; // Callback invoked after each SPI DMA transfer - sets a flag indicating // the next line of graphics can be issued as soon as its ready. static void dma_callback(Adafruit_ZeroDMA *dma) { // It's possible to assign each DMA channel its own callback function // (freeing up a few cycles vs. this channel-to-eye lookup), but it's // written this way to scale to as many eyes as needed (up to one per // SERCOM if this is ported to something like Grand Central). for(uint8_t e=0; e50MHz SPI was fun but just too glitchy to rely on //#if F_CPU < 200000000 // #define DISPLAY_FREQ (F_CPU / 2) // #define DISPLAY_CLKSRC SERCOM_CLOCK_SOURCE_FCPU //#else #define DISPLAY_FREQ 50000000 #define DISPLAY_CLKSRC SERCOM_CLOCK_SOURCE_100M //#endif SPISettings settings(DISPLAY_FREQ, MSBFIRST, SPI_MODE0); // The time required to issue one scanline (DISPLAY_SIZE pixels x 16 bits) over // SPI is a known(ish) quantity. The DMA scheduler isn't always perfectly // deterministic though...especially on startup, as things make their way // into caches. Very occasionally, something (not known yet) is causing // SPI DMA to seize up. This condition is pretty easy to check for... // periodically the code needs to wait on a DMA transfer to finish // anyway, and we can use the micros() function to determine if it's taken // considerably longer than expected (a factor of 4 is used - the ""4000"" // below, to allow for caching/scheduling fudge). If so, that's our signal // that something is likely amiss and we take evasive maneuvers, resetting // the affected DMA channel (DMAbuddy::fix()). #define DMA_TIMEOUT (uint32_t)((DISPLAY_SIZE * 16 * 4000) / (DISPLAY_FREQ / 1000)) static inline uint16_t readBoop(void) { uint16_t counter = 0; pinMode(boopPin, OUTPUT); digitalWrite(boopPin, HIGH); pinMode(boopPin, INPUT); while(digitalRead(boopPin) && (++counter < 1000)); return counter; } // Crude error handler. Prints message to Serial Monitor, blinks LED. void fatal(const char *message, uint16_t blinkDelay) { Serial.begin(9600); Serial.println(message); for(bool ledState = HIGH;; ledState = !ledState) { digitalWrite(LED_BUILTIN, ledState); delay(blinkDelay); } } #include // sbrk() function uint32_t availableRAM(void) { char top; // Local variable pushed on stack return &top - (char *)sbrk(0); // Top of stack minus end of heap } // SETUP FUNCTION - CALLED ONCE AT PROGRAM START --------------------------- void setup() { if(!arcada.arcadaBegin()) fatal(""Arcada init fail!"", 100); #if defined(USE_TINYUSB) if(!arcada.filesysBeginMSD()) fatal(""No filesystem found!"", 250); #else if(!arcada.filesysBegin()) fatal(""No filesystem found!"", 250); #endif user_setup(); arcada.displayBegin(); // Backlight(s) off ASAP, they'll switch on after screen(s) init & clear arcada.setBacklight(0); DISPLAY_SIZE = min(ARCADA_TFT_WIDTH, ARCADA_TFT_HEIGHT); Serial.begin(115200); //while(!Serial) yield(); Serial.printf(""Available RAM at start: %d\\n"", availableRAM()); Serial.printf(""Available flash at start: %d\\n"", arcada.availableFlash()); yield(); // Periodic yield() makes sure mass storage filesystem stays alive // No file selector yet. In the meantime, you can override the default // config file by holding one of the 3 edge buttons at startup (loads // config1.eye, config2.eye or config3.eye instead). Keep fingers clear // of the nose booper when doing this...it self-calibrates on startup. // DO THIS BEFORE THE SPLASH SO IT DOESN'T REQUIRE A LENGTHY HOLD. char *filename = (char *)""config.eye""; uint32_t buttonState = arcada.readButtons(); if((buttonState & ARCADA_BUTTONMASK_UP) && arcada.exists(""config1.eye"")) { filename = (char *)""config1.eye""; } else if((buttonState & ARCADA_BUTTONMASK_A) && arcada.exists(""config2.eye"")) { filename = (char *)""config2.eye""; } else if((buttonState & ARCADA_BUTTONMASK_DOWN) && arcada.exists(""config3.eye"")) { filename = (char *)""config3.eye""; } yield(); // Initialize display(s) #if (NUM_EYES > 1) eye[0].display = arcada._display; eye[1].display = arcada.display2; #else eye[0].display = arcada.display; #endif // Initialize DMAs yield(); uint8_t e; for(e=0; esetClockSource(DISPLAY_CLKSRC); // Accelerate SPI! #endif eye[e].display->fillScreen(0); eye[e].dma.allocate(); eye[e].dma.setTrigger(eye[e].spi->getDMAC_ID_TX()); eye[e].dma.setAction(DMA_TRIGGER_ACTON_BEAT); eye[e].dptr = eye[e].dma.addDescriptor(NULL, NULL, 42, DMA_BEAT_SIZE_BYTE, false, false); eye[e].dma.setCallback(dma_callback); eye[e].dma.setPriority(DMA_PRIORITY_0); uint32_t spi_data_reg = (uint32_t)eye[e].spi->getDataRegister(); for(int i=0; i<2; i++) { // For each of 2 scanlines... for(int j=0; j 1) { // Load on other eye too, ignore status yield(); arcada.drawBMP((char *)""/splash.bmp"", 0, 0, eye[1].display); } // Ramp up backlight over 1/2 sec duration startTime = millis(); while ((elapsed = (millis() - startTime)) <= 500) { yield(); arcada.setBacklight(255 * elapsed / 500); } arcada.setBacklight(255); // To the max startTime = millis(); // Note current time for backlight hold later } } // If no splash, or load failed, turn backlight on early so user gets a // little feedback, that the board is not locked up, just thinking. if (!showSplashScreen) arcada.setBacklight(255); // LOAD CONFIGURATION FILE ----------------------------------------------- loadConfig(filename); // LOAD EYELIDS AND TEXTURE MAPS ----------------------------------------- // Experiencing a problem with MEMORY FRAGMENTATION when loading texture // maps. These images only occupy RAM temporarily -- they're copied to // internal flash memory and then freed. However, something is preventing // the freed memory from restoring to a contiguous block. For example, // if a texture image equal to about 50% of RAM is loaded/copied/freed, // following this with a larger texture (or trying to allocate a larger // polar lookup array) fails because RAM is fragmented into two segments. // I've been through this code, Adafruit_ImageReader and Adafruit_GFX // pretty carefully and they appear to be freeing RAM in the reverse order // that they allocate (which should avoid fragmentation), but I'm likely // overlooking something there or additional allocations are occurring // in other libraries -- perhaps the filesystem and/or mass storage code. // SO, here is the DIRTY WORKAROUND... // Adafruit_ImageReader provides a bmpDimensions() function to determine // the pixel size of an image without actually loading it. We can use this // to estimate the RAM requirements for loading the image, then allocate // a ""booster seat"" which makes the subsequent image load occur in higher // memory, and the fragmenting part a bit beyond that. When the image and // booster are both freed, that should restore a large contiguous chunk, // leaving the fragments in high memory. Not TOO high though, we need to // leave some RAM for the stack to operate over the lifetime of this // program and to handle small heap allocations. uint32_t maxRam = availableRAM() - stackReserve; // Load texture maps for eyes uint8_t e2; for(e=0; e= e)) { // If first eye, or no match found... // If no iris filename was specified, or if file fails to load... if((eye[e].iris.filename == NULL) || (loadTexture(eye[e].iris.filename, &eye[e].iris.data, &eye[e].iris.width, &eye[e].iris.height, maxRam) != IMAGE_SUCCESS)) { // Point iris data at the color variable and set image size to 1px eye[e].iris.data = &eye[e].iris.color; eye[e].iris.width = eye[e].iris.height = 1; } // Huh. The booster seat idea STILL doesn't always work right, // something leaking in upper memory. Keep shrinking down the // booster seat size a bit each time we load a texture. Feh. maxRam -= 20; } // Repeat for sclera... for(e2=0; e2= e)) { // If first eye, or no match found... // If no sclera filename was specified, or if file fails to load... if((eye[e].sclera.filename == NULL) || (loadTexture(eye[e].sclera.filename, &eye[e].sclera.data, &eye[e].sclera.width, &eye[e].sclera.height, maxRam) != IMAGE_SUCCESS)) { // Point sclera data at the color variable and set image size to 1px eye[e].sclera.data = &eye[e].sclera.color; eye[e].sclera.width = eye[e].sclera.height = 1; } maxRam -= 20; // See note above } } // Load eyelid graphics. yield(); ImageReturnCode status; status = loadEyelid(upperEyelidFilename ? upperEyelidFilename : (char *)""upper.bmp"", upperClosed, upperOpen, DISPLAY_SIZE-1, maxRam); status = loadEyelid(lowerEyelidFilename ? lowerEyelidFilename : (char *)""lower.bmp"", lowerOpen, lowerClosed, 0, maxRam); // Filenames are no longer needed... for(e=0; eVAL + analogRead(A2)); eyeOldX = eyeNewX = eyeOldY = eyeNewY = mapRadius; // Start in center for(e=0; esetRotation(eye[e].rotation); eye[e].eyeX = eyeOldX; // Set up initial position eye[e].eyeY = eyeOldY; } if (showSplashScreen) { // Image(s) loaded above? // Hold backlight on for up to 2 seconds (minus other initialization time) if ((elapsed = (millis() - startTime)) < 2000) { delay(2000 - elapsed); } // Ramp down backlight over 1/2 sec duration startTime = millis(); while ((elapsed = (millis() - startTime)) <= 500) { yield(); arcada.setBacklight(255 - (255 * elapsed / 500)); } arcada.setBacklight(0); for(e=0; efillScreen(0); } } #if defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) if(voiceOn) { if(!voiceSetup((waveform > 0))) { Serial.println(""Voice init fail, continuing without""); voiceOn = false; } else { voiceGain(gain); currentPitch = voicePitch(currentPitch); if(waveform) voiceMod(modulate, waveform); arcada.enableSpeaker(true); } } #endif arcada.setBacklight(255); // Back on, impending graphics yield(); if(boopPin >= 0) { boopThreshold = 0; for(int i=0; i= NUM_EYES) eyeNum = 0; // Cycle through eyes... uint8_t x = eye[eyeNum].colNum; uint32_t t = micros(); // If next column for this eye is not yet rendered... if(!eye[eyeNum].column_ready) { if(!x) { // If it's the first column... // ONCE-PER-FRAME EYE ANIMATION LOGIC HAPPENS HERE ------------------- // Eye movement float eyeX, eyeY; if(moveEyesRandomly) { int32_t dt = t - eyeMoveStartTime; // uS elapsed since last eye event if(eyeInMotion) { // Eye currently moving? if(dt >= eyeMoveDuration) { // Time up? Destination reached. eyeInMotion = false; // Stop moving // The ""move"" duration temporarily becomes a hold duration... // Normally this is 35 ms to 1 sec, but don't exceed gazeMax setting uint32_t limit = min(1000000, gazeMax); eyeMoveDuration = random(35000, limit); // Time between microsaccades if(!saccadeInterval) { // Cleared when ""big"" saccade finishes lastSaccadeStop = t; // Time when saccade stopped saccadeInterval = random(eyeMoveDuration, gazeMax); // Next in 30ms to 3sec } // Similarly, the ""move"" start time becomes the ""stop"" starting time... eyeMoveStartTime = t; // Save time of event eyeX = eyeOldX = eyeNewX; // Save position eyeY = eyeOldY = eyeNewY; } else { // Move time's not yet fully elapsed -- interpolate position float e = (float)dt / float(eyeMoveDuration); // 0.0 to 1.0 during move e = 3 * e * e - 2 * e * e * e; // Easing function: 3*e^2-2*e^3 0.0 to 1.0 eyeX = eyeOldX + (eyeNewX - eyeOldX) * e; // Interp X eyeY = eyeOldY + (eyeNewY - eyeOldY) * e; // and Y } } else { // Eye is currently stopped eyeX = eyeOldX; eyeY = eyeOldY; if(dt > eyeMoveDuration) { // Time up? Begin new move. if((t - lastSaccadeStop) > saccadeInterval) { // Time for a ""big"" saccade // r is the radius in X and Y that the eye can go, from (0,0) in the center. float r = ((float)mapDiameter - (float)DISPLAY_SIZE * M_PI_2) * 0.75; eyeNewX = random(-r, r); float h = sqrt(r * r - eyeNewX * eyeNewX); eyeNewY = random(-h, h); // Set the duration for this move, and start it going. eyeMoveDuration = random(83000, 166000); // ~1/12 - ~1/6 sec saccadeInterval = 0; // Calc next interval when this one stops } else { // Microsaccade // r is possible radius of motion, ~1/10 size of full saccade. // We don't bother with clipping because if it strays just a little, // that's okay, it'll get put in-bounds on next full saccade. float r = (float)mapDiameter - (float)DISPLAY_SIZE * M_PI_2; r *= 0.07; float dx = random(-r, r); eyeNewX = eyeX - mapRadius + dx; float h = sqrt(r * r - dx * dx); eyeNewY = eyeY - mapRadius + random(-h, h); eyeMoveDuration = random(7000, 25000); // 7-25 ms microsaccade } eyeNewX += mapRadius; // Translate new point into map space eyeNewY += mapRadius; eyeMoveStartTime = t; // Save initial time of move eyeInMotion = true; // Start move on next frame } } } else { // Allow user code to control eye position (e.g. IR sensor, joystick, etc.) float r = ((float)mapDiameter - (float)DISPLAY_SIZE * M_PI_2) * 0.9; eyeX = mapRadius + eyeTargetX * r; eyeY = mapRadius + eyeTargetY * r; } // Eyes fixate (are slightly crossed) -- amount is filtered for boops int nufix = booped ? 90 : 7; fixate = ((fixate * 15) + nufix) / 16; // save eye position to this eye's struct so it's same throughout render if(eyeNum & 1) eyeX += fixate; // Eyes converge slightly toward center else eyeX -= fixate; eye[eyeNum].eyeX = eyeX; eye[eyeNum].eyeY = eyeY; // pupilFactor? irisValue? TO DO: pick a name and stick with it eye[eyeNum].pupilFactor = irisValue; // Also note - irisValue is calculated at the END of this function // for the next frame (because the sensor must be read when there's // no SPI traffic to the left eye) // Similar to the autonomous eye movement above -- blink start times // and durations are random (within ranges). if((t - timeOfLastBlink) >= timeToNextBlink) { // Start new blink? timeOfLastBlink = t; uint32_t blinkDuration = random(36000, 72000); // ~1/28 - ~1/14 sec // Set up durations for both eyes (if not already winking) for(uint8_t e=0; e upperOpen[ix]) { uq = 1.0; } else if(iy < upperClosed[ix]) { uq = 0.0; } else { uq = (float)(iy - upperClosed[ix]) / (float)(upperOpen[ix] - upperClosed[ix]); } if(booped) { uq = 0.9; lq = 0.7; } else { lq = 1.0 - uq; } } else { // If no tracking, eye is FULLY OPEN when not blinking uq = 1.0; lq = 1.0; } // Dampen eyelid movements slightly // SAVE upper & lower lid factors per eye, // they need to stay consistent across frame eye[eyeNum].upperLidFactor = (eye[eyeNum].upperLidFactor * 0.6) + (uq * 0.4); eye[eyeNum].lowerLidFactor = (eye[eyeNum].lowerLidFactor * 0.6) + (lq * 0.4); // Process blinks if(eye[eyeNum].blink.state) { // Eye currently blinking? // Check if current blink state time has elapsed if((t - eye[eyeNum].blink.startTime) >= eye[eyeNum].blink.duration) { if(++eye[eyeNum].blink.state > DEBLINK) { // Deblinking finished? eye[eyeNum].blink.state = NOBLINK; // No longer blinking eye[eyeNum].blinkFactor = 0.0; } else { // Advancing from ENBLINK to DEBLINK mode eye[eyeNum].blink.duration *= 2; // DEBLINK is 1/2 ENBLINK speed eye[eyeNum].blink.startTime = t; eye[eyeNum].blinkFactor = 1.0; } } else { eye[eyeNum].blinkFactor = (float)(t - eye[eyeNum].blink.startTime) / (float)eye[eyeNum].blink.duration; if(eye[eyeNum].blink.state == DEBLINK) eye[eyeNum].blinkFactor = 1.0 - eye[eyeNum].blinkFactor; } } // Periodically report frame rate. Really this is ""total number of // eyeballs drawn."" If there are two eyes, the overall refresh rate // of both screens is about 1/2 this. frames++; if(((t - lastFrameRateReportTime) >= 1000000) && t) { // Once per sec. Serial.println((frames * 1000) / (t / 1000)); lastFrameRateReportTime = t; } // Once per frame (of eye #0), reset boopSum... if((eyeNum == 0) && (boopPin >= 0)) { boopSumFiltered = ((boopSumFiltered * 3) + boopSum) / 4; if(boopSumFiltered > boopThreshold) { if(!booped) { Serial.println(""BOOP!""); } booped = true; } else { booped = false; } boopSum = 0; } float mins = (float)millis() / 60000.0; if(eye[eyeNum].iris.iSpin) { // Spin works in fixed amount per frame (eyes may lose sync, but ""wagon wheel"" tricks work) eye[eyeNum].iris.angle += eye[eyeNum].iris.iSpin; } else { // Keep consistent timing in spin animation (eyes stay in sync, no ""wagon wheel"" effects) eye[eyeNum].iris.angle = (int)((float)eye[eyeNum].iris.startAngle + eye[eyeNum].iris.spin * mins + 0.5); } if(eye[eyeNum].sclera.iSpin) { eye[eyeNum].sclera.angle += eye[eyeNum].sclera.iSpin; } else { eye[eyeNum].sclera.angle = (int)((float)eye[eyeNum].sclera.startAngle + eye[eyeNum].sclera.spin * mins + 0.5); } // END ONCE-PER-FRAME EYE ANIMATION ---------------------------------- } // end first-scanline check // PER-COLUMN RENDERING ------------------------------------------------ // Should be possible for these to be local vars, // but the animation becomes super chunky then, what gives? xPositionOverMap = (int)(eye[eyeNum].eyeX - (DISPLAY_SIZE/2.0)); yPositionOverMap = (int)(eye[eyeNum].eyeY - (DISPLAY_SIZE/2.0)); // These are constant across frame and could be stored in eye struct float upperLidFactor = (1.0 - eye[eyeNum].blinkFactor) * eye[eyeNum].upperLidFactor, lowerLidFactor = (1.0 - eye[eyeNum].blinkFactor) * eye[eyeNum].lowerLidFactor; iPupilFactor = (int)((float)eye[eyeNum].iris.height * 256 * (1.0 / eye[eyeNum].pupilFactor)); int y1, y2; int lidColumn = (eyeNum & 1) ? (DISPLAY_SIZE - 1 - x) : x; // Reverse eyelid columns for left eye DmacDescriptor *d = &eye[eyeNum].column[eye[eyeNum].colIdx].descriptor[0]; if(upperOpen[lidColumn] == 255) { // No eyelid data for this line; eyelid image is smaller than screen. // Great! Make a full scanline of nothing, no rendering needed: d->BTCTRL.bit.SRCINC = 0; d->BTCNT.reg = DISPLAY_SIZE * 2; d->SRCADDR.reg = (uint32_t)&eyelidIndex; d->DESCADDR.reg = 0; // No linked descriptor } else { y1 = lowerClosed[lidColumn] + (int)(0.5 + lowerLidFactor * (float)((int)lowerOpen[lidColumn] - (int)lowerClosed[lidColumn])); y2 = upperClosed[lidColumn] + (int)(0.5 + upperLidFactor * (float)((int)upperOpen[lidColumn] - (int)upperClosed[lidColumn])); if(y1 > DISPLAY_SIZE-1) y1 = DISPLAY_SIZE-1; // Clip results in case lidfactor else if(y1 < 0) y1 = 0; // is beyond the usual 0.0 to 1.0 range if(y2 > DISPLAY_SIZE-1) y2 = DISPLAY_SIZE-1; else if(y2 < 0) y2 = 0; if(y1 >= y2) { // Eyelid is fully or partially closed, enough that there are no // pixels to be rendered for this line. Make ""nothing,"" as above. d->BTCTRL.bit.SRCINC = 0; d->BTCNT.reg = DISPLAY_SIZE * 2; d->SRCADDR.reg = (uint32_t)&eyelidIndex; d->DESCADDR.reg = 0; // No linked descriptors } else { // If single eye, dynamically build descriptor list as needed, // else use a single descriptor & fully buffer each line. #if NUM_DESCRIPTORS > 1 DmacDescriptor *next; int renderlen; if(y1 > 0) { // Do upper eyelid unless at top of image d->BTCTRL.bit.SRCINC = 0; d->BTCNT.reg = y1 * 2; d->SRCADDR.reg = (uint32_t)&eyelidIndex; next = &eye[eyeNum].column[eye[eyeNum].colIdx].descriptor[1]; d->DESCADDR.reg = (uint32_t)next; // Link to next descriptor d = next; // Advance to next descriptor } // Partial column will be rendered renderlen = y2 - y1 + 1; d->BTCTRL.bit.SRCINC = 1; d->BTCNT.reg = renderlen * 2; d->SRCADDR.reg = (uint32_t)eye[eyeNum].column[eye[eyeNum].colIdx].renderBuf + renderlen * 2; // Point to END of data! #else // Full column will be rendered; DISPLAY_SIZE pixels, point source to end of // renderBuf and enable source increment. d->BTCTRL.bit.SRCINC = 1; d->BTCNT.reg = DISPLAY_SIZE * 2; d->SRCADDR.reg = (uint32_t)eye[eyeNum].column[eye[eyeNum].colIdx].renderBuf + DISPLAY_SIZE * 2; d->DESCADDR.reg = 0; // No linked descriptors #endif // Render column 'x' into eye's next available renderBuf uint16_t *ptr = eye[eyeNum].column[eye[eyeNum].colIdx].renderBuf; int xx = xPositionOverMap + x; int y; #if NUM_DESCRIPTORS == 1 // Render lower eyelid if needed for(y=0; y= 0) && (mx < mapDiameter) && (my >= 0) && (my < mapDiameter)) { // Inside polar angle/dist map int angle, dist, moff; if(my >= mapRadius) { if(mx >= mapRadius) { // Quadrant 1 // Use angle & dist directly mx -= mapRadius; my -= mapRadius; moff = my * mapRadius + mx; // Offset into map arrays angle = polarAngle[moff]; dist = polarDist[moff]; } else { // Quadrant 2 // ROTATE angle by 90 degrees (270 degrees clockwise; 768) // MIRROR dist on X axis mx = mapRadius - 1 - mx; my -= mapRadius; angle = polarAngle[mx * mapRadius + my] + 768; dist = polarDist[ my * mapRadius + mx]; } } else { if(mx < mapRadius) { // Quadrant 3 // ROTATE angle by 180 degrees // MIRROR dist on X & Y axes mx = mapRadius - 1 - mx; my = mapRadius - 1 - my; moff = my * mapRadius + mx; angle = polarAngle[moff] + 512; dist = polarDist[ moff]; } else { // Quadrant 4 // ROTATE angle by 270 degrees (90 degrees clockwise; 256) // MIRROR dist on Y axis mx -= mapRadius; my = mapRadius - 1 - my; angle = polarAngle[mx * mapRadius + my] + 256; dist = polarDist[ my * mapRadius + mx]; } } // Convert angle/dist to texture map coords if(dist >= 0) { // Sclera angle = ((angle + eye[eyeNum].sclera.angle) & 1023) ^ eye[eyeNum].sclera.mirror; int tx = angle * eye[eyeNum].sclera.width / 1024; // Texture map x/y int ty = dist * eye[eyeNum].sclera.height / 128; *ptr++ = eye[eyeNum].sclera.data[ty * eye[eyeNum].sclera.width + tx]; } else if(dist > -128) { // Iris or pupil int ty = dist * iPupilFactor / -32768; if(ty >= eye[eyeNum].iris.height) { // Pupil *ptr++ = eye[eyeNum].pupilColor; } else { // Iris angle = ((angle + eye[eyeNum].iris.angle) & 1023) ^ eye[eyeNum].iris.mirror; int tx = angle * eye[eyeNum].iris.width / 1024; *ptr++ = eye[eyeNum].iris.data[ty * eye[eyeNum].iris.width + tx]; } } else { *ptr++ = eye[eyeNum].backColor; // Back of eye } } else { *ptr++ = eye[eyeNum].backColor; // Off map, use back-of-eye color } } else { // Outside eyeball area *ptr++ = eyelidColor; } } #if NUM_DESCRIPTORS == 1 // Render upper eyelid if needed for(; y= (DISPLAY_SIZE-1)) { // No third descriptor; close it off d->DESCADDR.reg = 0; } else { next = &eye[eyeNum].column[eye[eyeNum].colIdx].descriptor[(y1 > 0) ? 2 : 1]; d->DESCADDR.reg = (uint32_t)next; // link to next descriptor d = next; // Increment descriptor d->BTCTRL.bit.SRCINC = 0; d->BTCNT.reg = ((DISPLAY_SIZE-1) - y2) * 2; d->SRCADDR.reg = (uint32_t)&eyelidIndex; d->DESCADDR.reg = 0; // end of descriptor list } #endif } } eye[eyeNum].column_ready = true; // Line is rendered! } // If DMA for this eye is currently busy, don't block, try next eye... if(eye[eyeNum].dma_busy) { if((micros() - eye[eyeNum].dmaStartTime) < DMA_TIMEOUT) return; // If we reach this point in the code, an SPI DMA transfer has taken // noticably longer than expected and is probably stalled (see comments // in the DMAbuddy.h file and above the DMA_TIMEOUT declaration earlier // in this code). Take action! // digitalWrite(13, HIGH); Serial.printf(""Eye #%d stalled, resetting DMA channel...\\n"", eyeNum); eye[eyeNum].dma.fix(); // If this somehow proves to be inadequate, we still have the Nuclear // Option of just completely restarting the sketch from the beginning, // though this stalls animation for several seconds during startup. // DO NOT enable this line unless the fix() function isn't fixing! //NVIC_SystemReset(); } // At this point, above checks confirm that column is ready and DMA is free if(!x) { // If it's the first column... // End prior SPI transaction... digitalWrite(eye[eyeNum].cs, HIGH); // Deselect eye[eyeNum].spi->endTransaction(); // Initialize new SPI transaction & address window... eye[eyeNum].spi->beginTransaction(settings); digitalWrite(eye[eyeNum].cs, LOW); // Chip select eye[eyeNum].display->setAddrWindow((eye[eyeNum].display->width() - DISPLAY_SIZE) / 2, (eye[eyeNum].display->height() - DISPLAY_SIZE) / 2, DISPLAY_SIZE, DISPLAY_SIZE); delayMicroseconds(1); digitalWrite(eye[eyeNum].dc, HIGH); // Data mode if(eyeNum == (NUM_EYES-1)) { // Handle pupil scaling if(lightSensorPin >= 0) { // Read light sensor, but not too often (Seesaw hates that) #define LIGHT_INTERVAL (1000000 / 10) // 10 Hz, don't poll Seesaw too often if((t - lastLightReadTime) >= LIGHT_INTERVAL) { // Fun fact: eyes have a ""consensual response"" to light -- both // pupils will react even if the opposite eye is stimulated. // Meaning we can get away with using a single light sensor for // both eyes. This comment has nothing to do with the code. uint16_t rawReading = arcada.readLightSensor(); if(rawReading <= 1023) { if(rawReading < lightSensorMin) rawReading = lightSensorMin; // Clamp light sensor range else if(rawReading > lightSensorMax) rawReading = lightSensorMax; // to within usable range float v = (float)(rawReading - lightSensorMin) / (float)(lightSensorMax - lightSensorMin); // 0.0 to 1.0 v = pow(v, lightSensorCurve); lastLightValue = irisMin + v * irisRange; lastLightReadTime = t; lightSensorFailCount = 0; } else { // I2C error if(++lightSensorFailCount >= 25) { // If repeated errors in succession... lightSensorPin = -1; // Stop trying to use the light sensor } else { lastLightReadTime = t - LIGHT_INTERVAL + 30000; // Try again in 30 ms } } } irisValue = (irisValue * 0.97) + (lastLightValue * 0.03); // Filter response for smooth reaction } else { // Not light responsive. Use autonomous iris w/fractal subdivision float n, sum = 0.5; for(uint16_t i=0; i iris min/max if((++iris_frame) >= (1 << IRIS_LEVELS)) iris_frame = 0; } #if defined(ADAFRUIT_MONSTER_M4SK_EXPRESS) if(voiceOn) { // Read buttons, change pitch arcada.readButtons(); uint32_t buttonState = arcada.justPressedButtons(); if( buttonState & ARCADA_BUTTONMASK_UP) { currentPitch *= 1.05; } else if(buttonState & ARCADA_BUTTONMASK_A) { currentPitch = defaultPitch; } else if(buttonState & ARCADA_BUTTONMASK_DOWN) { currentPitch *= 0.95; } if(buttonState & (ARCADA_BUTTONMASK_UP | ARCADA_BUTTONMASK_A | ARCADA_BUTTONMASK_DOWN)) { currentPitch = voicePitch(currentPitch); if(waveform) voiceMod(modulate, waveform); Serial.print(""Voice pitch: ""); Serial.println(currentPitch); } } #endif user_loop(); } } // end first-column check // MUST read the booper when there’s no SPI traffic across the nose! if((eyeNum == (NUM_EYES-1)) && (boopPin >= 0)) { boopSum += readBoop(); } memcpy(eye[eyeNum].dptr, &eye[eyeNum].column[eye[eyeNum].colIdx].descriptor[0], sizeof(DmacDescriptor)); eye[eyeNum].dma_busy = true; eye[eyeNum].dma.startJob(); eye[eyeNum].dmaStartTime = micros(); if(++eye[eyeNum].colNum >= DISPLAY_SIZE) { // If last line sent... eye[eyeNum].colNum = 0; // Wrap to beginning } eye[eyeNum].colIdx ^= 1; // Alternate 0/1 line structs eye[eyeNum].column_ready = false; // OK to render next line } ",12498,False,2274.262042964409,median "/* HelloWorld.ino ""Hello World"" version for U8x8 API Universal 8bit Graphics Library (https://github.com/olikraus/u8g2/) Copyright (c) 2016, olikraus@gmail.com All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #ifdef U8X8_HAVE_HW_SPI #include #endif // Please UNCOMMENT one of the contructor lines below // U8x8 Contructor List // The complete list is available here: https://github.com/olikraus/u8g2/wiki/u8x8setupcpp // Please update the pin numbers according to your setup. Use U8X8_PIN_NONE if the reset pin is not connected //U8X8_NULL u8x8; // null device, a 8x8 pixel display which does nothing //U8X8_SSD1306_128X64_NONAME_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1306_128X64_NONAME_4W_HW_SPI u8x8(/* cs=*/ 6, /* dc=*/ 4, /* reset=*/ 12); // Arduboy (DevKit) //U8X8_SSD1306_128X64_NONAME_4W_HW_SPI u8x8(/* cs=*/ 12, /* dc=*/ 4, /* reset=*/ 6); // Arduboy 10 (Production, Kickstarter Edition) //U8X8_SSD1306_128X64_NONAME_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1306_128X64_NONAME_3W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* reset=*/ 8); //U8X8_SSD1306_128X64_NONAME_3W_HW_SPI u8x8(/* cs=*/ 10, /* reset=*/ 8); //U8X8_SSD1306_128X64_NONAME_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_SSD1306_128X64_ALT0_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); // same as the NONAME variant, but may solve the ""every 2nd line skipped"" problem //U8X8_SSD1306_128X64_NONAME_SW_I2C u8x8(/* clock=*/ 2, /* data=*/ 0, /* reset=*/ U8X8_PIN_NONE); // Digispark ATTiny85 //U8X8_SSD1306_128X64_NONAME_SW_I2C u8x8(/* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // OLEDs without Reset of the Display //U8X8_SSD1306_128X64_VCOMH0_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but maximizes setContrast() range //U8X8_SSD1306_128X64_ALT0_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but may solve the ""every 2nd line skipped"" problem //U8X8_SH1106_128X64_NONAME_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SH1106_128X64_NONAME_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_SH1106_128X64_VCOMH0_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but maximizes setContrast() range //U8X8_SH1106_128X64_WINSTAR_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but uses updated SH1106 init sequence //U8X8_SH1106_128X32_VISIONOX_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_SH1106_128X32_VISIONOX_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SH1106_72X40_WISE_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SH1107_64X128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SH1107_128X128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SH1107_128X128_HW_I2C u8x8(/* reset=*/ 8); //U8X8_SH1107_PIMORONI_128X128_HW_I2C u8x8(/* reset=*/ 8); //U8X8_SH1107_SEEED_128X128_SW_I2C u8x8(/* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); //U8X8_SH1107_SEEED_128X128_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_SH1107_SEEED_96X96_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SH1108_160X160_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1306_128X32_UNIVISION_SW_I2C u8x8(/* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // Adafruit Feather ESP8266/32u4 Boards + FeatherWing OLED //U8X8_SSD1306_128X32_UNIVISION_SW_I2C u8x8(/* clock=*/ 21, /* data=*/ 20, /* reset=*/ U8X8_PIN_NONE); // Adafruit Feather M0 Basic Proto + FeatherWing OLED //U8X8_SSD1306_128X32_UNIVISION_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); // Adafruit ESP8266/32u4/ARM Boards + FeatherWing OLED //U8X8_SSD1306_128X32_UNIVISION_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE, /* clock=*/ SCL, /* data=*/ SDA); // pin remapping with ESP8266 HW I2C //U8X8_SSD1306_128X32_WINSTAR_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE, /* clock=*/ SCL, /* data=*/ SDA); // pin remapping with ESP8266 HW I2C //U8X8_SSD1306_64X48_ER_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); // EastRising 0.66"" OLED breakout board, Uno: A4=SDA, A5=SCL, 5V powered //U8X8_SSD1306_48X64_WINSTAR_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_SSD1306_64X32_NONAME_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_SSD1306_64X32_1F_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_SSD1306_96X16_ER_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); // EastRising 0.69"" //U8X8_SSD1306_72X40_ER_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); // EastRising 0.42"" //U8X8_SSD1306_128X64_NONAME_6800 u8x8(13, 11, 2, 3, 4, 5, 6, A4, /*enable=*/ 7, /*cs=*/ 10, /*dc=*/ 9, /*reset=*/ 8); //U8X8_SSD1306_128X64_NONAME_8080 u8x8(13, 11, 2, 3, 4, 5, 6, A4, /*enable=*/ 7, /*cs=*/ 10, /*dc=*/ 9, /*reset=*/ 8); //U8X8_SSD1309_128X64_NONAME0_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1309_128X64_NONAME0_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1309_128X64_NONAME2_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1309_128X64_NONAME2_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1316_128X32_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1316_128X32_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1317_96X96_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // not tested, not confirmed //U8X8_SSD1317_96X96_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // not tested, not confirmed //U8X8_SSD1318_128X96_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1318_128X96_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1320_160X132_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1320_160X132_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1322_NHD_256X64_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1322_NHD_256X64_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1322_NHD_128X64_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1322_NHD_128X64_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1325_NHD_128X64_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1325_NHD_128X64_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD0323_OS128064_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD0323_OS128064_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1326_ER_256X32_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // experimental driver for ER-OLED018-1 //U8X8_SSD1327_SEEED_96X96_SW_I2C u8x8(/* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // Seeedstudio Grove OLED 96x96 //U8X8_SSD1327_SEEED_96X96_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); // Seeedstudio Grove OLED 96x96 //U8X8_SSD1327_EA_W128128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1327_EA_W128128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1327_MIDAS_128X128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1327_MIDAS_128X128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1327_WS_128X128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1327_WS_128X128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1327_VISIONOX_128X96_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1327_VISIONOX_128X96_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1329_128X96_NONAME_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1329_128X96_NONAME_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1329_96X96_NONAME_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1329_96X96_NONAME_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1329_96X96_NONAME_4W_HW_SPI u8x8(/* cs=*/ A4, /* dc=*/ A2, /* reset=*/ U8X8_PIN_NONE); // Adafruit Feather 32u4 Basic Proto //U8X8_SSD1305_128X32_NONAME_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1305_128X32_NONAME_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1305_128X32_ADAFRUIT_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1305_128X32_ADAFRUIT_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1305_128X64_ADAFRUIT_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1305_128X64_ADAFRUIT_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1305_128X64_RAYSTAR_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1305_128X64_RAYSTAR_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_KS0108_128X64 u8x8(8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*dc=*/ 17, /*cs0=*/ 14, /*cs1=*/ 15, /*cs2=*/ U8X8_PIN_NONE, /* reset=*/ U8X8_PIN_NONE); // Set R/W to low! //U8X8_KS0108_ERM19264 u8x8(8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*dc=*/ 17, /*cs0=*/ 14, /*cs1=*/ 15, /*cs2=*/ 16, /* reset=*/ U8X8_PIN_NONE); // Set R/W to low! //U8X8_HD44102_100X64 u8x8(4, 5, 6, 7, 8, 9, 10, 11, /*enable=*/ 2, /*dc=*/ 3, /*cs0=*/ A0, /*cs1=*/ A1, /*cs2=*/ A2, /* reset=*/ U8X8_PIN_NONE); // Set R/W to low! //U8X8_T7932_150X32 u8x8(4, 5, 6, 7, 8, 9, 10, 11, /*enable=*/ 2, /*dc=*/ 3, /*cs0=*/ A0, /*cs1=*/ A1, /*cs2=*/ A2, /* reset=*/ U8X8_PIN_NONE); // Set R/W to low! //U8X8_UC1701_EA_DOGS102_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1701_EA_DOGS102_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_PCD8544_84X48_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Nokia 5110 Display //U8X8_PCD8544_84X48_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Nokia 5110 Display //U8X8_PCF8812_96X65_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Could be also PCF8814 //U8X8_PCF8812_96X65_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Could be also PCF8814 //U8X8_HX1230_96X68_3W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* reset=*/ 8); //U8X8_HX1230_96X68_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7528_ERC16064_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7528_ERC16064_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_EA_DOGM128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_EA_DOGM128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_64128N_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_64128N_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_EA_DOGM132_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); // DOGM132 Shield //U8X8_ST7565_EA_DOGM132_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); // DOGM132 Shield //U8X8_ST7565_ZOLEN_128X64_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_ZOLEN_128X64_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_LM6059_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Adafruit ST7565 GLCD //U8X8_ST7565_LM6059_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Adafruit ST7565 GLCD //U8X8_ST7565_KS0713_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // KS0713 controller //U8X8_ST7565_KS0713_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // KS0713 controller //U8X8_ST7565_LX12864_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_LX12864_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_ERC12864_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_ERC12864_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_ERC12864_ALT_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // contrast improved version for ERC12864 //U8X8_ST7565_ERC12864_ALT_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // contrast improved version for ERC12864 //U8X8_ST7565_NHD_C12832_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_NHD_C12832_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_NHD_C12864_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_NHD_C12864_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_JLX12864_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_JLX12864_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_PI_132X64_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); // Pax Instruments Shield, LCD_BL=6 //U8X8_ST7567_PI_132X64_4W_HW_SPI u8x8(/* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); // Pax Instruments Shield, LCD_BL=6 //U8X8_ST7567_JLX12864_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_JLX12864_4W_HW_SPI u8x8(/* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_OS12864_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_OS12864_4W_HW_SPI u8x8(/* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_ENH_DG128064_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_ENH_DG128064_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_ENH_DG128064I_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_ENH_DG128064I_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_64X32_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_ST7567_HEM6432_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_ST7571_128X128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7571_128X128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX172104_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX172104_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX19296_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX19296_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256128_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_WO256X128_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_WO256X128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256160_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256160_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256160M_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256160M_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256160_ALT_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256160_ALT_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX240160_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX240160_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX25664_2ND_HW_I2C u8x8(/* reset=*/ 8); // Due, 2nd I2C //U8X8_ST75320_JLX320240_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75320_JLX320240_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_NT7534_TG12864R_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_NT7534_TG12864R_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7588_JLX12864_SW_I2C u8x8(/* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ 5); //U8X8_ST7588_JLX12864_HW_I2C u8x8(/* reset=*/ 5); //U8X8_IST3020_ERC19264_6800 u8x8(44, 43, 42, 41, 40, 39, 38, 37, /*enable=*/ 28, /*cs=*/ 32, /*dc=*/ 30, /*reset=*/ 31); // Connect WR pin with GND //U8X8_IST3020_ERC19264_8080 u8x8(44, 43, 42, 41, 40, 39, 38, 37, /*enable=*/ 29, /*cs=*/ 32, /*dc=*/ 30, /*reset=*/ 31); // Connect RD pin with 3.3V //U8X8_IST3020_ERC19264_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_IST7920_128X128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Round display //U8X8_IST7920_128X128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Round display //U8X8_UC1601_128X32_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1601_128X32_3W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* reset=*/ 8); //U8X8_UC1601_128X64_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1604_JLX19264_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1604_JLX19264_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1608_ERC24064_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Due, SW SPI, ERC24064-1 Test Board //U8X8_UC1608_DEM240064_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Due, SW SPI, ERC24064-1 Test Board //U8X8_UC1608_ERC240120_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1608_240X128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1610_EA_DOGXL160_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8X8_UC1610_EA_DOGXL160_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8X8_UC1611_EA_DOGM240_2ND_HW_I2C u8x8(/* reset=*/ 8); // Due, 2nd I2C, DOGM240 Test Board //U8X8_UC1611_EA_DOGM240_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // SW SPI, Due DOGXL240 Test Board //U8X8_UC1611_EA_DOGXL240_2ND_HW_I2C u8x8(/* reset=*/ 8); // Due, 2nd I2C, DOGXL240 Test Board //U8X8_UC1611_EA_DOGXL240_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // SW SPI, Due DOGXL240 Test Board //U8X8_UC1611_IDS4073_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1611_IDS4073_4W_HW_SPI u8x8( /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1611_EW50850_8080 u8x8(8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 3, /*dc=*/ 16, /*reset=*/ 17); // 240x160, Connect RD/WR1 pin with 3.3V, CS is aktive high //U8X8_UC1611_CG160160_8080 u8x8(8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 3, /*dc=*/ 16, /*reset=*/ 17); // Connect WR1 and CD1 pin with 3.3V, connect CS0 with cs, WR0 with enable, CD with dc //U8X8_UC1617_JLX128128_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1617_JLX128128_4W_HW_SPI u8x8( /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1638_192X96_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1638_192X96_4W_HW_SPI u8x8( /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1638_192X96_SW_I2C u8x8(/* clock=*/ 13, /* data=*/ 11, /* reset=*/ 8); // u8g2 test board: I2C clock/data is same as SPI, I2C default address is 0x78 //U8X8_SSD1606_172X72_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // eInk/ePaper Display //U8X8_SSD1607_200X200_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // eInk/ePaper Display, original LUT from embedded artists //U8X8_SSD1607_GS_200X200_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Good Display //U8X8_SSD1607_WS_200X200_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Waveshare //U8X8_IL3820_296X128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // eInk/ePaper Display, original LUT //U8X8_IL3820_V2_296X128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // eInk/ePaper Display, optimized (lesser screen flicker) //U8X8_ST7511_AVD_320X240_8080 u8x8(13, 11, 2, 3, 4, 5, 6, A4, /*enable/WR=*/ 7, /*cs=*/ 10, /*dc=*/ 9, /*reset=*/ 8); // Connect RD pin with 3.3V/5V //U8X8_S1D15721_240X64_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_S1D15721_240X64_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // End of constructor list void setup(void) { /* U8g2 Project: SSD1306 Test Board */ //pinMode(10, OUTPUT); //pinMode(9, OUTPUT); //digitalWrite(10, 0); //digitalWrite(9, 0); /* U8g2 Project: KS0108 Test Board */ //pinMode(16, OUTPUT); //digitalWrite(16, 0); u8x8.begin(); u8x8.setPowerSave(0); } void loop(void) { u8x8.setFont(u8x8_font_chroma48medium8_r); u8x8.drawString(0,1,""Hello World!""); u8x8.drawString(0,0,""Line 0""); u8x8.drawString(0,8,""Line 8""); u8x8.drawString(0,9,""Line 9""); u8x8.refreshDisplay(); // only required for SSD1606/7 delay(2000); } ",12220,True,3704.21236308546,median "cmd_drivers/usb/host/xhci-ext-caps.o := aarch64-xilinx-linux-gcc -fuse-ld=bfd -fdebug-prefix-map=/home/zw/share/ultra96/mipitest/build/tmp/work/ultra96_zynqmp-xilinx-linux/linux-xlnx/4.19-xilinx-v2019.1+git999-r0=/usr/src/debug/linux-xlnx/4.19-xilinx-v2019.1+git999-r0 -fdebug-prefix-map=/home/zw/share/ultra96/mipitest/build/tmp/work/ultra96_zynqmp-xilinx-linux/linux-xlnx/4.19-xilinx-v2019.1+git999-r0/recipe-sysroot= -fdebug-prefix-map=/home/zw/share/ultra96/mipitest/build/tmp/work/ultra96_zynqmp-xilinx-linux/linux-xlnx/4.19-xilinx-v2019.1+git999-r0/recipe-sysroot-native= -fdebug-prefix-map=/home/zw/share/ultra96/mipitest/build/tmp/work-shared/ultra96-zynqmp/kernel-source=/usr/src/kernel --sysroot=/home/zw/share/ultra96/mipitest/build/tmp/work/ultra96_zynqmp-xilinx-linux/linux-xlnx/4.19-xilinx-v2019.1+git999-r0/recipe-sysroot -Wp,-MD,drivers/usb/host/.xhci-ext-caps.o.d -nostdinc -isystem /home/zw/share/ultra96/mipitest/build/tmp/work/ultra96_zynqmp-xilinx-linux/linux-xlnx/4.19-xilinx-v2019.1+git999-r0/recipe-sysroot-native/usr/bin/aarch64-xilinx-linux/../../lib/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/8.2.0/include -I/home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include -I./arch/arm64/include/generated -I/home/zw/share/ultra96/mipitest/linux-xlnx/include -I./include -I/home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi -I./arch/arm64/include/generated/uapi -I/home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi -I./include/generated/uapi -include /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kconfig.h -include /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/compiler_types.h -I/home/zw/share/ultra96/mipitest/linux-xlnx/drivers/usb/host -Idrivers/usb/host -D__KERNEL__ -mlittle-endian -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -DCC_HAVE_ASM_GOTO -mgeneral-regs-only -DCONFIG_AS_LSE=1 -fno-asynchronous-unwind-tables -mabi=lp64 -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-int-in-bool-context -O2 --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -g -Wdeclaration-after-statement -Wno-pointer-sign -Wno-stringop-truncation -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -fmacro-prefix-map=/home/zw/share/ultra96/mipitest/linux-xlnx/= -Wno-packed-not-aligned -DKBUILD_BASENAME='""xhci_ext_caps""' -DKBUILD_MODNAME='""xhci_hcd""' -c -o drivers/usb/host/xhci-ext-caps.o /home/zw/share/ultra96/mipitest/linux-xlnx/drivers/usb/host/xhci-ext-caps.c source_drivers/usb/host/xhci-ext-caps.o := /home/zw/share/ultra96/mipitest/linux-xlnx/drivers/usb/host/xhci-ext-caps.c deps_drivers/usb/host/xhci-ext-caps.o := \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kconfig.h \\ $(wildcard include/config/cpu/big/endian.h) \\ $(wildcard include/config/booger.h) \\ $(wildcard include/config/foo.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/compiler_types.h \\ $(wildcard include/config/have/arch/compiler/h.h) \\ $(wildcard include/config/enable/must/check.h) \\ $(wildcard include/config/arch/supports/optimized/inlining.h) \\ $(wildcard include/config/optimize/inlining.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/compiler-gcc.h \\ $(wildcard include/config/arch/use/builtin/bswap.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/platform_device.h \\ $(wildcard include/config/suspend.h) \\ $(wildcard include/config/hibernate/callbacks.h) \\ $(wildcard include/config/pm/sleep.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/device.h \\ $(wildcard include/config/debug/devres.h) \\ $(wildcard include/config/srcu.h) \\ $(wildcard include/config/generic/msi/irq/domain.h) \\ $(wildcard include/config/pinctrl.h) \\ $(wildcard include/config/generic/msi/irq.h) \\ $(wildcard include/config/numa.h) \\ $(wildcard include/config/dma/cma.h) \\ $(wildcard include/config/of.h) \\ $(wildcard include/config/devtmpfs.h) \\ $(wildcard include/config/printk.h) \\ $(wildcard include/config/dynamic/debug.h) \\ $(wildcard include/config/sysfs/deprecated.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/ioport.h \\ $(wildcard include/config/memory/hotremove.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/compiler.h \\ $(wildcard include/config/trace/branch/profiling.h) \\ $(wildcard include/config/profile/all/branches.h) \\ $(wildcard include/config/stack/validation.h) \\ $(wildcard include/config/kasan.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/compiler_types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/types.h \\ arch/arm64/include/generated/uapi/asm/types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/int-ll64.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/int-ll64.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/bitsperlong.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitsperlong.h \\ $(wildcard include/config/64bit.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/bitsperlong.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/posix_types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/stddef.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/stddef.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/posix_types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/posix_types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/barrier.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/barrier.h \\ $(wildcard include/config/smp.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kasan-checks.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/types.h \\ $(wildcard include/config/have/uid16.h) \\ $(wildcard include/config/uid16.h) \\ $(wildcard include/config/lbdaf.h) \\ $(wildcard include/config/arch/dma/addr/t/64bit.h) \\ $(wildcard include/config/phys/addr/t/64bit.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kobject.h \\ $(wildcard include/config/uevent/helper.h) \\ $(wildcard include/config/debug/kobject/release.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/list.h \\ $(wildcard include/config/debug/list.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/poison.h \\ $(wildcard include/config/illegal/pointer/value.h) \\ $(wildcard include/config/page/poisoning/zero.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/const.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/const.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kernel.h \\ $(wildcard include/config/preempt/voluntary.h) \\ $(wildcard include/config/debug/atomic/sleep.h) \\ $(wildcard include/config/mmu.h) \\ $(wildcard include/config/prove/locking.h) \\ $(wildcard include/config/arch/has/refcount.h) \\ $(wildcard include/config/panic/timeout.h) \\ $(wildcard include/config/tracing.h) \\ $(wildcard include/config/ftrace/mcount/record.h) \\ /home/zw/share/ultra96/mipitest/build/tmp/work/ultra96_zynqmp-xilinx-linux/linux-xlnx/4.19-xilinx-v2019.1+git999-r0/recipe-sysroot-native/usr/lib/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/8.2.0/include/stdarg.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/linkage.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/stringify.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/export.h \\ $(wildcard include/config/modules.h) \\ $(wildcard include/config/modversions.h) \\ $(wildcard include/config/module/rel/crcs.h) \\ $(wildcard include/config/have/arch/prel32/relocations.h) \\ $(wildcard include/config/trim/unused/ksyms.h) \\ $(wildcard include/config/unused/symbols.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/linkage.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/bitops.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/bits.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/bitops.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/builtin-__ffs.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/builtin-ffs.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/builtin-__fls.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/builtin-fls.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/ffz.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/fls64.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/find.h \\ $(wildcard include/config/generic/find/first/bit.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/sched.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/hweight.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/arch_hweight.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/const_hweight.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/atomic.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/atomic.h \\ $(wildcard include/config/generic/atomic64.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/atomic.h \\ $(wildcard include/config/arm64/lse/atomics.h) \\ $(wildcard include/config/as/lse.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/lse.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/alternative.h \\ $(wildcard include/config/arm64/uao.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/cpucaps.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/insn.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/init.h \\ $(wildcard include/config/strict/kernel/rwx.h) \\ $(wildcard include/config/strict/module/rwx.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/atomic_lse.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/cmpxchg.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/build_bug.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/atomic-long.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/lock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/non-atomic.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/le.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/byteorder.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/byteorder/little_endian.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/byteorder/little_endian.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/swab.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/swab.h \\ arch/arm64/include/generated/uapi/asm/swab.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/swab.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/byteorder/generic.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/ext2-atomic-setbit.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/log2.h \\ $(wildcard include/config/arch/has/ilog2/u32.h) \\ $(wildcard include/config/arch/has/ilog2/u64.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/typecheck.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/printk.h \\ $(wildcard include/config/message/loglevel/default.h) \\ $(wildcard include/config/console/loglevel/default.h) \\ $(wildcard include/config/console/loglevel/quiet.h) \\ $(wildcard include/config/early/printk.h) \\ $(wildcard include/config/printk/nmi.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kern_levels.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/cache.h \\ $(wildcard include/config/arch/has/cache/line/size.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/kernel.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/sysinfo.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/cache.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/cputype.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/sysreg.h \\ $(wildcard include/config/broken/gas/inst.h) \\ $(wildcard include/config/arm64/pa/bits/52.h) \\ $(wildcard include/config/arm64/4k/pages.h) \\ $(wildcard include/config/arm64/16k/pages.h) \\ $(wildcard include/config/arm64/64k/pages.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/compiler.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sysfs.h \\ $(wildcard include/config/debug/lock/alloc.h) \\ $(wildcard include/config/sysfs.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kernfs.h \\ $(wildcard include/config/kernfs.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/err.h \\ arch/arm64/include/generated/uapi/asm/errno.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/errno.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/errno-base.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/mutex.h \\ $(wildcard include/config/mutex/spin/on/owner.h) \\ $(wildcard include/config/debug/mutexes.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/current.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/spinlock_types.h \\ $(wildcard include/config/debug/spinlock.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/spinlock_types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/qspinlock_types.h \\ $(wildcard include/config/paravirt.h) \\ $(wildcard include/config/nr/cpus.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/qrwlock_types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/lockdep.h \\ $(wildcard include/config/lockdep.h) \\ $(wildcard include/config/lock/stat.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rwlock_types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/processor.h \\ $(wildcard include/config/compat.h) \\ $(wildcard include/config/have/hw/breakpoint.h) \\ $(wildcard include/config/gcc/plugin/stackleak.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/string.h \\ $(wildcard include/config/binary/printf.h) \\ $(wildcard include/config/fortify/source.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/string.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/string.h \\ $(wildcard include/config/arch/has/uaccess/flushcache.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/cpufeature.h \\ $(wildcard include/config/arm64/sw/ttbr0/pan.h) \\ $(wildcard include/config/arm64/sve.h) \\ $(wildcard include/config/arm64/ssbd.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/hwcap.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/hwcap.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/bug.h \\ $(wildcard include/config/generic/bug.h) \\ $(wildcard include/config/bug/on/data/corruption.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/bug.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/asm-bug.h \\ $(wildcard include/config/debug/bugverbose.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/brk-imm.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bug.h \\ $(wildcard include/config/bug.h) \\ $(wildcard include/config/generic/bug/relative/pointers.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/jump_label.h \\ $(wildcard include/config/jump/label.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/hw_breakpoint.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/virt.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/ptrace.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/ptrace.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/sigcontext.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/prctl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/ptrace.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/sections.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/sections.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/pgtable-hwdef.h \\ $(wildcard include/config/pgtable/levels.h) \\ $(wildcard include/config/arm64/pa/bits.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/memory.h \\ $(wildcard include/config/arm64/va/bits.h) \\ $(wildcard include/config/vmap/stack.h) \\ $(wildcard include/config/debug/align/rodata.h) \\ $(wildcard include/config/blk/dev/initrd.h) \\ $(wildcard include/config/debug/virtual.h) \\ $(wildcard include/config/sparsemem/vmemmap.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/page-def.h \\ $(wildcard include/config/arm64/page/shift.h) \\ $(wildcard include/config/arm64/cont/shift.h) \\ arch/arm64/include/generated/asm/sizes.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/sizes.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sizes.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/mmdebug.h \\ $(wildcard include/config/debug/vm.h) \\ $(wildcard include/config/debug/vm/pgflags.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/memory_model.h \\ $(wildcard include/config/flatmem.h) \\ $(wildcard include/config/discontigmem.h) \\ $(wildcard include/config/sparsemem.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/pfn.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/fpsimd.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/osq_lock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/debug_locks.h \\ $(wildcard include/config/debug/locking/api/selftests.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/idr.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/radix-tree.h \\ $(wildcard include/config/base/small.h) \\ $(wildcard include/config/radix/tree/multiorder.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/preempt.h \\ $(wildcard include/config/preempt/count.h) \\ $(wildcard include/config/debug/preempt.h) \\ $(wildcard include/config/trace/preempt/toggle.h) \\ $(wildcard include/config/preempt.h) \\ $(wildcard include/config/preempt/notifiers.h) \\ arch/arm64/include/generated/asm/preempt.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/preempt.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/thread_info.h \\ $(wildcard include/config/thread/info/in/task.h) \\ $(wildcard include/config/have/arch/within/stack/frames.h) \\ $(wildcard include/config/hardened/usercopy.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/restart_block.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/time64.h \\ $(wildcard include/config/64bit/time.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/math64.h \\ $(wildcard include/config/arch/supports/int128.h) \\ arch/arm64/include/generated/asm/div64.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/div64.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/time.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/thread_info.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/stack_pointer.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rcupdate.h \\ $(wildcard include/config/preempt/rcu.h) \\ $(wildcard include/config/rcu/stall/common.h) \\ $(wildcard include/config/no/hz/full.h) \\ $(wildcard include/config/rcu/nocb/cpu.h) \\ $(wildcard include/config/tasks/rcu.h) \\ $(wildcard include/config/tree/rcu.h) \\ $(wildcard include/config/tiny/rcu.h) \\ $(wildcard include/config/debug/objects/rcu/head.h) \\ $(wildcard include/config/hotplug/cpu.h) \\ $(wildcard include/config/prove/rcu.h) \\ $(wildcard include/config/rcu/boost.h) \\ $(wildcard include/config/arch/weak/release/acquire.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/irqflags.h \\ $(wildcard include/config/trace/irqflags.h) \\ $(wildcard include/config/irqsoff/tracer.h) \\ $(wildcard include/config/preempt/tracer.h) \\ $(wildcard include/config/trace/irqflags/support.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/irqflags.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/bottom_half.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/cpumask.h \\ $(wildcard include/config/cpumask/offstack.h) \\ $(wildcard include/config/debug/per/cpu/maps.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/threads.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/bitmap.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rcutree.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/spinlock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/spinlock.h \\ arch/arm64/include/generated/asm/qrwlock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/qrwlock.h \\ arch/arm64/include/generated/asm/qspinlock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/qspinlock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rwlock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/spinlock_api_smp.h \\ $(wildcard include/config/inline/spin/lock.h) \\ $(wildcard include/config/inline/spin/lock/bh.h) \\ $(wildcard include/config/inline/spin/lock/irq.h) \\ $(wildcard include/config/inline/spin/lock/irqsave.h) \\ $(wildcard include/config/inline/spin/trylock.h) \\ $(wildcard include/config/inline/spin/trylock/bh.h) \\ $(wildcard include/config/uninline/spin/unlock.h) \\ $(wildcard include/config/inline/spin/unlock/bh.h) \\ $(wildcard include/config/inline/spin/unlock/irq.h) \\ $(wildcard include/config/inline/spin/unlock/irqrestore.h) \\ $(wildcard include/config/generic/lockbreak.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rwlock_api_smp.h \\ $(wildcard include/config/inline/read/lock.h) \\ $(wildcard include/config/inline/write/lock.h) \\ $(wildcard include/config/inline/read/lock/bh.h) \\ $(wildcard include/config/inline/write/lock/bh.h) \\ $(wildcard include/config/inline/read/lock/irq.h) \\ $(wildcard include/config/inline/write/lock/irq.h) \\ $(wildcard include/config/inline/read/lock/irqsave.h) \\ $(wildcard include/config/inline/write/lock/irqsave.h) \\ $(wildcard include/config/inline/read/trylock.h) \\ $(wildcard include/config/inline/write/trylock.h) \\ $(wildcard include/config/inline/read/unlock.h) \\ $(wildcard include/config/inline/write/unlock.h) \\ $(wildcard include/config/inline/read/unlock/bh.h) \\ $(wildcard include/config/inline/write/unlock/bh.h) \\ $(wildcard include/config/inline/read/unlock/irq.h) \\ $(wildcard include/config/inline/write/unlock/irq.h) \\ $(wildcard include/config/inline/read/unlock/irqrestore.h) \\ $(wildcard include/config/inline/write/unlock/irqrestore.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/gfp.h \\ $(wildcard include/config/highmem.h) \\ $(wildcard include/config/zone/dma.h) \\ $(wildcard include/config/zone/dma32.h) \\ $(wildcard include/config/zone/device.h) \\ $(wildcard include/config/memory/isolation.h) \\ $(wildcard include/config/compaction.h) \\ $(wildcard include/config/cma.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/mmzone.h \\ $(wildcard include/config/force/max/zoneorder.h) \\ $(wildcard include/config/zsmalloc.h) \\ $(wildcard include/config/memcg.h) \\ $(wildcard include/config/memory/hotplug.h) \\ $(wildcard include/config/flat/node/mem/map.h) \\ $(wildcard include/config/page/extension.h) \\ $(wildcard include/config/no/bootmem.h) \\ $(wildcard include/config/deferred/struct/page/init.h) \\ $(wildcard include/config/transparent/hugepage.h) \\ $(wildcard include/config/have/memory/present.h) \\ $(wildcard include/config/have/memoryless/nodes.h) \\ $(wildcard include/config/have/memblock/node/map.h) \\ $(wildcard include/config/need/multiple/nodes.h) \\ $(wildcard include/config/have/arch/early/pfn/to/nid.h) \\ $(wildcard include/config/sparsemem/extreme.h) \\ $(wildcard include/config/have/arch/pfn/valid.h) \\ $(wildcard include/config/holes/in/zone.h) \\ $(wildcard include/config/arch/has/holes/memorymodel.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/wait.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/wait.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/numa.h \\ $(wildcard include/config/nodes/shift.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/seqlock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/nodemask.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/pageblock-flags.h \\ $(wildcard include/config/hugetlb/page.h) \\ $(wildcard include/config/hugetlb/page/size/variable.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/page-flags-layout.h \\ $(wildcard include/config/numa/balancing.h) \\ include/generated/bounds.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/sparsemem.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/page.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/personality.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/personality.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/pgtable-types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/pgtable-nopud.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/pgtable-nop4d-hack.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/5level-fixup.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/getorder.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/memory_hotplug.h \\ $(wildcard include/config/arch/has/add/pages.h) \\ $(wildcard include/config/have/arch/nodedata/extension.h) \\ $(wildcard include/config/have/bootmem/info/node.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/notifier.h \\ $(wildcard include/config/tree/srcu.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/errno.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/errno.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rwsem.h \\ $(wildcard include/config/rwsem/spin/on/owner.h) \\ $(wildcard include/config/rwsem/generic/spinlock.h) \\ arch/arm64/include/generated/asm/rwsem.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/rwsem.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/srcu.h \\ $(wildcard include/config/tiny/srcu.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/workqueue.h \\ $(wildcard include/config/debug/objects/work.h) \\ $(wildcard include/config/freezer.h) \\ $(wildcard include/config/wq/watchdog.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/timer.h \\ $(wildcard include/config/debug/objects/timers.h) \\ $(wildcard include/config/no/hz/common.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/ktime.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/time.h \\ $(wildcard include/config/arch/uses/gettimeoffset.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/time32.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/jiffies.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/timex.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/timex.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/param.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/param.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/param.h \\ $(wildcard include/config/hz.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/param.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/timex.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/arch_timer.h \\ $(wildcard include/config/arm/arch/timer/ool/workaround.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/smp.h \\ $(wildcard include/config/up/late/init.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/llist.h \\ $(wildcard include/config/arch/have/nmi/safe/cmpxchg.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/smp.h \\ $(wildcard include/config/arm64/acpi/parking/protocol.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/percpu.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/percpu.h \\ $(wildcard include/config/have/setup/per/cpu/area.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/percpu-defs.h \\ $(wildcard include/config/debug/force/weak/per/cpu.h) \\ $(wildcard include/config/virtualization.h) \\ $(wildcard include/config/amd/mem/encrypt.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/clocksource/arm_arch_timer.h \\ $(wildcard include/config/arm/arch/timer.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/timecounter.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/timex.h \\ include/generated/timeconst.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/timekeeping.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/timekeeping32.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/debugobjects.h \\ $(wildcard include/config/debug/objects.h) \\ $(wildcard include/config/debug/objects/free.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rcu_segcblist.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/srcutree.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rcu_node_tree.h \\ $(wildcard include/config/rcu/fanout.h) \\ $(wildcard include/config/rcu/fanout/leaf.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/completion.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/topology.h \\ $(wildcard include/config/use/percpu/numa/node/id.h) \\ $(wildcard include/config/sched/smt.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/percpu.h \\ $(wildcard include/config/need/per/cpu/embed/first/chunk.h) \\ $(wildcard include/config/need/per/cpu/page/first/chunk.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/topology.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/arch_topology.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/topology.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rbtree.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/uidgid.h \\ $(wildcard include/config/multiuser.h) \\ $(wildcard include/config/user/ns.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/highuid.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kobject_ns.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/stat.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/stat.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/stat.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/stat.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/compat_time.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/compat.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sched.h \\ $(wildcard include/config/virt/cpu/accounting/native.h) \\ $(wildcard include/config/sched/info.h) \\ $(wildcard include/config/schedstats.h) \\ $(wildcard include/config/fair/group/sched.h) \\ $(wildcard include/config/rt/group/sched.h) \\ $(wildcard include/config/cgroup/sched.h) \\ $(wildcard include/config/blk/dev/io/trace.h) \\ $(wildcard include/config/memcg/kmem.h) \\ $(wildcard include/config/compat/brk.h) \\ $(wildcard include/config/cgroups.h) \\ $(wildcard include/config/blk/cgroup.h) \\ $(wildcard include/config/stackprotector.h) \\ $(wildcard include/config/arch/has/scaled/cputime.h) \\ $(wildcard include/config/virt/cpu/accounting/gen.h) \\ $(wildcard include/config/posix/timers.h) \\ $(wildcard include/config/sysvipc.h) \\ $(wildcard include/config/detect/hung/task.h) \\ $(wildcard include/config/auditsyscall.h) \\ $(wildcard include/config/rt/mutexes.h) \\ $(wildcard include/config/ubsan.h) \\ $(wildcard include/config/block.h) \\ $(wildcard include/config/task/xacct.h) \\ $(wildcard include/config/cpusets.h) \\ $(wildcard include/config/intel/rdt.h) \\ $(wildcard include/config/futex.h) \\ $(wildcard include/config/perf/events.h) \\ $(wildcard include/config/rseq.h) \\ $(wildcard include/config/task/delay/acct.h) \\ $(wildcard include/config/fault/injection.h) \\ $(wildcard include/config/latencytop.h) \\ $(wildcard include/config/function/graph/tracer.h) \\ $(wildcard include/config/kcov.h) \\ $(wildcard include/config/uprobes.h) \\ $(wildcard include/config/bcache.h) \\ $(wildcard include/config/livepatch.h) \\ $(wildcard include/config/security.h) \\ $(wildcard include/config/arch/task/struct/on/stack.h) \\ $(wildcard include/config/debug/rseq.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/sched.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/pid.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rculist.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sem.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/sem.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/ipc.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rhashtable-types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/ipc.h \\ arch/arm64/include/generated/uapi/asm/ipcbuf.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/ipcbuf.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/refcount.h \\ $(wildcard include/config/refcount/full.h) \\ arch/arm64/include/generated/uapi/asm/sembuf.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/sembuf.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/shm.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/shm.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/hugetlb_encode.h \\ arch/arm64/include/generated/uapi/asm/shmbuf.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/shmbuf.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/shmparam.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/shmparam.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kcov.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/kcov.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/plist.h \\ $(wildcard include/config/debug/pi/list.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/hrtimer.h \\ $(wildcard include/config/high/res/timers.h) \\ $(wildcard include/config/time/low/res.h) \\ $(wildcard include/config/timerfd.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/timerqueue.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/seccomp.h \\ $(wildcard include/config/seccomp.h) \\ $(wildcard include/config/have/arch/seccomp/filter.h) \\ $(wildcard include/config/seccomp/filter.h) \\ $(wildcard include/config/checkpoint/restore.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/seccomp.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/resource.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/resource.h \\ arch/arm64/include/generated/uapi/asm/resource.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/resource.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/resource.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/latencytop.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sched/prio.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/signal_types.h \\ $(wildcard include/config/old/sigaction.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/signal.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/signal.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/signal.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/signal.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/signal-defs.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/siginfo.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/siginfo.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/mm_types_task.h \\ $(wildcard include/config/arch/want/batched/unmap/tlb/flush.h) \\ $(wildcard include/config/split/ptlock/cpus.h) \\ $(wildcard include/config/arch/enable/split/pmd/ptlock.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/task_io_accounting.h \\ $(wildcard include/config/task/io/accounting.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/rseq.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sched/task_stack.h \\ $(wildcard include/config/stack/growsup.h) \\ $(wildcard include/config/debug/stack/usage.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/magic.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/stat.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kref.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/klist.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/pm.h \\ $(wildcard include/config/vt/console/sleep.h) \\ $(wildcard include/config/pm.h) \\ $(wildcard include/config/pm/clk.h) \\ $(wildcard include/config/pm/generic/domains.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/ratelimit.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/overflow.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/device.h \\ $(wildcard include/config/iommu/api.h) \\ $(wildcard include/config/xen.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/pm_wakeup.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/drivers/usb/host/xhci.h \\ $(wildcard include/config/u3e.h) \\ $(wildcard include/config/cie.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/usb.h \\ $(wildcard include/config/usb/mon.h) \\ $(wildcard include/config/acpi.h) \\ $(wildcard include/config/usb/led/trig.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/mod_devicetable.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/uuid.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/uuid.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/usb/ch9.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/usb/ch9.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/delay.h \\ arch/arm64/include/generated/asm/delay.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/delay.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/interrupt.h \\ $(wildcard include/config/irq/forced/threading.h) \\ $(wildcard include/config/generic/irq/probe.h) \\ $(wildcard include/config/proc/fs.h) \\ $(wildcard include/config/irq/timings.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/irqreturn.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/irqnr.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/irqnr.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/hardirq.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/ftrace_irq.h \\ $(wildcard include/config/ftrace/nmi/enter.h) \\ $(wildcard include/config/hwlat/tracer.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/vtime.h \\ $(wildcard include/config/virt/cpu/accounting.h) \\ $(wildcard include/config/irq/time/accounting.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/context_tracking_state.h \\ $(wildcard include/config/context/tracking.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/static_key.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/hardirq.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/irq.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/irq.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/irq_cpustat.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/fs.h \\ $(wildcard include/config/fs/posix/acl.h) \\ $(wildcard include/config/cgroup/writeback.h) \\ $(wildcard include/config/ima.h) \\ $(wildcard include/config/fsnotify.h) \\ $(wildcard include/config/fs/encryption.h) \\ $(wildcard include/config/epoll.h) \\ $(wildcard include/config/file/locking.h) \\ $(wildcard include/config/quota.h) \\ $(wildcard include/config/fs/dax.h) \\ $(wildcard include/config/mandatory/file/locking.h) \\ $(wildcard include/config/migration.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/wait_bit.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kdev_t.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/kdev_t.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/dcache.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rculist_bl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/list_bl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/bit_spinlock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/lockref.h \\ $(wildcard include/config/arch/use/cmpxchg/lockref.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/stringhash.h \\ $(wildcard include/config/dcache/word/access.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/hash.h \\ $(wildcard include/config/have/arch/hash.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/path.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/list_lru.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/shrinker.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/xarray.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/mm_types.h \\ $(wildcard include/config/have/aligned/struct/page.h) \\ $(wildcard include/config/userfaultfd.h) \\ $(wildcard include/config/have/arch/compat/mmap/bases.h) \\ $(wildcard include/config/membarrier.h) \\ $(wildcard include/config/aio.h) \\ $(wildcard include/config/mmu/notifier.h) \\ $(wildcard include/config/hmm.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/auxvec.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/auxvec.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/auxvec.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/uprobes.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/mmu.h \\ $(wildcard include/config/unmap/kernel/at/el0.h) \\ $(wildcard include/config/harden/branch/predictor.h) \\ $(wildcard include/config/harden/el2/vectors.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/capability.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/capability.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/semaphore.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/fcntl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/fcntl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/fcntl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/fcntl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/fiemap.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/migrate_mode.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/percpu-rwsem.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rcuwait.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rcu_sync.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/delayed_call.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/errseq.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/ioprio.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sched/rt.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/iocontext.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/fs.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/limits.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/ioctl.h \\ arch/arm64/include/generated/uapi/asm/ioctl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/ioctl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/ioctl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/quota.h \\ $(wildcard include/config/quota/netlink/interface.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/percpu_counter.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/dqblk_xfs.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/dqblk_v1.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/dqblk_v2.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/dqblk_qtree.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/projid.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/quota.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/nfs_fs_i.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/pm_runtime.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/usb/hcd.h \\ $(wildcard include/config/usb/pci.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/usb/ch11.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/io-64-nonatomic-lo-hi.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/io.h \\ $(wildcard include/config/have/arch/huge/vmap.h) \\ $(wildcard include/config/has/ioport/map.h) \\ $(wildcard include/config/pci.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/io.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/pgtable.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/proc-fns.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/pgtable-prot.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/fixmap.h \\ $(wildcard include/config/acpi/apei/ghes.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/boot.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/fixmap.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/pgtable.h \\ $(wildcard include/config/have/arch/transparent/hugepage/pud.h) \\ $(wildcard include/config/have/arch/soft/dirty.h) \\ $(wildcard include/config/arch/enable/thp/migration.h) \\ $(wildcard include/config/x86/espfix64.h) \\ arch/arm64/include/generated/asm/early_ioremap.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/early_ioremap.h \\ $(wildcard include/config/generic/early/ioremap.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/xen/xen.h \\ $(wildcard include/config/xen/pvh.h) \\ $(wildcard include/config/xen/dom0.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/io.h \\ $(wildcard include/config/generic/iomap.h) \\ $(wildcard include/config/virt/to/bus.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/pci_iomap.h \\ $(wildcard include/config/no/generic/pci/ioport/map.h) \\ $(wildcard include/config/generic/pci/iomap.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/logic_pio.h \\ $(wildcard include/config/indirect/pio.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/fwnode.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/vmalloc.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/drivers/usb/host/xhci-ext-caps.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/drivers/usb/host/pci-quirks.h \\ drivers/usb/host/xhci-ext-caps.o: $(deps_drivers/usb/host/xhci-ext-caps.o) $(deps_drivers/usb/host/xhci-ext-caps.o): ",16253,True,5282.625097126694,median "cmd_/home/gzq/openvswitch-2.8.0/datapath/linux/socket.o := gcc -Wp,-MD,/home/gzq/openvswitch-2.8.0/datapath/linux/.socket.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-linux-gnu/5/include -I/home/gzq/openvswitch-2.8.0/include -I/home/gzq/openvswitch-2.8.0/datapath/linux/compat -I/home/gzq/openvswitch-2.8.0/datapath/linux/compat/include -I./arch/x86/include -Iarch/x86/include/generated/uapi -Iarch/x86/include/generated -Iinclude -I./arch/x86/include/uapi -Iarch/x86/include/generated/uapi -I./include/uapi -Iinclude/generated/uapi -include ./include/linux/kconfig.h -Iubuntu/include -D__KERNEL__ -fno-pie -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -fno-pie -no-pie -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -fno-delete-null-pointer-checks -Wno-maybe-uninitialized -O2 --param=allow-store-data-races=0 -DCC_HAVE_ASM_GOTO -Wframe-larger-than=1024 -fstack-protector-strong -Wno-unused-but-set-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -pg -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -DVERSION=\\""2.8.0\\"" -I/home/gzq/openvswitch-2.8.0/datapath/linux/.. -I/home/gzq/openvswitch-2.8.0/datapath/linux/.. -g -include /home/gzq/openvswitch-2.8.0/datapath/linux/kcompat.h -DMODULE -D""KBUILD_STR(s)=\\#s"" -D""KBUILD_BASENAME=KBUILD_STR(socket)"" -D""KBUILD_MODNAME=KBUILD_STR(openvswitch)"" -c -o /home/gzq/openvswitch-2.8.0/datapath/linux/.tmp_socket.o /home/gzq/openvswitch-2.8.0/datapath/linux/socket.c source_/home/gzq/openvswitch-2.8.0/datapath/linux/socket.o := /home/gzq/openvswitch-2.8.0/datapath/linux/socket.c deps_/home/gzq/openvswitch-2.8.0/datapath/linux/socket.o := \\ /home/gzq/openvswitch-2.8.0/datapath/linux/kcompat.h \\ include/generated/uapi/linux/version.h \\ include/linux/module.h \\ $(wildcard include/config/modules.h) \\ $(wildcard include/config/sysfs.h) \\ $(wildcard include/config/module/sig.h) \\ $(wildcard include/config/modules/tree/lookup.h) \\ $(wildcard include/config/unused/symbols.h) \\ $(wildcard include/config/generic/bug.h) \\ $(wildcard include/config/kallsyms.h) \\ $(wildcard include/config/smp.h) \\ $(wildcard include/config/tracepoints.h) \\ $(wildcard include/config/tracing.h) \\ $(wildcard include/config/event/tracing.h) \\ $(wildcard include/config/ftrace/mcount/record.h) \\ $(wildcard include/config/livepatch.h) \\ $(wildcard include/config/module/unload.h) \\ $(wildcard include/config/constructors.h) \\ $(wildcard include/config/debug/set/module/ronx.h) \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/linux/list.h \\ include/linux/list.h \\ $(wildcard include/config/debug/list.h) \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/linux/types.h \\ include/linux/types.h \\ $(wildcard include/config/have/uid16.h) \\ $(wildcard include/config/uid16.h) \\ $(wildcard include/config/lbdaf.h) \\ $(wildcard include/config/arch/dma/addr/t/64bit.h) \\ $(wildcard include/config/phys/addr/t/64bit.h) \\ $(wildcard include/config/64bit.h) \\ include/uapi/linux/types.h \\ arch/x86/include/uapi/asm/types.h \\ include/uapi/asm-generic/types.h \\ include/asm-generic/int-ll64.h \\ include/uapi/asm-generic/int-ll64.h \\ arch/x86/include/uapi/asm/bitsperlong.h \\ include/asm-generic/bitsperlong.h \\ include/uapi/asm-generic/bitsperlong.h \\ include/uapi/linux/posix_types.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/linux/stddef.h \\ include/linux/stddef.h \\ include/uapi/linux/stddef.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/linux/compiler.h \\ include/linux/compiler.h \\ $(wildcard include/config/sparse/rcu/pointer.h) \\ $(wildcard include/config/trace/branch/profiling.h) \\ $(wildcard include/config/profile/all/branches.h) \\ $(wildcard include/config/kasan.h) \\ $(wildcard include/config/enable/must/check.h) \\ $(wildcard include/config/enable/warn/deprecated.h) \\ $(wildcard include/config/kprobes.h) \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/linux/compiler-gcc.h \\ include/linux/compiler-gcc.h \\ $(wildcard include/config/arch/supports/optimized/inlining.h) \\ $(wildcard include/config/optimize/inlining.h) \\ $(wildcard include/config/gcov/kernel.h) \\ $(wildcard include/config/arch/use/builtin/bswap.h) \\ arch/x86/include/asm/posix_types.h \\ $(wildcard include/config/x86/32.h) \\ arch/x86/include/uapi/asm/posix_types_64.h \\ include/uapi/asm-generic/posix_types.h \\ include/linux/poison.h \\ $(wildcard include/config/illegal/pointer/value.h) \\ include/uapi/linux/const.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/linux/kernel.h \\ include/linux/kernel.h \\ $(wildcard include/config/preempt/voluntary.h) \\ $(wildcard include/config/debug/atomic/sleep.h) \\ $(wildcard include/config/mmu.h) \\ $(wildcard include/config/prove/locking.h) \\ $(wildcard include/config/panic/timeout.h) \\ /usr/lib/gcc/x86_64-linux-gnu/5/include/stdarg.h \\ include/linux/linkage.h \\ include/linux/stringify.h \\ include/linux/export.h \\ $(wildcard include/config/have/underscore/symbol/prefix.h) \\ $(wildcard include/config/modversions.h) \\ arch/x86/include/asm/linkage.h \\ $(wildcard include/config/x86/64.h) \\ $(wildcard include/config/x86/alignment/16.h) \\ include/linux/bitops.h \\ arch/x86/include/asm/bitops.h \\ $(wildcard include/config/x86/cmov.h) \\ arch/x86/include/asm/alternative.h \\ $(wildcard include/config/paravirt.h) \\ arch/x86/include/asm/asm.h \\ arch/x86/include/asm/ptrace.h \\ $(wildcard include/config/x86/debugctlmsr.h) \\ arch/x86/include/asm/segment.h \\ $(wildcard include/config/cc/stackprotector.h) \\ $(wildcard include/config/x86/32/lazy/gs.h) \\ arch/x86/include/asm/cache.h \\ $(wildcard include/config/x86/l1/cache/shift.h) \\ $(wildcard include/config/x86/internode/cache/shift.h) \\ $(wildcard include/config/x86/vsmp.h) \\ arch/x86/include/asm/page_types.h \\ $(wildcard include/config/physical/start.h) \\ $(wildcard include/config/physical/align.h) \\ arch/x86/include/asm/page_64_types.h \\ $(wildcard include/config/randomize/base.h) \\ $(wildcard include/config/randomize/base/max/offset.h) \\ arch/x86/include/uapi/asm/ptrace.h \\ arch/x86/include/uapi/asm/ptrace-abi.h \\ arch/x86/include/asm/processor-flags.h \\ $(wildcard include/config/vm86.h) \\ arch/x86/include/uapi/asm/processor-flags.h \\ arch/x86/include/asm/paravirt_types.h \\ $(wildcard include/config/x86/local/apic.h) \\ $(wildcard include/config/pgtable/levels.h) \\ $(wildcard include/config/x86/pae.h) \\ $(wildcard include/config/queued/spinlocks.h) \\ $(wildcard include/config/paravirt/debug.h) \\ arch/x86/include/asm/desc_defs.h \\ arch/x86/include/asm/kmap_types.h \\ $(wildcard include/config/debug/highmem.h) \\ include/asm-generic/kmap_types.h \\ arch/x86/include/asm/pgtable_types.h \\ $(wildcard include/config/kmemcheck.h) \\ $(wildcard include/config/mem/soft/dirty.h) \\ $(wildcard include/config/proc/fs.h) \\ arch/x86/include/asm/pgtable_64_types.h \\ arch/x86/include/asm/sparsemem.h \\ $(wildcard include/config/sparsemem.h) \\ arch/x86/include/asm/spinlock_types.h \\ $(wildcard include/config/paravirt/spinlocks.h) \\ $(wildcard include/config/nr/cpus.h) \\ include/asm-generic/qspinlock_types.h \\ include/asm-generic/qrwlock_types.h \\ include/asm-generic/ptrace.h \\ arch/x86/include/asm/rmwcc.h \\ arch/x86/include/asm/barrier.h \\ $(wildcard include/config/x86/ppro/fence.h) \\ arch/x86/include/asm/nops.h \\ $(wildcard include/config/mk7.h) \\ $(wildcard include/config/x86/p6/nop.h) \\ include/asm-generic/barrier.h \\ include/asm-generic/bitops/find.h \\ $(wildcard include/config/generic/find/first/bit.h) \\ include/asm-generic/bitops/sched.h \\ arch/x86/include/asm/arch_hweight.h \\ arch/x86/include/asm/cpufeatures.h \\ arch/x86/include/asm/required-features.h \\ $(wildcard include/config/x86/minimum/cpu/family.h) \\ $(wildcard include/config/math/emulation.h) \\ $(wildcard include/config/x86/cmpxchg64.h) \\ $(wildcard include/config/x86/use/3dnow.h) \\ $(wildcard include/config/matom.h) \\ arch/x86/include/asm/disabled-features.h \\ $(wildcard include/config/x86/intel/mpx.h) \\ include/asm-generic/bitops/const_hweight.h \\ include/asm-generic/bitops/le.h \\ arch/x86/include/uapi/asm/byteorder.h \\ include/linux/byteorder/little_endian.h \\ include/uapi/linux/byteorder/little_endian.h \\ include/linux/swab.h \\ include/uapi/linux/swab.h \\ arch/x86/include/uapi/asm/swab.h \\ include/linux/byteorder/generic.h \\ include/asm-generic/bitops/ext2-atomic-setbit.h \\ include/linux/log2.h \\ $(wildcard include/config/arch/has/ilog2/u32.h) \\ $(wildcard include/config/arch/has/ilog2/u64.h) \\ include/linux/typecheck.h \\ include/linux/printk.h \\ $(wildcard include/config/message/loglevel/default.h) \\ $(wildcard include/config/early/printk.h) \\ $(wildcard include/config/printk.h) \\ $(wildcard include/config/dynamic/debug.h) \\ include/linux/init.h \\ $(wildcard include/config/broken/rodata.h) \\ $(wildcard include/config/lto.h) \\ include/linux/kern_levels.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/linux/cache.h \\ include/linux/cache.h \\ $(wildcard include/config/arch/has/cache/line/size.h) \\ include/uapi/linux/kernel.h \\ include/uapi/linux/sysinfo.h \\ include/linux/dynamic_debug.h \\ include/linux/stat.h \\ arch/x86/include/uapi/asm/stat.h \\ include/uapi/linux/stat.h \\ include/linux/time.h \\ $(wildcard include/config/arch/uses/gettimeoffset.h) \\ include/linux/seqlock.h \\ $(wildcard include/config/debug/lock/alloc.h) \\ include/linux/spinlock.h \\ $(wildcard include/config/debug/spinlock.h) \\ $(wildcard include/config/generic/lockbreak.h) \\ $(wildcard include/config/preempt.h) \\ include/linux/preempt.h \\ $(wildcard include/config/preempt/count.h) \\ $(wildcard include/config/debug/preempt.h) \\ $(wildcard include/config/preempt/tracer.h) \\ $(wildcard include/config/preempt/notifiers.h) \\ arch/x86/include/asm/preempt.h \\ arch/x86/include/asm/percpu.h \\ $(wildcard include/config/x86/64/smp.h) \\ include/asm-generic/percpu.h \\ $(wildcard include/config/have/setup/per/cpu/area.h) \\ include/linux/threads.h \\ $(wildcard include/config/base/small.h) \\ include/linux/percpu-defs.h \\ $(wildcard include/config/debug/force/weak/per/cpu.h) \\ include/linux/thread_info.h \\ $(wildcard include/config/compat.h) \\ $(wildcard include/config/debug/stack/usage.h) \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/linux/bug.h \\ include/linux/bug.h \\ arch/x86/include/asm/bug.h \\ $(wildcard include/config/debug/bugverbose.h) \\ include/asm-generic/bug.h \\ $(wildcard include/config/bug.h) \\ $(wildcard include/config/generic/bug/relative/pointers.h) \\ arch/x86/include/asm/thread_info.h \\ $(wildcard include/config/ia32/emulation.h) \\ arch/x86/include/asm/page.h \\ arch/x86/include/asm/page_64.h \\ $(wildcard include/config/debug/virtual.h) \\ $(wildcard include/config/flatmem.h) \\ $(wildcard include/config/x86/vsyscall/emulation.h) \\ include/linux/range.h \\ include/asm-generic/memory_model.h \\ $(wildcard include/config/discontigmem.h) \\ $(wildcard include/config/sparsemem/vmemmap.h) \\ include/asm-generic/getorder.h \\ arch/x86/include/asm/cpufeature.h \\ $(wildcard include/config/x86/feature/names.h) \\ $(wildcard include/config/x86/debug/static/cpu/has.h) \\ arch/x86/include/asm/processor.h \\ $(wildcard include/config/m486.h) \\ $(wildcard include/config/xen.h) \\ arch/x86/include/asm/math_emu.h \\ arch/x86/include/uapi/asm/sigcontext.h \\ arch/x86/include/asm/current.h \\ arch/x86/include/asm/msr.h \\ arch/x86/include/asm/msr-index.h \\ $(wildcard include/config/tdp/nominal.h) \\ $(wildcard include/config/tdp/level/1.h) \\ $(wildcard include/config/tdp/level/2.h) \\ $(wildcard include/config/tdp/control.h) \\ $(wildcard include/config/tdp/level1.h) \\ $(wildcard include/config/tdp/level2.h) \\ arch/x86/include/uapi/asm/errno.h \\ include/uapi/asm-generic/errno.h \\ include/uapi/asm-generic/errno-base.h \\ arch/x86/include/asm/cpumask.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/linux/cpumask.h \\ include/linux/cpumask.h \\ $(wildcard include/config/cpumask/offstack.h) \\ $(wildcard include/config/hotplug/cpu.h) \\ $(wildcard include/config/debug/per/cpu/maps.h) \\ include/linux/bitmap.h \\ include/linux/string.h \\ $(wildcard include/config/binary/printf.h) \\ include/uapi/linux/string.h \\ arch/x86/include/asm/string.h \\ arch/x86/include/asm/string_64.h \\ arch/x86/include/uapi/asm/msr.h \\ include/uapi/linux/ioctl.h \\ arch/x86/include/uapi/asm/ioctl.h \\ include/asm-generic/ioctl.h \\ include/uapi/asm-generic/ioctl.h \\ arch/x86/include/asm/paravirt.h \\ arch/x86/include/asm/special_insns.h \\ arch/x86/include/asm/fpu/types.h \\ include/linux/personality.h \\ include/uapi/linux/personality.h \\ include/linux/math64.h \\ $(wildcard include/config/arch/supports/int128.h) \\ arch/x86/include/asm/div64.h \\ include/asm-generic/div64.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/linux/err.h \\ include/linux/err.h \\ include/linux/irqflags.h \\ $(wildcard include/config/trace/irqflags.h) \\ $(wildcard include/config/irqsoff/tracer.h) \\ $(wildcard include/config/trace/irqflags/support.h) \\ arch/x86/include/asm/irqflags.h \\ include/linux/atomic.h \\ $(wildcard include/config/generic/atomic64.h) \\ arch/x86/include/asm/atomic.h \\ arch/x86/include/asm/cmpxchg.h \\ arch/x86/include/asm/cmpxchg_64.h \\ arch/x86/include/asm/atomic64_64.h \\ include/asm-generic/atomic-long.h \\ include/linux/bottom_half.h \\ include/linux/spinlock_types.h \\ include/linux/lockdep.h \\ $(wildcard include/config/lockdep.h) \\ $(wildcard include/config/lock/stat.h) \\ include/linux/rwlock_types.h \\ arch/x86/include/asm/spinlock.h \\ include/linux/jump_label.h \\ $(wildcard include/config/jump/label.h) \\ arch/x86/include/asm/jump_label.h \\ arch/x86/include/asm/qspinlock.h \\ include/asm-generic/qspinlock.h \\ arch/x86/include/asm/qrwlock.h \\ include/asm-generic/qrwlock.h \\ include/linux/rwlock.h \\ include/linux/spinlock_api_smp.h \\ $(wildcard include/config/inline/spin/lock.h) \\ $(wildcard include/config/inline/spin/lock/bh.h) \\ $(wildcard include/config/inline/spin/lock/irq.h) \\ $(wildcard include/config/inline/spin/lock/irqsave.h) \\ $(wildcard include/config/inline/spin/trylock.h) \\ $(wildcard include/config/inline/spin/trylock/bh.h) \\ $(wildcard include/config/uninline/spin/unlock.h) \\ $(wildcard include/config/inline/spin/unlock/bh.h) \\ $(wildcard include/config/inline/spin/unlock/irq.h) \\ $(wildcard include/config/inline/spin/unlock/irqrestore.h) \\ include/linux/rwlock_api_smp.h \\ $(wildcard include/config/inline/read/lock.h) \\ $(wildcard include/config/inline/write/lock.h) \\ $(wildcard include/config/inline/read/lock/bh.h) \\ $(wildcard include/config/inline/write/lock/bh.h) \\ $(wildcard include/config/inline/read/lock/irq.h) \\ $(wildcard include/config/inline/write/lock/irq.h) \\ $(wildcard include/config/inline/read/lock/irqsave.h) \\ $(wildcard include/config/inline/write/lock/irqsave.h) \\ $(wildcard include/config/inline/read/trylock.h) \\ $(wildcard include/config/inline/write/trylock.h) \\ $(wildcard include/config/inline/read/unlock.h) \\ $(wildcard include/config/inline/write/unlock.h) \\ $(wildcard include/config/inline/read/unlock/bh.h) \\ $(wildcard include/config/inline/write/unlock/bh.h) \\ $(wildcard include/config/inline/read/unlock/irq.h) \\ $(wildcard include/config/inline/write/unlock/irq.h) \\ $(wildcard include/config/inline/read/unlock/irqrestore.h) \\ $(wildcard include/config/inline/write/unlock/irqrestore.h) \\ include/linux/time64.h \\ include/uapi/linux/time.h \\ include/linux/uidgid.h \\ $(wildcard include/config/multiuser.h) \\ $(wildcard include/config/user/ns.h) \\ include/linux/highuid.h \\ include/linux/kmod.h \\ include/linux/gfp.h \\ $(wildcard include/config/highmem.h) \\ $(wildcard include/config/zone/dma.h) \\ $(wildcard include/config/zone/dma32.h) \\ $(wildcard include/config/zone/device.h) \\ $(wildcard include/config/numa.h) \\ $(wildcard include/config/deferred/struct/page/init.h) \\ $(wildcard include/config/pm/sleep.h) \\ $(wildcard include/config/cma.h) \\ include/linux/mmdebug.h \\ $(wildcard include/config/debug/vm.h) \\ include/linux/mmzone.h \\ $(wildcard include/config/force/max/zoneorder.h) \\ $(wildcard include/config/memory/isolation.h) \\ $(wildcard include/config/memcg.h) \\ $(wildcard include/config/memory/hotplug.h) \\ $(wildcard include/config/compaction.h) \\ $(wildcard include/config/flat/node/mem/map.h) \\ $(wildcard include/config/page/extension.h) \\ $(wildcard include/config/no/bootmem.h) \\ $(wildcard include/config/numa/balancing.h) \\ $(wildcard include/config/have/memory/present.h) \\ $(wildcard include/config/have/memoryless/nodes.h) \\ $(wildcard include/config/need/node/memmap/size.h) \\ $(wildcard include/config/have/memblock/node/map.h) \\ $(wildcard include/config/need/multiple/nodes.h) \\ $(wildcard include/config/have/arch/early/pfn/to/nid.h) \\ $(wildcard include/config/sparsemem/extreme.h) \\ $(wildcard include/config/have/arch/pfn/valid.h) \\ $(wildcard include/config/holes/in/zone.h) \\ $(wildcard include/config/arch/has/holes/memorymodel.h) \\ include/linux/wait.h \\ include/uapi/linux/wait.h \\ include/linux/numa.h \\ $(wildcard include/config/nodes/shift.h) \\ include/linux/nodemask.h \\ $(wildcard include/config/movable/node.h) \\ include/linux/pageblock-flags.h \\ $(wildcard include/config/hugetlb/page.h) \\ $(wildcard include/config/hugetlb/page/size/variable.h) \\ include/linux/page-flags-layout.h \\ include/generated/bounds.h \\ include/linux/memory_hotplug.h \\ $(wildcard include/config/memory/hotremove.h) \\ $(wildcard include/config/have/arch/nodedata/extension.h) \\ $(wildcard include/config/have/bootmem/info/node.h) \\ include/linux/notifier.h \\ include/linux/errno.h \\ include/uapi/linux/errno.h \\ include/linux/mutex.h \\ $(wildcard include/config/debug/mutexes.h) \\ $(wildcard include/config/mutex/spin/on/owner.h) \\ include/linux/osq_lock.h \\ include/linux/rwsem.h \\ $(wildcard include/config/rwsem/spin/on/owner.h) \\ $(wildcard include/config/rwsem/generic/spinlock.h) \\ arch/x86/include/asm/rwsem.h \\ include/linux/srcu.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/linux/rcupdate.h \\ include/linux/rcupdate.h \\ $(wildcard include/config/tiny/rcu.h) \\ $(wildcard include/config/tree/rcu.h) \\ $(wildcard include/config/preempt/rcu.h) \\ $(wildcard include/config/rcu/trace.h) \\ $(wildcard include/config/rcu/stall/common.h) \\ $(wildcard include/config/no/hz/full.h) \\ $(wildcard include/config/rcu/nocb/cpu.h) \\ $(wildcard include/config/tasks/rcu.h) \\ $(wildcard include/config/debug/objects/rcu/head.h) \\ $(wildcard include/config/prove/rcu.h) \\ $(wildcard include/config/rcu/boost.h) \\ $(wildcard include/config/rcu/nocb/cpu/all.h) \\ $(wildcard include/config/no/hz/full/sysidle.h) \\ include/linux/completion.h \\ include/linux/debugobjects.h \\ $(wildcard include/config/debug/objects.h) \\ $(wildcard include/config/debug/objects/free.h) \\ include/linux/ktime.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/linux/jiffies.h \\ include/linux/jiffies.h \\ include/linux/timex.h \\ include/uapi/linux/timex.h \\ include/uapi/linux/param.h \\ arch/x86/include/uapi/asm/param.h \\ include/asm-generic/param.h \\ $(wildcard include/config/hz.h) \\ include/uapi/asm-generic/param.h \\ arch/x86/include/asm/timex.h \\ arch/x86/include/asm/tsc.h \\ $(wildcard include/config/x86/tsc.h) \\ include/generated/timeconst.h \\ include/linux/timekeeping.h \\ include/linux/rcutree.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/linux/workqueue.h \\ include/linux/workqueue.h \\ $(wildcard include/config/debug/objects/work.h) \\ $(wildcard include/config/freezer.h) \\ include/linux/timer.h \\ $(wildcard include/config/timer/stats.h) \\ $(wildcard include/config/debug/objects/timers.h) \\ $(wildcard include/config/no/hz/common.h) \\ include/linux/sysctl.h \\ $(wildcard include/config/sysctl.h) \\ include/linux/rbtree.h \\ include/uapi/linux/sysctl.h \\ arch/x86/include/asm/mmzone.h \\ arch/x86/include/asm/mmzone_64.h \\ arch/x86/include/asm/smp.h \\ $(wildcard include/config/x86/io/apic.h) \\ $(wildcard include/config/x86/32/smp.h) \\ $(wildcard include/config/debug/nmi/selftest.h) \\ arch/x86/include/asm/mpspec.h \\ $(wildcard include/config/eisa.h) \\ $(wildcard include/config/x86/mpparse.h) \\ arch/x86/include/asm/mpspec_def.h \\ arch/x86/include/asm/x86_init.h \\ arch/x86/include/uapi/asm/bootparam.h \\ include/linux/screen_info.h \\ include/uapi/linux/screen_info.h \\ include/linux/apm_bios.h \\ include/uapi/linux/apm_bios.h \\ include/linux/edd.h \\ include/uapi/linux/edd.h \\ arch/x86/include/asm/e820.h \\ $(wildcard include/config/efi.h) \\ $(wildcard include/config/hibernation.h) \\ arch/x86/include/uapi/asm/e820.h \\ $(wildcard include/config/x86/pmem/legacy.h) \\ $(wildcard include/config/intel/txt.h) \\ include/linux/ioport.h \\ arch/x86/include/asm/ist.h \\ arch/x86/include/uapi/asm/ist.h \\ include/video/edid.h \\ $(wildcard include/config/x86.h) \\ include/uapi/video/edid.h \\ arch/x86/include/asm/apicdef.h \\ arch/x86/include/asm/apic.h \\ $(wildcard include/config/x86/x2apic.h) \\ include/linux/pm.h \\ $(wildcard include/config/vt/console/sleep.h) \\ $(wildcard include/config/pm.h) \\ $(wildcard include/config/pm/clk.h) \\ $(wildcard include/config/pm/generic/domains.h) \\ arch/x86/include/asm/fixmap.h \\ $(wildcard include/config/paravirt/clock.h) \\ $(wildcard include/config/provide/ohci1394/dma/init.h) \\ $(wildcard include/config/pci/mmconfig.h) \\ $(wildcard include/config/x86/intel/mid.h) \\ arch/x86/include/asm/acpi.h \\ $(wildcard include/config/acpi/apei.h) \\ $(wildcard include/config/acpi.h) \\ $(wildcard include/config/acpi/numa.h) \\ include/acpi/pdc_intel.h \\ arch/x86/include/asm/numa.h \\ $(wildcard include/config/numa/emu.h) \\ arch/x86/include/asm/topology.h \\ include/asm-generic/topology.h \\ arch/x86/include/asm/mmu.h \\ $(wildcard include/config/modify/ldt/syscall.h) \\ arch/x86/include/asm/realmode.h \\ $(wildcard include/config/acpi/sleep.h) \\ arch/x86/include/asm/io.h \\ $(wildcard include/config/mtrr.h) \\ arch/x86/include/generated/asm/early_ioremap.h \\ include/asm-generic/early_ioremap.h \\ $(wildcard include/config/generic/early/ioremap.h) \\ include/asm-generic/iomap.h \\ $(wildcard include/config/has/ioport/map.h) \\ $(wildcard include/config/pci.h) \\ $(wildcard include/config/generic/iomap.h) \\ include/asm-generic/pci_iomap.h \\ $(wildcard include/config/no/generic/pci/ioport/map.h) \\ $(wildcard include/config/generic/pci/iomap.h) \\ include/xen/xen.h \\ $(wildcard include/config/xen/dom0.h) \\ $(wildcard include/config/xen/pvh.h) \\ include/xen/interface/xen.h \\ arch/x86/include/asm/xen/interface.h \\ arch/x86/include/asm/xen/interface_64.h \\ arch/x86/include/asm/pvclock-abi.h \\ arch/x86/include/asm/xen/hypervisor.h \\ include/xen/features.h \\ include/xen/interface/features.h \\ arch/x86/include/asm/pvclock.h \\ include/linux/clocksource.h \\ $(wildcard include/config/arch/clocksource/data.h) \\ $(wildcard include/config/clocksource/watchdog.h) \\ $(wildcard include/config/clksrc/probe.h) \\ arch/x86/include/asm/clocksource.h \\ arch/x86/include/uapi/asm/vsyscall.h \\ include/asm-generic/fixmap.h \\ arch/x86/include/asm/idle.h \\ arch/x86/include/asm/io_apic.h \\ arch/x86/include/asm/irq_vectors.h \\ $(wildcard include/config/have/kvm.h) \\ $(wildcard include/config/pci/msi.h) \\ include/linux/topology.h \\ $(wildcard include/config/use/percpu/numa/node/id.h) \\ $(wildcard include/config/sched/smt.h) \\ include/linux/smp.h \\ $(wildcard include/config/up/late/init.h) \\ include/linux/llist.h \\ $(wildcard include/config/arch/have/nmi/safe/cmpxchg.h) \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/linux/percpu.h \\ include/linux/percpu.h \\ $(wildcard include/config/need/per/cpu/embed/first/chunk.h) \\ $(wildcard include/config/need/per/cpu/page/first/chunk.h) \\ include/linux/pfn.h \\ include/linux/elf.h \\ arch/x86/include/asm/elf.h \\ $(wildcard include/config/x86/x32/abi.h) \\ arch/x86/include/asm/user.h \\ arch/x86/include/asm/user_64.h \\ arch/x86/include/uapi/asm/auxvec.h \\ arch/x86/include/asm/vdso.h \\ $(wildcard include/config/x86/x32.h) \\ include/linux/mm_types.h \\ $(wildcard include/config/split/ptlock/cpus.h) \\ $(wildcard include/config/arch/enable/split/pmd/ptlock.h) \\ $(wildcard include/config/have/cmpxchg/double.h) \\ $(wildcard include/config/have/aligned/struct/page.h) \\ $(wildcard include/config/transparent/hugepage.h) \\ $(wildcard include/config/userfaultfd.h) \\ $(wildcard include/config/aio.h) \\ $(wildcard include/config/mmu/notifier.h) \\ include/linux/auxvec.h \\ include/uapi/linux/auxvec.h \\ include/linux/uprobes.h \\ $(wildcard include/config/uprobes.h) \\ arch/x86/include/asm/uprobes.h \\ include/uapi/linux/elf.h \\ include/uapi/linux/elf-em.h \\ include/linux/kobject.h \\ $(wildcard include/config/uevent/helper.h) \\ $(wildcard include/config/debug/kobject/release.h) \\ include/linux/sysfs.h \\ include/linux/kernfs.h \\ $(wildcard include/config/kernfs.h) \\ include/linux/idr.h \\ include/linux/kobject_ns.h \\ include/linux/kref.h \\ include/linux/moduleparam.h \\ $(wildcard include/config/alpha.h) \\ $(wildcard include/config/ia64.h) \\ $(wildcard include/config/ppc64.h) \\ include/linux/rbtree_latch.h \\ arch/x86/include/asm/module.h \\ $(wildcard include/config/m586.h) \\ $(wildcard include/config/m586tsc.h) \\ $(wildcard include/config/m586mmx.h) \\ $(wildcard include/config/mcore2.h) \\ $(wildcard include/config/m686.h) \\ $(wildcard include/config/mpentiumii.h) \\ $(wildcard include/config/mpentiumiii.h) \\ $(wildcard include/config/mpentiumm.h) \\ $(wildcard include/config/mpentium4.h) \\ $(wildcard include/config/mk6.h) \\ $(wildcard include/config/mk8.h) \\ $(wildcard include/config/melan.h) \\ $(wildcard include/config/mcrusoe.h) \\ $(wildcard include/config/mefficeon.h) \\ $(wildcard include/config/mwinchipc6.h) \\ $(wildcard include/config/mwinchip3d.h) \\ $(wildcard include/config/mcyrixiii.h) \\ $(wildcard include/config/mviac3/2.h) \\ $(wildcard include/config/mviac7.h) \\ $(wildcard include/config/mgeodegx1.h) \\ $(wildcard include/config/mgeode/lx.h) \\ include/asm-generic/module.h \\ $(wildcard include/config/have/mod/arch/specific.h) \\ $(wildcard include/config/modules/use/elf/rel.h) \\ $(wildcard include/config/modules/use/elf/rela.h) \\ include/linux/socket.h \\ arch/x86/include/uapi/asm/socket.h \\ include/uapi/asm-generic/socket.h \\ arch/x86/include/uapi/asm/sockios.h \\ include/uapi/asm-generic/sockios.h \\ include/uapi/linux/sockios.h \\ include/linux/uio.h \\ include/uapi/linux/uio.h \\ include/uapi/linux/socket.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/linux/udp.h \\ include/linux/udp.h \\ include/net/inet_sock.h \\ $(wildcard include/config/ipv6.h) \\ $(wildcard include/config/inet.h) \\ include/linux/kmemcheck.h \\ include/linux/jhash.h \\ include/linux/unaligned/packed_struct.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/linux/netdevice.h \\ include/linux/netdevice.h \\ $(wildcard include/config/dcb.h) \\ $(wildcard include/config/hyperv/net.h) \\ $(wildcard include/config/wlan.h) \\ $(wildcard include/config/ax25.h) \\ $(wildcard include/config/mac80211/mesh.h) \\ $(wildcard include/config/net/ipip.h) \\ $(wildcard include/config/net/ipgre.h) \\ $(wildcard include/config/ipv6/sit.h) \\ $(wildcard include/config/ipv6/tunnel.h) \\ $(wildcard include/config/rps.h) \\ $(wildcard include/config/netpoll.h) \\ $(wildcard include/config/xps.h) \\ $(wildcard include/config/bql.h) \\ $(wildcard include/config/rfs/accel.h) \\ $(wildcard include/config/fcoe.h) \\ $(wildcard include/config/net/poll/controller.h) \\ $(wildcard include/config/net/rx/busy/poll.h) \\ $(wildcard include/config/libfcoe.h) \\ $(wildcard include/config/wireless/ext.h) \\ $(wildcard include/config/net/switchdev.h) \\ $(wildcard include/config/net/l3/master/dev.h) \\ $(wildcard include/config/vlan/8021q.h) \\ $(wildcard include/config/net/dsa.h) \\ $(wildcard include/config/tipc.h) \\ $(wildcard include/config/mpls/routing.h) \\ $(wildcard include/config/net/cls/act.h) \\ $(wildcard include/config/netfilter/ingress.h) \\ $(wildcard include/config/cgroup/net/prio.h) \\ $(wildcard include/config/net/flow/limit.h) \\ include/linux/delay.h \\ arch/x86/include/asm/delay.h \\ include/asm-generic/delay.h \\ include/linux/prefetch.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/linux/rculist.h \\ include/linux/rculist.h \\ include/linux/dmaengine.h \\ $(wildcard include/config/async/tx/enable/channel/switch.h) \\ $(wildcard include/config/dma/engine.h) \\ $(wildcard include/config/rapidio/dma/engine.h) \\ $(wildcard include/config/async/tx/dma.h) \\ include/linux/device.h \\ $(wildcard include/config/debug/devres.h) \\ $(wildcard include/config/generic/msi/irq/domain.h) \\ $(wildcard include/config/pinctrl.h) \\ $(wildcard include/config/generic/msi/irq.h) \\ $(wildcard include/config/dma/cma.h) \\ $(wildcard include/config/of.h) \\ $(wildcard include/config/devtmpfs.h) \\ $(wildcard include/config/sysfs/deprecated.h) \\ include/linux/klist.h \\ include/linux/pinctrl/devinfo.h \\ include/linux/pinctrl/consumer.h \\ include/linux/seq_file.h \\ include/linux/fs.h \\ $(wildcard include/config/fs/posix/acl.h) \\ $(wildcard include/config/security.h) \\ $(wildcard include/config/cgroup/writeback.h) \\ $(wildcard include/config/ima.h) \\ $(wildcard include/config/fsnotify.h) \\ $(wildcard include/config/epoll.h) \\ $(wildcard include/config/file/locking.h) \\ $(wildcard include/config/quota.h) \\ $(wildcard include/config/blk/dev/loop.h) \\ $(wildcard include/config/fs/dax.h) \\ $(wildcard include/config/block.h) \\ $(wildcard include/config/migration.h) \\ include/linux/kdev_t.h \\ include/uapi/linux/kdev_t.h \\ include/linux/dcache.h \\ include/linux/rculist_bl.h \\ include/linux/list_bl.h \\ include/linux/bit_spinlock.h \\ include/linux/lockref.h \\ $(wildcard include/config/arch/use/cmpxchg/lockref.h) \\ include/linux/path.h \\ include/linux/list_lru.h \\ $(wildcard include/config/memcg/kmem.h) \\ include/linux/shrinker.h \\ include/linux/radix-tree.h \\ include/linux/pid.h \\ include/linux/capability.h \\ include/uapi/linux/capability.h \\ include/linux/semaphore.h \\ include/uapi/linux/fiemap.h \\ include/linux/migrate_mode.h \\ include/linux/percpu-rwsem.h \\ include/linux/rcu_sync.h \\ include/linux/blk_types.h \\ $(wildcard include/config/blk/cgroup.h) \\ $(wildcard include/config/blk/dev/integrity.h) \\ include/uapi/linux/fs.h \\ include/uapi/linux/limits.h \\ include/linux/quota.h \\ $(wildcard include/config/quota/netlink/interface.h) \\ include/linux/percpu_counter.h \\ include/uapi/linux/dqblk_xfs.h \\ include/linux/dqblk_v1.h \\ include/linux/dqblk_v2.h \\ include/linux/dqblk_qtree.h \\ include/linux/projid.h \\ include/uapi/linux/quota.h \\ include/linux/nfs_fs_i.h \\ include/linux/fcntl.h \\ include/uapi/linux/fcntl.h \\ arch/x86/include/uapi/asm/fcntl.h \\ include/uapi/asm-generic/fcntl.h \\ include/linux/cred.h \\ $(wildcard include/config/debug/credentials.h) \\ $(wildcard include/config/keys.h) \\ include/linux/key.h \\ include/linux/assoc_array.h \\ $(wildcard include/config/associative/array.h) \\ include/linux/selinux.h \\ $(wildcard include/config/security/selinux.h) \\ include/linux/pinctrl/pinctrl-state.h \\ include/linux/ratelimit.h \\ arch/x86/include/asm/device.h \\ $(wildcard include/config/x86/dev/dma/ops.h) \\ $(wildcard include/config/intel/iommu.h) \\ $(wildcard include/config/amd/iommu.h) \\ include/linux/pm_wakeup.h \\ include/linux/scatterlist.h \\ $(wildcard include/config/debug/sg.h) \\ $(wildcard include/config/need/sg/dma/length.h) \\ include/linux/mm.h \\ $(wildcard include/config/ppc.h) \\ $(wildcard include/config/parisc.h) \\ $(wildcard include/config/metag.h) \\ $(wildcard include/config/stack/growsup.h) \\ $(wildcard include/config/shmem.h) \\ $(wildcard include/config/debug/vm/rb.h) \\ $(wildcard include/config/debug/pagealloc.h) \\ $(wildcard include/config/hugetlbfs.h) \\ include/linux/debug_locks.h \\ $(wildcard include/config/debug/locking/api/selftests.h) \\ include/linux/resource.h \\ include/uapi/linux/resource.h \\ arch/x86/include/uapi/asm/resource.h \\ include/asm-generic/resource.h \\ include/uapi/asm-generic/resource.h \\ include/linux/page_ext.h \\ $(wildcard include/config/idle/page/tracking.h) \\ $(wildcard include/config/page/owner.h) \\ include/linux/stacktrace.h \\ $(wildcard include/config/stacktrace.h) \\ $(wildcard include/config/user/stacktrace/support.h) \\ arch/x86/include/asm/pgtable.h \\ $(wildcard include/config/debug/wx.h) \\ $(wildcard include/config/have/arch/soft/dirty.h) \\ arch/x86/include/asm/pgtable_64.h \\ include/asm-generic/pgtable.h \\ $(wildcard include/config/have/arch/huge/vmap.h) \\ include/linux/page-flags.h \\ $(wildcard include/config/arch/uses/pg/uncached.h) \\ $(wildcard include/config/memory/failure.h) \\ $(wildcard include/config/swap.h) \\ $(wildcard include/config/ksm.h) \\ include/linux/huge_mm.h \\ include/linux/vmstat.h \\ $(wildcard include/config/vm/event/counters.h) \\ $(wildcard include/config/debug/tlbflush.h) \\ $(wildcard include/config/debug/vm/vmacache.h) \\ include/linux/vm_event_item.h \\ $(wildcard include/config/memory/balloon.h) \\ $(wildcard include/config/balloon/compaction.h) \\ include/linux/dynamic_queue_limits.h \\ include/linux/ethtool.h \\ include/linux/compat.h \\ $(wildcard include/config/compat/old/sigaction.h) \\ $(wildcard include/config/odd/rt/sigaction.h) \\ include/linux/sem.h \\ $(wildcard include/config/sysvipc.h) \\ include/uapi/linux/sem.h \\ include/linux/ipc.h \\ include/uapi/linux/ipc.h \\ arch/x86/include/uapi/asm/ipcbuf.h \\ include/uapi/asm-generic/ipcbuf.h \\ arch/x86/include/uapi/asm/sembuf.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/linux/if.h \\ include/uapi/linux/if.h \\ include/uapi/linux/libc-compat.h \\ include/uapi/linux/hdlc/ioctl.h \\ include/uapi/linux/aio_abi.h \\ include/uapi/linux/unistd.h \\ arch/x86/include/asm/unistd.h \\ arch/x86/include/uapi/asm/unistd.h \\ arch/x86/include/generated/uapi/asm/unistd_64.h \\ arch/x86/include/generated/asm/unistd_64_x32.h \\ arch/x86/include/asm/compat.h \\ include/linux/sched.h \\ $(wildcard include/config/sched/debug.h) \\ $(wildcard include/config/lockup/detector.h) \\ $(wildcard include/config/detect/hung/task.h) \\ $(wildcard include/config/core/dump/default/elf/headers.h) \\ $(wildcard include/config/virt/cpu/accounting/native.h) \\ $(wildcard include/config/sched/autogroup.h) \\ $(wildcard include/config/bsd/process/acct.h) \\ $(wildcard include/config/taskstats.h) \\ $(wildcard include/config/audit.h) \\ $(wildcard include/config/inotify/user.h) \\ $(wildcard include/config/fanotify.h) \\ $(wildcard include/config/posix/mqueue.h) \\ $(wildcard include/config/perf/events.h) \\ $(wildcard include/config/bpf/syscall.h) \\ $(wildcard include/config/sched/info.h) \\ $(wildcard include/config/task/delay/acct.h) \\ $(wildcard include/config/schedstats.h) \\ $(wildcard include/config/sched/mc.h) \\ $(wildcard include/config/fair/group/sched.h) \\ $(wildcard include/config/rt/group/sched.h) \\ $(wildcard include/config/cgroup/sched.h) \\ $(wildcard include/config/blk/dev/io/trace.h) \\ $(wildcard include/config/compat/brk.h) \\ $(wildcard include/config/cgroups.h) \\ $(wildcard include/config/virt/cpu/accounting/gen.h) \\ $(wildcard include/config/auditsyscall.h) \\ $(wildcard include/config/rt/mutexes.h) \\ $(wildcard include/config/task/xacct.h) \\ $(wildcard include/config/cpusets.h) \\ $(wildcard include/config/futex.h) \\ $(wildcard include/config/arch/want/batched/unmap/tlb/flush.h) \\ $(wildcard include/config/fault/injection.h) \\ $(wildcard include/config/latencytop.h) \\ $(wildcard include/config/function/graph/tracer.h) \\ $(wildcard include/config/bcache.h) \\ $(wildcard include/config/arch/wants/dynamic/task/struct.h) \\ $(wildcard include/config/have/unstable/sched/clock.h) \\ $(wildcard include/config/irq/time/accounting.h) \\ $(wildcard include/config/have/copy/thread/tls.h) \\ include/uapi/linux/sched.h \\ include/linux/sched/prio.h \\ include/linux/plist.h \\ $(wildcard include/config/debug/pi/list.h) \\ include/linux/cputime.h \\ arch/x86/include/generated/asm/cputime.h \\ include/asm-generic/cputime.h \\ $(wildcard include/config/virt/cpu/accounting.h) \\ include/asm-generic/cputime_jiffies.h \\ include/linux/shm.h \\ include/uapi/linux/shm.h \\ arch/x86/include/uapi/asm/shmbuf.h \\ include/uapi/asm-generic/shmbuf.h \\ arch/x86/include/asm/shmparam.h \\ include/linux/signal.h \\ $(wildcard include/config/old/sigaction.h) \\ include/uapi/linux/signal.h \\ arch/x86/include/asm/signal.h \\ arch/x86/include/uapi/asm/signal.h \\ include/uapi/asm-generic/signal-defs.h \\ arch/x86/include/uapi/asm/siginfo.h \\ include/asm-generic/siginfo.h \\ include/uapi/asm-generic/siginfo.h \\ include/linux/proportions.h \\ include/linux/seccomp.h \\ $(wildcard include/config/seccomp.h) \\ $(wildcard include/config/have/arch/seccomp/filter.h) \\ $(wildcard include/config/seccomp/filter.h) \\ $(wildcard include/config/checkpoint/restore.h) \\ include/uapi/linux/seccomp.h \\ arch/x86/include/asm/seccomp.h \\ arch/x86/include/asm/ia32_unistd.h \\ arch/x86/include/generated/asm/unistd_32_ia32.h \\ include/asm-generic/seccomp.h \\ include/linux/rtmutex.h \\ $(wildcard include/config/debug/rt/mutexes.h) \\ include/linux/hrtimer.h \\ $(wildcard include/config/high/res/timers.h) \\ $(wildcard include/config/time/low/res.h) \\ $(wildcard include/config/timerfd.h) \\ include/linux/timerqueue.h \\ include/linux/task_io_accounting.h \\ $(wildcard include/config/task/io/accounting.h) \\ include/linux/latencytop.h \\ include/uapi/linux/magic.h \\ include/linux/cgroup-defs.h \\ include/linux/percpu-refcount.h \\ include/linux/cgroup_subsys.h \\ $(wildcard include/config/cgroup/cpuacct.h) \\ $(wildcard include/config/cgroup/device.h) \\ $(wildcard include/config/cgroup/freezer.h) \\ $(wildcard include/config/cgroup/net/classid.h) \\ $(wildcard include/config/cgroup/perf.h) \\ $(wildcard include/config/cgroup/hugetlb.h) \\ $(wildcard include/config/cgroup/pids.h) \\ $(wildcard include/config/cgroup/debug.h) \\ arch/x86/include/asm/user32.h \\ include/uapi/linux/ethtool.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/linux/if_ether.h \\ include/linux/if_ether.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/linux/skbuff.h \\ $(wildcard include/config/nf/conntrack.h) \\ include/linux/skbuff.h \\ $(wildcard include/config/bridge/netfilter.h) \\ $(wildcard include/config/xfrm.h) \\ $(wildcard include/config/ipv6/ndisc/nodetype.h) \\ $(wildcard include/config/net/sched.h) \\ $(wildcard include/config/network/secmark.h) \\ $(wildcard include/config/network/phy/timestamping.h) \\ $(wildcard include/config/netfilter/xt/target/trace.h) \\ $(wildcard include/config/nf/tables.h) \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/linux/net.h \\ include/linux/net.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/linux/random.h \\ include/linux/random.h \\ $(wildcard include/config/arch/random.h) \\ include/linux/once.h \\ include/uapi/linux/random.h \\ include/linux/irqnr.h \\ include/uapi/linux/irqnr.h \\ arch/x86/include/asm/archrandom.h \\ include/uapi/linux/net.h \\ include/linux/textsearch.h \\ include/linux/slab.h \\ $(wildcard include/config/debug/slab.h) \\ $(wildcard include/config/failslab.h) \\ $(wildcard include/config/slab.h) \\ $(wildcard include/config/slub.h) \\ $(wildcard include/config/slob.h) \\ include/linux/kmemleak.h \\ $(wildcard include/config/debug/kmemleak.h) \\ include/linux/kasan.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/net/checksum.h \\ include/net/checksum.h \\ arch/x86/include/asm/uaccess.h \\ $(wildcard include/config/x86/intel/usercopy.h) \\ $(wildcard include/config/debug/strict/user/copy/checks.h) \\ arch/x86/include/asm/smap.h \\ $(wildcard include/config/x86/smap.h) \\ arch/x86/include/asm/uaccess_64.h \\ arch/x86/include/asm/checksum.h \\ arch/x86/include/asm/checksum_64.h \\ include/linux/dma-mapping.h \\ $(wildcard include/config/has/dma.h) \\ $(wildcard include/config/arch/has/dma/set/coherent/mask.h) \\ $(wildcard include/config/have/dma/attrs.h) \\ $(wildcard include/config/need/dma/map/state.h) \\ include/linux/sizes.h \\ include/linux/dma-attrs.h \\ include/linux/dma-direction.h \\ arch/x86/include/asm/dma-mapping.h \\ $(wildcard include/config/isa.h) \\ $(wildcard include/config/x86/dma/remap.h) \\ include/linux/dma-debug.h \\ $(wildcard include/config/dma/api/debug.h) \\ arch/x86/include/asm/swiotlb.h \\ $(wildcard include/config/swiotlb.h) \\ include/linux/swiotlb.h \\ include/linux/dma-contiguous.h \\ include/asm-generic/dma-mapping-common.h \\ include/asm-generic/dma-coherent.h \\ $(wildcard include/config/have/generic/dma/coherent.h) \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/linux/netdev_features.h \\ include/linux/netdev_features.h \\ include/net/flow_dissector.h \\ include/linux/in6.h \\ include/uapi/linux/in6.h \\ include/uapi/linux/if_ether.h \\ include/linux/splice.h \\ include/linux/pipe_fs_i.h \\ include/net/flow.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/net/net_namespace.h \\ $(wildcard include/config/net/ns.h) \\ include/net/net_namespace.h \\ $(wildcard include/config/ieee802154/6lowpan.h) \\ $(wildcard include/config/ip/sctp.h) \\ $(wildcard include/config/ip/dccp.h) \\ $(wildcard include/config/netfilter.h) \\ $(wildcard include/config/nf/defrag/ipv6.h) \\ $(wildcard include/config/netfilter/netlink/acct.h) \\ $(wildcard include/config/wext/core.h) \\ $(wildcard include/config/ip/vs.h) \\ $(wildcard include/config/mpls.h) \\ include/net/netns/core.h \\ include/net/netns/mib.h \\ $(wildcard include/config/xfrm/statistics.h) \\ include/net/snmp.h \\ include/uapi/linux/snmp.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/linux/u64_stats_sync.h \\ include/linux/u64_stats_sync.h \\ include/net/netns/unix.h \\ include/net/netns/packet.h \\ include/net/netns/ipv4.h \\ $(wildcard include/config/ip/multiple/tables.h) \\ $(wildcard include/config/ip/route/classid.h) \\ $(wildcard include/config/ip/mroute.h) \\ $(wildcard include/config/ip/mroute/multiple/tables.h) \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/net/inet_frag.h \\ include/net/inet_frag.h \\ include/net/netns/ipv6.h \\ $(wildcard include/config/ipv6/multiple/tables.h) \\ $(wildcard include/config/ipv6/mroute.h) \\ $(wildcard include/config/ipv6/mroute/multiple/tables.h) \\ include/net/dst_ops.h \\ include/net/netns/ieee802154_6lowpan.h \\ include/net/netns/sctp.h \\ include/net/netns/dccp.h \\ include/net/netns/netfilter.h \\ include/linux/netfilter_defs.h \\ include/uapi/linux/netfilter.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/linux/in.h \\ include/linux/in.h \\ include/uapi/linux/in.h \\ include/net/netns/x_tables.h \\ $(wildcard include/config/bridge/nf/ebtables.h) \\ include/net/netns/conntrack.h \\ $(wildcard include/config/nf/conntrack/proc/compat.h) \\ $(wildcard include/config/nf/conntrack/events.h) \\ $(wildcard include/config/nf/conntrack/labels.h) \\ $(wildcard include/config/nf/nat/needed.h) \\ include/linux/list_nulls.h \\ include/linux/netfilter/nf_conntrack_tcp.h \\ include/uapi/linux/netfilter/nf_conntrack_tcp.h \\ include/net/netns/nftables.h \\ include/net/netns/xfrm.h \\ include/uapi/linux/xfrm.h \\ include/net/flowcache.h \\ include/linux/interrupt.h \\ $(wildcard include/config/irq/forced/threading.h) \\ $(wildcard include/config/generic/irq/probe.h) \\ include/linux/irqreturn.h \\ include/linux/hardirq.h \\ include/linux/ftrace_irq.h \\ $(wildcard include/config/ftrace/nmi/enter.h) \\ include/linux/vtime.h \\ include/linux/context_tracking_state.h \\ $(wildcard include/config/context/tracking.h) \\ include/linux/static_key.h \\ arch/x86/include/asm/hardirq.h \\ $(wildcard include/config/x86/thermal/vector.h) \\ $(wildcard include/config/x86/mce/threshold.h) \\ $(wildcard include/config/x86/mce/amd.h) \\ $(wildcard include/config/hyperv.h) \\ include/linux/irq.h \\ $(wildcard include/config/irq/domain/hierarchy.h) \\ $(wildcard include/config/generic/pending/irq.h) \\ $(wildcard include/config/hardirqs/sw/resend.h) \\ $(wildcard include/config/generic/irq/legacy/alloc/hwirq.h) \\ $(wildcard include/config/generic/irq/legacy.h) \\ include/linux/irqhandler.h \\ include/linux/io.h \\ arch/x86/include/asm/irq.h \\ arch/x86/include/asm/irq_regs.h \\ include/linux/irqdesc.h \\ $(wildcard include/config/irq/preflow/fasteoi.h) \\ $(wildcard include/config/sparse/irq.h) \\ $(wildcard include/config/handle/domain/irq.h) \\ arch/x86/include/asm/hw_irq.h \\ $(wildcard include/config/hpet/timer.h) \\ $(wildcard include/config/dmar/table.h) \\ $(wildcard include/config/ht/irq.h) \\ $(wildcard include/config/x86/uv.h) \\ include/linux/profile.h \\ $(wildcard include/config/profiling.h) \\ arch/x86/include/asm/sections.h \\ $(wildcard include/config/debug/rodata.h) \\ include/asm-generic/sections.h \\ include/net/netns/mpls.h \\ include/linux/ns_common.h \\ include/linux/seq_file_net.h \\ include/net/dsa.h \\ $(wildcard include/config/net/dsa/hwmon.h) \\ include/linux/of.h \\ $(wildcard include/config/sparc.h) \\ $(wildcard include/config/of/dynamic.h) \\ $(wildcard include/config/attach/node.h) \\ $(wildcard include/config/detach/node.h) \\ $(wildcard include/config/add/property.h) \\ $(wildcard include/config/remove/property.h) \\ $(wildcard include/config/update/property.h) \\ $(wildcard include/config/of/numa.h) \\ $(wildcard include/config/no/change.h) \\ $(wildcard include/config/change/add.h) \\ $(wildcard include/config/change/remove.h) \\ $(wildcard include/config/of/resolve.h) \\ $(wildcard include/config/of/overlay.h) \\ include/linux/mod_devicetable.h \\ include/linux/uuid.h \\ include/uapi/linux/uuid.h \\ include/linux/property.h \\ include/linux/fwnode.h \\ include/linux/phy.h \\ include/linux/mii.h \\ include/uapi/linux/mii.h \\ include/linux/phy_fixed.h \\ $(wildcard include/config/fixed/phy.h) \\ include/net/dcbnl.h \\ include/uapi/linux/dcbnl.h \\ include/net/netprio_cgroup.h \\ include/linux/cgroup.h \\ include/uapi/linux/cgroupstats.h \\ include/uapi/linux/taskstats.h \\ include/linux/nsproxy.h \\ include/linux/user_namespace.h \\ $(wildcard include/config/persistent/keyrings.h) \\ include/uapi/linux/neighbour.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/linux/netlink.h \\ include/linux/netlink.h \\ include/net/scm.h \\ $(wildcard include/config/security/network.h) \\ include/linux/security.h \\ $(wildcard include/config/security/network/xfrm.h) \\ $(wildcard include/config/security/path.h) \\ $(wildcard include/config/securityfs.h) \\ include/uapi/linux/netlink.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/net/netlink.h \\ $(wildcard include/config/have/efficient/unaligned/access.h) \\ include/net/netlink.h \\ include/linux/in6.h \\ include/uapi/linux/netdevice.h \\ include/uapi/linux/if_packet.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/linux/if_link.h \\ include/linux/if_link.h \\ include/uapi/linux/if_link.h \\ $(wildcard include/config/pending.h) \\ include/uapi/linux/if_bonding.h \\ include/uapi/linux/pkt_cls.h \\ $(wildcard include/config/net/cls/ind.h) \\ include/uapi/linux/pkt_sched.h \\ include/linux/if_bridge.h \\ $(wildcard include/config/bridge.h) \\ $(wildcard include/config/bridge/igmp/snooping.h) \\ include/uapi/linux/if_bridge.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/net/sock.h \\ include/net/sock.h \\ $(wildcard include/config/net.h) \\ include/linux/uaccess.h \\ include/linux/page_counter.h \\ include/linux/memcontrol.h \\ $(wildcard include/config/memcg/swap.h) \\ include/linux/vmpressure.h \\ include/linux/eventfd.h \\ $(wildcard include/config/eventfd.h) \\ include/linux/writeback.h \\ include/linux/flex_proportions.h \\ include/linux/backing-dev-defs.h \\ $(wildcard include/config/debug/fs.h) \\ include/linux/bio.h \\ include/linux/highmem.h \\ arch/x86/include/asm/cacheflush.h \\ $(wildcard include/config/debug/rodata/test.h) \\ include/asm-generic/cacheflush.h \\ include/linux/mempool.h \\ include/linux/ioprio.h \\ include/linux/iocontext.h \\ include/linux/filter.h \\ $(wildcard include/config/bpf/jit.h) \\ include/net/sch_generic.h \\ /home/gzq/openvswitch-2.8.0/include/linux/pkt_cls.h \\ include/uapi/linux/pkt_cls.h \\ include/net/gen_stats.h \\ include/uapi/linux/gen_stats.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/linux/rtnetlink.h \\ include/linux/rtnetlink.h \\ $(wildcard include/config/net/ingress.h) \\ include/uapi/linux/rtnetlink.h \\ include/uapi/linux/if_addr.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/net/rtnetlink.h \\ include/net/rtnetlink.h \\ include/uapi/linux/filter.h \\ include/uapi/linux/bpf_common.h \\ include/uapi/linux/bpf.h \\ include/linux/rculist_nulls.h \\ include/linux/poll.h \\ include/uapi/linux/poll.h \\ arch/x86/include/uapi/asm/poll.h \\ include/uapi/asm-generic/poll.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/net/dst.h \\ include/net/dst.h \\ include/net/neighbour.h \\ include/net/tcp_states.h \\ include/uapi/linux/net_tstamp.h \\ include/net/request_sock.h \\ include/net/netns/hash.h \\ include/uapi/linux/udp.h \\ include/linux/ipv6.h \\ $(wildcard include/config/ipv6/router/pref.h) \\ $(wildcard include/config/ipv6/route/info.h) \\ $(wildcard include/config/ipv6/optimistic/dad.h) \\ $(wildcard include/config/ipv6/mip6.h) \\ $(wildcard include/config/ipv6/subtrees.h) \\ include/uapi/linux/ipv6.h \\ include/linux/icmpv6.h \\ include/uapi/linux/icmpv6.h \\ include/linux/tcp.h \\ $(wildcard include/config/tcp/md5sig.h) \\ include/net/inet_connection_sock.h \\ include/net/inet_timewait_sock.h \\ include/net/timewait_sock.h \\ include/uapi/linux/tcp.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/net/ip_tunnels.h \\ include/linux/if_tunnel.h \\ include/linux/ip.h \\ include/uapi/linux/ip.h \\ include/uapi/linux/if_tunnel.h \\ include/net/dsfield.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/net/dst_cache.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/net/ip6_fib.h \\ include/net/ip6_fib.h \\ include/linux/ipv6_route.h \\ include/uapi/linux/ipv6_route.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/net/inetpeer.h \\ include/net/inetpeer.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/net/ipv6.h \\ include/net/ipv6.h \\ include/net/if_inet6.h \\ include/net/ndisc.h \\ include/linux/if_arp.h \\ $(wildcard include/config/firewire/net.h) \\ include/uapi/linux/if_arp.h \\ include/linux/hash.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/net/inet_ecn.h \\ include/net/inet_ecn.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/net/ip.h \\ include/net/ip.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/net/route.h \\ include/net/route.h \\ include/net/ip_fib.h \\ $(wildcard include/config/ip/route/multipath.h) \\ include/net/fib_rules.h \\ include/uapi/linux/fib_rules.h \\ include/net/l3mdev.h \\ include/uapi/linux/in_route.h \\ include/uapi/linux/route.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/net/udp.h \\ include/net/udp.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/net/udp_tunnel.h \\ include/net/addrconf.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/compat/include/net/dst_metadata.h \\ /home/gzq/openvswitch-2.8.0/datapath/linux/socket.o: $(deps_/home/gzq/openvswitch-2.8.0/datapath/linux/socket.o) $(deps_/home/gzq/openvswitch-2.8.0/datapath/linux/socket.o): ",16317,True,4417.298653922847,median "cmd_drivers/base/cpu.o := aarch64-xilinx-linux-gcc -fuse-ld=bfd -fdebug-prefix-map=/home/zw/share/ultra96/mipitest/build/tmp/work/ultra96_zynqmp-xilinx-linux/linux-xlnx/4.19-xilinx-v2019.1+git999-r0=/usr/src/debug/linux-xlnx/4.19-xilinx-v2019.1+git999-r0 -fdebug-prefix-map=/home/zw/share/ultra96/mipitest/build/tmp/work/ultra96_zynqmp-xilinx-linux/linux-xlnx/4.19-xilinx-v2019.1+git999-r0/recipe-sysroot= -fdebug-prefix-map=/home/zw/share/ultra96/mipitest/build/tmp/work/ultra96_zynqmp-xilinx-linux/linux-xlnx/4.19-xilinx-v2019.1+git999-r0/recipe-sysroot-native= -fdebug-prefix-map=/home/zw/share/ultra96/mipitest/build/tmp/work-shared/ultra96-zynqmp/kernel-source=/usr/src/kernel --sysroot=/home/zw/share/ultra96/mipitest/build/tmp/work/ultra96_zynqmp-xilinx-linux/linux-xlnx/4.19-xilinx-v2019.1+git999-r0/recipe-sysroot -Wp,-MD,drivers/base/.cpu.o.d -nostdinc -isystem /home/zw/share/ultra96/mipitest/build/tmp/work/ultra96_zynqmp-xilinx-linux/linux-xlnx/4.19-xilinx-v2019.1+git999-r0/recipe-sysroot-native/usr/bin/aarch64-xilinx-linux/../../lib/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/8.2.0/include -I/home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include -I./arch/arm64/include/generated -I/home/zw/share/ultra96/mipitest/linux-xlnx/include -I./include -I/home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi -I./arch/arm64/include/generated/uapi -I/home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi -I./include/generated/uapi -include /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kconfig.h -include /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/compiler_types.h -I/home/zw/share/ultra96/mipitest/linux-xlnx/drivers/base -Idrivers/base -D__KERNEL__ -mlittle-endian -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -DCC_HAVE_ASM_GOTO -mgeneral-regs-only -DCONFIG_AS_LSE=1 -fno-asynchronous-unwind-tables -mabi=lp64 -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-int-in-bool-context -O2 --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-omit-frame-pointer -fno-optimize-sibling-calls -fno-var-tracking-assignments -g -Wdeclaration-after-statement -Wno-pointer-sign -Wno-stringop-truncation -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -fmacro-prefix-map=/home/zw/share/ultra96/mipitest/linux-xlnx/= -Wno-packed-not-aligned -DKBUILD_BASENAME='""cpu""' -DKBUILD_MODNAME='""cpu""' -c -o drivers/base/cpu.o /home/zw/share/ultra96/mipitest/linux-xlnx/drivers/base/cpu.c source_drivers/base/cpu.o := /home/zw/share/ultra96/mipitest/linux-xlnx/drivers/base/cpu.c deps_drivers/base/cpu.o := \\ $(wildcard include/config/hotplug/cpu.h) \\ $(wildcard include/config/arch/cpu/probe/release.h) \\ $(wildcard include/config/kexec.h) \\ $(wildcard include/config/no/hz/full.h) \\ $(wildcard include/config/generic/cpu/autoprobe.h) \\ $(wildcard include/config/generic/cpu/devices.h) \\ $(wildcard include/config/generic/cpu/vulnerabilities.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kconfig.h \\ $(wildcard include/config/cpu/big/endian.h) \\ $(wildcard include/config/booger.h) \\ $(wildcard include/config/foo.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/compiler_types.h \\ $(wildcard include/config/have/arch/compiler/h.h) \\ $(wildcard include/config/enable/must/check.h) \\ $(wildcard include/config/arch/supports/optimized/inlining.h) \\ $(wildcard include/config/optimize/inlining.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/compiler-gcc.h \\ $(wildcard include/config/arch/use/builtin/bswap.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kernel.h \\ $(wildcard include/config/lbdaf.h) \\ $(wildcard include/config/preempt/voluntary.h) \\ $(wildcard include/config/debug/atomic/sleep.h) \\ $(wildcard include/config/mmu.h) \\ $(wildcard include/config/prove/locking.h) \\ $(wildcard include/config/arch/has/refcount.h) \\ $(wildcard include/config/panic/timeout.h) \\ $(wildcard include/config/tracing.h) \\ $(wildcard include/config/ftrace/mcount/record.h) \\ /home/zw/share/ultra96/mipitest/build/tmp/work/ultra96_zynqmp-xilinx-linux/linux-xlnx/4.19-xilinx-v2019.1+git999-r0/recipe-sysroot-native/usr/lib/aarch64-xilinx-linux/gcc/aarch64-xilinx-linux/8.2.0/include/stdarg.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/linkage.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/compiler_types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/stringify.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/export.h \\ $(wildcard include/config/modules.h) \\ $(wildcard include/config/modversions.h) \\ $(wildcard include/config/module/rel/crcs.h) \\ $(wildcard include/config/have/arch/prel32/relocations.h) \\ $(wildcard include/config/trim/unused/ksyms.h) \\ $(wildcard include/config/unused/symbols.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/compiler.h \\ $(wildcard include/config/trace/branch/profiling.h) \\ $(wildcard include/config/profile/all/branches.h) \\ $(wildcard include/config/stack/validation.h) \\ $(wildcard include/config/kasan.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/types.h \\ arch/arm64/include/generated/uapi/asm/types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/int-ll64.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/int-ll64.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/bitsperlong.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitsperlong.h \\ $(wildcard include/config/64bit.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/bitsperlong.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/posix_types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/stddef.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/stddef.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/posix_types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/posix_types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/barrier.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/barrier.h \\ $(wildcard include/config/smp.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kasan-checks.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/linkage.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/types.h \\ $(wildcard include/config/have/uid16.h) \\ $(wildcard include/config/uid16.h) \\ $(wildcard include/config/arch/dma/addr/t/64bit.h) \\ $(wildcard include/config/phys/addr/t/64bit.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/bitops.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/bits.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/bitops.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/builtin-__ffs.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/builtin-ffs.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/builtin-__fls.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/builtin-fls.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/ffz.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/fls64.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/find.h \\ $(wildcard include/config/generic/find/first/bit.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/sched.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/hweight.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/arch_hweight.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/const_hweight.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/atomic.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/atomic.h \\ $(wildcard include/config/generic/atomic64.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/atomic.h \\ $(wildcard include/config/arm64/lse/atomics.h) \\ $(wildcard include/config/as/lse.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/lse.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/alternative.h \\ $(wildcard include/config/arm64/uao.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/cpucaps.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/insn.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/init.h \\ $(wildcard include/config/strict/kernel/rwx.h) \\ $(wildcard include/config/strict/module/rwx.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/atomic_lse.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/cmpxchg.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/build_bug.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/atomic-long.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/lock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/non-atomic.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/le.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/byteorder.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/byteorder/little_endian.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/byteorder/little_endian.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/swab.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/swab.h \\ arch/arm64/include/generated/uapi/asm/swab.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/swab.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/byteorder/generic.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bitops/ext2-atomic-setbit.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/log2.h \\ $(wildcard include/config/arch/has/ilog2/u32.h) \\ $(wildcard include/config/arch/has/ilog2/u64.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/typecheck.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/printk.h \\ $(wildcard include/config/message/loglevel/default.h) \\ $(wildcard include/config/console/loglevel/default.h) \\ $(wildcard include/config/console/loglevel/quiet.h) \\ $(wildcard include/config/early/printk.h) \\ $(wildcard include/config/printk/nmi.h) \\ $(wildcard include/config/printk.h) \\ $(wildcard include/config/dynamic/debug.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kern_levels.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/cache.h \\ $(wildcard include/config/arch/has/cache/line/size.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/kernel.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/sysinfo.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/cache.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/cputype.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/sysreg.h \\ $(wildcard include/config/broken/gas/inst.h) \\ $(wildcard include/config/arm64/pa/bits/52.h) \\ $(wildcard include/config/arm64/4k/pages.h) \\ $(wildcard include/config/arm64/16k/pages.h) \\ $(wildcard include/config/arm64/64k/pages.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/compiler.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/module.h \\ $(wildcard include/config/sysfs.h) \\ $(wildcard include/config/modules/tree/lookup.h) \\ $(wildcard include/config/livepatch.h) \\ $(wildcard include/config/module/sig.h) \\ $(wildcard include/config/generic/bug.h) \\ $(wildcard include/config/kallsyms.h) \\ $(wildcard include/config/tracepoints.h) \\ $(wildcard include/config/event/tracing.h) \\ $(wildcard include/config/module/unload.h) \\ $(wildcard include/config/constructors.h) \\ $(wildcard include/config/function/error/injection.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/list.h \\ $(wildcard include/config/debug/list.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/poison.h \\ $(wildcard include/config/illegal/pointer/value.h) \\ $(wildcard include/config/page/poisoning/zero.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/const.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/const.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/stat.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/stat.h \\ $(wildcard include/config/compat.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/stat.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/stat.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/compat_time.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/time64.h \\ $(wildcard include/config/64bit/time.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/math64.h \\ $(wildcard include/config/arch/supports/int128.h) \\ arch/arm64/include/generated/asm/div64.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/div64.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/time.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/compat.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sched.h \\ $(wildcard include/config/virt/cpu/accounting/native.h) \\ $(wildcard include/config/sched/info.h) \\ $(wildcard include/config/schedstats.h) \\ $(wildcard include/config/fair/group/sched.h) \\ $(wildcard include/config/rt/group/sched.h) \\ $(wildcard include/config/thread/info/in/task.h) \\ $(wildcard include/config/cgroup/sched.h) \\ $(wildcard include/config/preempt/notifiers.h) \\ $(wildcard include/config/blk/dev/io/trace.h) \\ $(wildcard include/config/preempt/rcu.h) \\ $(wildcard include/config/tasks/rcu.h) \\ $(wildcard include/config/memcg.h) \\ $(wildcard include/config/memcg/kmem.h) \\ $(wildcard include/config/compat/brk.h) \\ $(wildcard include/config/cgroups.h) \\ $(wildcard include/config/blk/cgroup.h) \\ $(wildcard include/config/stackprotector.h) \\ $(wildcard include/config/arch/has/scaled/cputime.h) \\ $(wildcard include/config/virt/cpu/accounting/gen.h) \\ $(wildcard include/config/posix/timers.h) \\ $(wildcard include/config/sysvipc.h) \\ $(wildcard include/config/detect/hung/task.h) \\ $(wildcard include/config/auditsyscall.h) \\ $(wildcard include/config/rt/mutexes.h) \\ $(wildcard include/config/debug/mutexes.h) \\ $(wildcard include/config/trace/irqflags.h) \\ $(wildcard include/config/lockdep.h) \\ $(wildcard include/config/ubsan.h) \\ $(wildcard include/config/block.h) \\ $(wildcard include/config/task/xacct.h) \\ $(wildcard include/config/cpusets.h) \\ $(wildcard include/config/intel/rdt.h) \\ $(wildcard include/config/futex.h) \\ $(wildcard include/config/perf/events.h) \\ $(wildcard include/config/debug/preempt.h) \\ $(wildcard include/config/numa.h) \\ $(wildcard include/config/numa/balancing.h) \\ $(wildcard include/config/rseq.h) \\ $(wildcard include/config/task/delay/acct.h) \\ $(wildcard include/config/fault/injection.h) \\ $(wildcard include/config/latencytop.h) \\ $(wildcard include/config/function/graph/tracer.h) \\ $(wildcard include/config/kcov.h) \\ $(wildcard include/config/uprobes.h) \\ $(wildcard include/config/bcache.h) \\ $(wildcard include/config/vmap/stack.h) \\ $(wildcard include/config/security.h) \\ $(wildcard include/config/arch/task/struct/on/stack.h) \\ $(wildcard include/config/preempt.h) \\ $(wildcard include/config/debug/rseq.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/sched.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/current.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/pid.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rculist.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rcupdate.h \\ $(wildcard include/config/preempt/count.h) \\ $(wildcard include/config/rcu/stall/common.h) \\ $(wildcard include/config/rcu/nocb/cpu.h) \\ $(wildcard include/config/tree/rcu.h) \\ $(wildcard include/config/tiny/rcu.h) \\ $(wildcard include/config/debug/objects/rcu/head.h) \\ $(wildcard include/config/prove/rcu.h) \\ $(wildcard include/config/debug/lock/alloc.h) \\ $(wildcard include/config/rcu/boost.h) \\ $(wildcard include/config/arch/weak/release/acquire.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/irqflags.h \\ $(wildcard include/config/irqsoff/tracer.h) \\ $(wildcard include/config/preempt/tracer.h) \\ $(wildcard include/config/trace/irqflags/support.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/irqflags.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/ptrace.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/ptrace.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/hwcap.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/hwcap.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/sigcontext.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/prctl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/bug.h \\ $(wildcard include/config/bug/on/data/corruption.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/bug.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/asm-bug.h \\ $(wildcard include/config/debug/bugverbose.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/brk-imm.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/bug.h \\ $(wildcard include/config/bug.h) \\ $(wildcard include/config/generic/bug/relative/pointers.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/ptrace.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/preempt.h \\ $(wildcard include/config/trace/preempt/toggle.h) \\ arch/arm64/include/generated/asm/preempt.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/preempt.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/thread_info.h \\ $(wildcard include/config/have/arch/within/stack/frames.h) \\ $(wildcard include/config/hardened/usercopy.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/restart_block.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/thread_info.h \\ $(wildcard include/config/arm64/sw/ttbr0/pan.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/memory.h \\ $(wildcard include/config/arm64/va/bits.h) \\ $(wildcard include/config/debug/align/rodata.h) \\ $(wildcard include/config/blk/dev/initrd.h) \\ $(wildcard include/config/debug/virtual.h) \\ $(wildcard include/config/sparsemem/vmemmap.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/page-def.h \\ $(wildcard include/config/arm64/page/shift.h) \\ $(wildcard include/config/arm64/cont/shift.h) \\ arch/arm64/include/generated/asm/sizes.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/sizes.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sizes.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/mmdebug.h \\ $(wildcard include/config/debug/vm.h) \\ $(wildcard include/config/debug/vm/pgflags.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/memory_model.h \\ $(wildcard include/config/flatmem.h) \\ $(wildcard include/config/discontigmem.h) \\ $(wildcard include/config/sparsemem.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/pfn.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/stack_pointer.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/bottom_half.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/lockdep.h \\ $(wildcard include/config/lock/stat.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/processor.h \\ $(wildcard include/config/have/hw/breakpoint.h) \\ $(wildcard include/config/gcc/plugin/stackleak.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/string.h \\ $(wildcard include/config/binary/printf.h) \\ $(wildcard include/config/fortify/source.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/string.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/string.h \\ $(wildcard include/config/arch/has/uaccess/flushcache.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/cpufeature.h \\ $(wildcard include/config/arm64/sve.h) \\ $(wildcard include/config/arm64/ssbd.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/jump_label.h \\ $(wildcard include/config/jump/label.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/hw_breakpoint.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/virt.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/sections.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/sections.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/pgtable-hwdef.h \\ $(wildcard include/config/pgtable/levels.h) \\ $(wildcard include/config/arm64/pa/bits.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/fpsimd.h \\ arch/arm64/include/generated/uapi/asm/errno.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/errno.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/errno-base.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/cpumask.h \\ $(wildcard include/config/cpumask/offstack.h) \\ $(wildcard include/config/debug/per/cpu/maps.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/threads.h \\ $(wildcard include/config/nr/cpus.h) \\ $(wildcard include/config/base/small.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/bitmap.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rcutree.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sem.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/sem.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/ipc.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/spinlock.h \\ $(wildcard include/config/debug/spinlock.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/spinlock_types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/spinlock_types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/qspinlock_types.h \\ $(wildcard include/config/paravirt.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/qrwlock_types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rwlock_types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/spinlock.h \\ arch/arm64/include/generated/asm/qrwlock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/qrwlock.h \\ arch/arm64/include/generated/asm/qspinlock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/qspinlock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rwlock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/spinlock_api_smp.h \\ $(wildcard include/config/inline/spin/lock.h) \\ $(wildcard include/config/inline/spin/lock/bh.h) \\ $(wildcard include/config/inline/spin/lock/irq.h) \\ $(wildcard include/config/inline/spin/lock/irqsave.h) \\ $(wildcard include/config/inline/spin/trylock.h) \\ $(wildcard include/config/inline/spin/trylock/bh.h) \\ $(wildcard include/config/uninline/spin/unlock.h) \\ $(wildcard include/config/inline/spin/unlock/bh.h) \\ $(wildcard include/config/inline/spin/unlock/irq.h) \\ $(wildcard include/config/inline/spin/unlock/irqrestore.h) \\ $(wildcard include/config/generic/lockbreak.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rwlock_api_smp.h \\ $(wildcard include/config/inline/read/lock.h) \\ $(wildcard include/config/inline/write/lock.h) \\ $(wildcard include/config/inline/read/lock/bh.h) \\ $(wildcard include/config/inline/write/lock/bh.h) \\ $(wildcard include/config/inline/read/lock/irq.h) \\ $(wildcard include/config/inline/write/lock/irq.h) \\ $(wildcard include/config/inline/read/lock/irqsave.h) \\ $(wildcard include/config/inline/write/lock/irqsave.h) \\ $(wildcard include/config/inline/read/trylock.h) \\ $(wildcard include/config/inline/write/trylock.h) \\ $(wildcard include/config/inline/read/unlock.h) \\ $(wildcard include/config/inline/write/unlock.h) \\ $(wildcard include/config/inline/read/unlock/bh.h) \\ $(wildcard include/config/inline/write/unlock/bh.h) \\ $(wildcard include/config/inline/read/unlock/irq.h) \\ $(wildcard include/config/inline/write/unlock/irq.h) \\ $(wildcard include/config/inline/read/unlock/irqrestore.h) \\ $(wildcard include/config/inline/write/unlock/irqrestore.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/uidgid.h \\ $(wildcard include/config/multiuser.h) \\ $(wildcard include/config/user/ns.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/highuid.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rhashtable-types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/mutex.h \\ $(wildcard include/config/mutex/spin/on/owner.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/osq_lock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/debug_locks.h \\ $(wildcard include/config/debug/locking/api/selftests.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/workqueue.h \\ $(wildcard include/config/debug/objects/work.h) \\ $(wildcard include/config/freezer.h) \\ $(wildcard include/config/wq/watchdog.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/timer.h \\ $(wildcard include/config/debug/objects/timers.h) \\ $(wildcard include/config/no/hz/common.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/ktime.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/time.h \\ $(wildcard include/config/arch/uses/gettimeoffset.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/seqlock.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/time32.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/jiffies.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/timex.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/timex.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/param.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/param.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/param.h \\ $(wildcard include/config/hz.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/param.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/timex.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/arch_timer.h \\ $(wildcard include/config/arm/arch/timer/ool/workaround.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/smp.h \\ $(wildcard include/config/up/late/init.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/errno.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/errno.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/llist.h \\ $(wildcard include/config/arch/have/nmi/safe/cmpxchg.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/smp.h \\ $(wildcard include/config/arm64/acpi/parking/protocol.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/percpu.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/percpu.h \\ $(wildcard include/config/have/setup/per/cpu/area.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/percpu-defs.h \\ $(wildcard include/config/debug/force/weak/per/cpu.h) \\ $(wildcard include/config/virtualization.h) \\ $(wildcard include/config/amd/mem/encrypt.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/clocksource/arm_arch_timer.h \\ $(wildcard include/config/arm/arch/timer.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/timecounter.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/timex.h \\ include/generated/timeconst.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/timekeeping.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/timekeeping32.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/debugobjects.h \\ $(wildcard include/config/debug/objects.h) \\ $(wildcard include/config/debug/objects/free.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/ipc.h \\ arch/arm64/include/generated/uapi/asm/ipcbuf.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/ipcbuf.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/refcount.h \\ $(wildcard include/config/refcount/full.h) \\ arch/arm64/include/generated/uapi/asm/sembuf.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/sembuf.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/shm.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/page.h \\ $(wildcard include/config/have/arch/pfn/valid.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/personality.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/personality.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/pgtable-types.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/pgtable-nopud.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/pgtable-nop4d-hack.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/5level-fixup.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/getorder.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/shm.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/hugetlb_encode.h \\ arch/arm64/include/generated/uapi/asm/shmbuf.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/shmbuf.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/shmparam.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/shmparam.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kcov.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/kcov.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/plist.h \\ $(wildcard include/config/debug/pi/list.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/hrtimer.h \\ $(wildcard include/config/high/res/timers.h) \\ $(wildcard include/config/time/low/res.h) \\ $(wildcard include/config/timerfd.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rbtree.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/percpu.h \\ $(wildcard include/config/need/per/cpu/embed/first/chunk.h) \\ $(wildcard include/config/need/per/cpu/page/first/chunk.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/timerqueue.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/seccomp.h \\ $(wildcard include/config/seccomp.h) \\ $(wildcard include/config/have/arch/seccomp/filter.h) \\ $(wildcard include/config/seccomp/filter.h) \\ $(wildcard include/config/checkpoint/restore.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/seccomp.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/nodemask.h \\ $(wildcard include/config/highmem.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/numa.h \\ $(wildcard include/config/nodes/shift.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/resource.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/resource.h \\ arch/arm64/include/generated/uapi/asm/resource.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/resource.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/resource.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/latencytop.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sched/prio.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/signal_types.h \\ $(wildcard include/config/old/sigaction.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/signal.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/signal.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/signal.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/signal.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/signal-defs.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/siginfo.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/asm-generic/siginfo.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/mm_types_task.h \\ $(wildcard include/config/arch/want/batched/unmap/tlb/flush.h) \\ $(wildcard include/config/split/ptlock/cpus.h) \\ $(wildcard include/config/arch/enable/split/pmd/ptlock.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/task_io_accounting.h \\ $(wildcard include/config/task/io/accounting.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/rseq.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sched/task_stack.h \\ $(wildcard include/config/stack/growsup.h) \\ $(wildcard include/config/debug/stack/usage.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/magic.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/stat.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kmod.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/umh.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/gfp.h \\ $(wildcard include/config/zone/dma.h) \\ $(wildcard include/config/zone/dma32.h) \\ $(wildcard include/config/zone/device.h) \\ $(wildcard include/config/pm/sleep.h) \\ $(wildcard include/config/memory/isolation.h) \\ $(wildcard include/config/compaction.h) \\ $(wildcard include/config/cma.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/mmzone.h \\ $(wildcard include/config/force/max/zoneorder.h) \\ $(wildcard include/config/zsmalloc.h) \\ $(wildcard include/config/memory/hotplug.h) \\ $(wildcard include/config/flat/node/mem/map.h) \\ $(wildcard include/config/page/extension.h) \\ $(wildcard include/config/no/bootmem.h) \\ $(wildcard include/config/deferred/struct/page/init.h) \\ $(wildcard include/config/transparent/hugepage.h) \\ $(wildcard include/config/have/memory/present.h) \\ $(wildcard include/config/have/memoryless/nodes.h) \\ $(wildcard include/config/have/memblock/node/map.h) \\ $(wildcard include/config/need/multiple/nodes.h) \\ $(wildcard include/config/have/arch/early/pfn/to/nid.h) \\ $(wildcard include/config/sparsemem/extreme.h) \\ $(wildcard include/config/memory/hotremove.h) \\ $(wildcard include/config/holes/in/zone.h) \\ $(wildcard include/config/arch/has/holes/memorymodel.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/wait.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/wait.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/pageblock-flags.h \\ $(wildcard include/config/hugetlb/page.h) \\ $(wildcard include/config/hugetlb/page/size/variable.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/page-flags-layout.h \\ include/generated/bounds.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/sparsemem.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/memory_hotplug.h \\ $(wildcard include/config/arch/has/add/pages.h) \\ $(wildcard include/config/have/arch/nodedata/extension.h) \\ $(wildcard include/config/have/bootmem/info/node.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/notifier.h \\ $(wildcard include/config/tree/srcu.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rwsem.h \\ $(wildcard include/config/rwsem/spin/on/owner.h) \\ $(wildcard include/config/rwsem/generic/spinlock.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/err.h \\ arch/arm64/include/generated/asm/rwsem.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/rwsem.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/srcu.h \\ $(wildcard include/config/tiny/srcu.h) \\ $(wildcard include/config/srcu.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rcu_segcblist.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/srcutree.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rcu_node_tree.h \\ $(wildcard include/config/rcu/fanout.h) \\ $(wildcard include/config/rcu/fanout/leaf.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/completion.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/topology.h \\ $(wildcard include/config/use/percpu/numa/node/id.h) \\ $(wildcard include/config/sched/smt.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/topology.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/arch_topology.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/topology.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sysctl.h \\ $(wildcard include/config/sysctl.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/sysctl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/elf.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/elf.h \\ arch/arm64/include/generated/asm/user.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/user.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/elf.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/elf-em.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kobject.h \\ $(wildcard include/config/uevent/helper.h) \\ $(wildcard include/config/debug/kobject/release.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sysfs.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kernfs.h \\ $(wildcard include/config/kernfs.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/idr.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/radix-tree.h \\ $(wildcard include/config/radix/tree/multiorder.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kobject_ns.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kref.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/moduleparam.h \\ $(wildcard include/config/alpha.h) \\ $(wildcard include/config/ia64.h) \\ $(wildcard include/config/ppc64.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/rbtree_latch.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/error-injection.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/error-injection.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/tracepoint-defs.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/static_key.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/module.h \\ $(wildcard include/config/arm64/module/plts.h) \\ $(wildcard include/config/dynamic/ftrace.h) \\ $(wildcard include/config/randomize/base.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/module.h \\ $(wildcard include/config/have/mod/arch/specific.h) \\ $(wildcard include/config/modules/use/elf/rel.h) \\ $(wildcard include/config/modules/use/elf/rela.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/cpu.h \\ $(wildcard include/config/pm/sleep/smp.h) \\ $(wildcard include/config/hotplug/smt.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/node.h \\ $(wildcard include/config/memory/hotplug/sparse.h) \\ $(wildcard include/config/hugetlbfs.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/device.h \\ $(wildcard include/config/debug/devres.h) \\ $(wildcard include/config/generic/msi/irq/domain.h) \\ $(wildcard include/config/pinctrl.h) \\ $(wildcard include/config/generic/msi/irq.h) \\ $(wildcard include/config/dma/cma.h) \\ $(wildcard include/config/of.h) \\ $(wildcard include/config/devtmpfs.h) \\ $(wildcard include/config/sysfs/deprecated.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/ioport.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/klist.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/pm.h \\ $(wildcard include/config/vt/console/sleep.h) \\ $(wildcard include/config/pm.h) \\ $(wildcard include/config/pm/clk.h) \\ $(wildcard include/config/pm/generic/domains.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/ratelimit.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/overflow.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/device.h \\ $(wildcard include/config/iommu/api.h) \\ $(wildcard include/config/xen.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/pm_wakeup.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/cpuhotplug.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/slab.h \\ $(wildcard include/config/debug/slab.h) \\ $(wildcard include/config/failslab.h) \\ $(wildcard include/config/have/hardened/usercopy/allocator.h) \\ $(wildcard include/config/slab.h) \\ $(wildcard include/config/slub.h) \\ $(wildcard include/config/slob.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/kasan.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/acpi.h \\ $(wildcard include/config/acpi.h) \\ $(wildcard include/config/acpi/debugger.h) \\ $(wildcard include/config/x86.h) \\ $(wildcard include/config/arm64.h) \\ $(wildcard include/config/acpi/hotplug/cpu.h) \\ $(wildcard include/config/acpi/hotplug/ioapic.h) \\ $(wildcard include/config/x86/io/apic.h) \\ $(wildcard include/config/acpi/wmi.h) \\ $(wildcard include/config/acpi/numa.h) \\ $(wildcard include/config/hibernation.h) \\ $(wildcard include/config/acpi/hotplug/memory.h) \\ $(wildcard include/config/acpi/container.h) \\ $(wildcard include/config/acpi/gtdt.h) \\ $(wildcard include/config/gpiolib.h) \\ $(wildcard include/config/acpi/table/upgrade.h) \\ $(wildcard include/config/acpi/watchdog.h) \\ $(wildcard include/config/acpi/spcr/table.h) \\ $(wildcard include/config/acpi/generic/gsi.h) \\ $(wildcard include/config/acpi/lpit.h) \\ $(wildcard include/config/acpi/pptt.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/resource_ext.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/property.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/fwnode.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/uuid.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/uuid.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/acpi/acpi.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/acpi/platform/acenv.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/acpi/platform/acgcc.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/acpi/platform/aclinux.h \\ $(wildcard include/config/acpi/reduced/hardware/only.h) \\ $(wildcard include/config/acpi/debug.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/ctype.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/acpi/acnames.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/acpi/actypes.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/acpi/acexcep.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/acpi/actbl.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/acpi/actbl1.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/acpi/actbl2.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/acpi/actbl3.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/acpi/acrestyp.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/acpi/platform/acenvex.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/acpi/platform/aclinuxex.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/acpi/platform/acgccex.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/acpi/acoutput.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/acpi/acpiosxf.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/acpi/acpixf.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/acpi/acconfig.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/acpi/acbuffer.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/of.h \\ $(wildcard include/config/of/dynamic.h) \\ $(wildcard include/config/sparc.h) \\ $(wildcard include/config/of/promtree.h) \\ $(wildcard include/config/of/kobj.h) \\ $(wildcard include/config/of/numa.h) \\ $(wildcard include/config/of/resolve.h) \\ $(wildcard include/config/of/overlay.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/mod_devicetable.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/cpufeature.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/tick.h \\ $(wildcard include/config/generic/clockevents.h) \\ $(wildcard include/config/suspend.h) \\ $(wildcard include/config/tick/oneshot.h) \\ $(wildcard include/config/generic/clockevents/broadcast.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/clockchips.h \\ $(wildcard include/config/arch/has/tick/broadcast.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/clocksource.h \\ $(wildcard include/config/arch/clocksource/data.h) \\ $(wildcard include/config/clocksource/watchdog.h) \\ $(wildcard include/config/timer/probe.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/io.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/pgtable.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/proc-fns.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/pgtable-prot.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/fixmap.h \\ $(wildcard include/config/acpi/apei/ghes.h) \\ $(wildcard include/config/unmap/kernel/at/el0.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/boot.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/fixmap.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/mm_types.h \\ $(wildcard include/config/have/aligned/struct/page.h) \\ $(wildcard include/config/userfaultfd.h) \\ $(wildcard include/config/have/arch/compat/mmap/bases.h) \\ $(wildcard include/config/membarrier.h) \\ $(wildcard include/config/aio.h) \\ $(wildcard include/config/mmu/notifier.h) \\ $(wildcard include/config/hmm.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/auxvec.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/uapi/linux/auxvec.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/uapi/asm/auxvec.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/uprobes.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/mmu.h \\ $(wildcard include/config/harden/branch/predictor.h) \\ $(wildcard include/config/harden/el2/vectors.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/pgtable.h \\ $(wildcard include/config/have/arch/transparent/hugepage/pud.h) \\ $(wildcard include/config/have/arch/soft/dirty.h) \\ $(wildcard include/config/arch/enable/thp/migration.h) \\ $(wildcard include/config/have/arch/huge/vmap.h) \\ $(wildcard include/config/x86/espfix64.h) \\ arch/arm64/include/generated/asm/early_ioremap.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/early_ioremap.h \\ $(wildcard include/config/generic/early/ioremap.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/xen/xen.h \\ $(wildcard include/config/xen/pvh.h) \\ $(wildcard include/config/xen/dom0.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/io.h \\ $(wildcard include/config/generic/iomap.h) \\ $(wildcard include/config/has/ioport/map.h) \\ $(wildcard include/config/virt/to/bus.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/asm-generic/pci_iomap.h \\ $(wildcard include/config/pci.h) \\ $(wildcard include/config/no/generic/pci/ioport/map.h) \\ $(wildcard include/config/generic/pci/iomap.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/logic_pio.h \\ $(wildcard include/config/indirect/pio.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/vmalloc.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/arch/arm64/include/asm/clocksource.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/context_tracking_state.h \\ $(wildcard include/config/context/tracking.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/pm_qos.h \\ /home/zw/share/ultra96/mipitest/linux-xlnx/include/linux/sched/isolation.h \\ $(wildcard include/config/cpu/isolation.h) \\ /home/zw/share/ultra96/mipitest/linux-xlnx/drivers/base/base.h \\ $(wildcard include/config/sys/hypervisor.h) \\ drivers/base/cpu.o: $(deps_drivers/base/cpu.o) $(deps_drivers/base/cpu.o): ",16288,True,5287.83756781612,median "@ECHO OFF SET SCRIPT_DIR=%~dp0 IF ""%PYTHON%""=="""" (SET PYTHON=python) SET REVISION1=2012-12-03 SET REVISION2=2013-06-07 SET REVISION3=2013-12-02 REM Main budget text echo Processing main budget text... ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_0.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\budget-%REVISION1%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\budget-%REVISION1%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\budget-%REVISION1%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\budget-%REVISION1%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\budget-%REVISION1%.pretty.json"" ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_0.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\budget-%REVISION2%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\budget-%REVISION2%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\budget-%REVISION2%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\budget-%REVISION2%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\budget-%REVISION2%.pretty.json"" ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_0.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\budget-%REVISION3%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\budget-%REVISION3%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\budget-%REVISION3%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\budget-%REVISION3%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\budget-%REVISION3%.pretty.json"" REM Annex 1 echo Processing annex 1... ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_1.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex01-%REVISION1%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex01-%REVISION1%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex01-%REVISION1%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex01-%REVISION1%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex01-%REVISION1%.pretty.json"" copy /Y ""%SCRIPT_DIR%\\..\\data\\annex01-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex01-%REVISION2%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex01-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex01-%REVISION3%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex01-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex01-%REVISION2%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex01-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex01-%REVISION3%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex01-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex01-%REVISION2%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex01-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex01-%REVISION3%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex01-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex01-%REVISION2%.pretty.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex01-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex01-%REVISION3%.pretty.json"" >NUL REM Annex 2 echo Processing annex 2... ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_2.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex02-%REVISION1%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex02-%REVISION1%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex02-%REVISION1%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex02-%REVISION1%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex02-%REVISION1%.pretty.json"" copy /Y ""%SCRIPT_DIR%\\..\\data\\annex02-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex02-%REVISION2%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex02-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex02-%REVISION3%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex02-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex02-%REVISION2%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex02-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex02-%REVISION3%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex02-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex02-%REVISION2%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex02-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex02-%REVISION3%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex02-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex02-%REVISION2%.pretty.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex02-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex02-%REVISION3%.pretty.json"" >NUL REM Annex 3 echo Processing annex 3... ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_3.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex03-%REVISION1%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex03-%REVISION1%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex03-%REVISION1%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex03-%REVISION1%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex03-%REVISION1%.pretty.json"" copy /Y ""%SCRIPT_DIR%\\..\\data\\annex03-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex03-%REVISION2%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex03-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex03-%REVISION3%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex03-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex03-%REVISION2%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex03-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex03-%REVISION3%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex03-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex03-%REVISION2%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex03-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex03-%REVISION3%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex03-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex03-%REVISION2%.pretty.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex03-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex03-%REVISION3%.pretty.json"" >NUL REM Annex 4 echo Processing annex 4... ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_4.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex04-%REVISION1%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex04-%REVISION1%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex04-%REVISION1%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex04-%REVISION1%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex04-%REVISION1%.pretty.json"" copy /Y ""%SCRIPT_DIR%\\..\\data\\annex04-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex04-%REVISION2%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex04-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex04-%REVISION3%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex04-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex04-%REVISION2%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex04-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex04-%REVISION3%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex04-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex04-%REVISION2%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex04-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex04-%REVISION3%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex04-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex04-%REVISION2%.pretty.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex04-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex04-%REVISION3%.pretty.json"" >NUL REM Annex 5 echo Processing annex 5... ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_5.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex05-%REVISION1%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex05-%REVISION1%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex05-%REVISION1%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex05-%REVISION1%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex05-%REVISION1%.pretty.json"" ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_5.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex05-%REVISION2%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex05-%REVISION2%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex05-%REVISION2%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex05-%REVISION2%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex05-%REVISION2%.pretty.json"" copy /Y ""%SCRIPT_DIR%\\..\\data\\annex05-%REVISION2%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex05-%REVISION3%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex05-%REVISION2%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex05-%REVISION3%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex05-%REVISION2%.json"" ""%SCRIPT_DIR%\\..\\data\\annex05-%REVISION3%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex05-%REVISION2%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex05-%REVISION3%.pretty.json"" >NUL REM Annex 6 echo Processing annex 6... ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_6.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex06-%REVISION1%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex06-%REVISION1%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex06-%REVISION1%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex06-%REVISION1%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex06-%REVISION1%.pretty.json"" copy /Y ""%SCRIPT_DIR%\\..\\data\\annex06-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex06-%REVISION2%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex06-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex06-%REVISION3%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex06-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex06-%REVISION2%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex06-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex06-%REVISION3%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex06-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex06-%REVISION2%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex06-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex06-%REVISION3%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex06-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex06-%REVISION2%.pretty.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex06-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex06-%REVISION3%.pretty.json"" >NUL REM Annex 7 echo Processing annex 7... ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_7.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex07-%REVISION1%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex07-%REVISION1%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex07-%REVISION1%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex07-%REVISION1%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex07-%REVISION1%.pretty.json"" copy /Y ""%SCRIPT_DIR%\\..\\data\\annex07-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex07-%REVISION2%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex07-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex07-%REVISION2%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex07-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex07-%REVISION2%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex07-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex07-%REVISION2%.pretty.json"" >NUL ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_7.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex07-%REVISION3%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex07-%REVISION3%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex07-%REVISION3%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex07-%REVISION3%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex07-%REVISION3%.pretty.json"" copy /Y ""%SCRIPT_DIR%\\..\\data\\annex07-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex07-combined-%REVISION1%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex07-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex07-combined-%REVISION1%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex07-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex07-combined-%REVISION1%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex07-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex07-combined-%REVISION1%.pretty.json"" >NUL REM Annex 7.1 echo Processing annex 7.1... ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_7_1.py""^ -m ""%SCRIPT_DIR%\\..\\doc\\annex07-%REVISION1%.txt""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex07.1-%REVISION2%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex07.1-%REVISION2%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex07.1-%REVISION2%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex07.1-%REVISION2%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex07.1-%REVISION2%.pretty.json""^ --combined-output-pickle ""%SCRIPT_DIR%\\..\\data\\annex07-combined-%REVISION2%.pkl""^ --combined-output-text ""%SCRIPT_DIR%\\..\\data\\annex07-combined-%REVISION2%.txt""^ --combined-output-json ""%SCRIPT_DIR%\\..\\data\\annex07-combined-%REVISION2%.json""^ --combined-output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex07-combined-%REVISION2%.pretty.json"" ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_7_1.py""^ -m ""%SCRIPT_DIR%\\..\\doc\\annex07-%REVISION3%.txt""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex07.1-%REVISION2%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex07.1-%REVISION3%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex07.1-%REVISION3%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex07.1-%REVISION3%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex07.1-%REVISION3%.pretty.json""^ --combined-output-pickle ""%SCRIPT_DIR%\\..\\data\\annex07-combined-%REVISION3%.pkl.tmp"" REM Annex 7.2 echo Processing annex 7.2... ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_7_2.py""^ -m ""%SCRIPT_DIR%\\..\\data\\annex07-combined-%REVISION3%.pkl.tmp""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex07.2-%REVISION3%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex07.2-%REVISION3%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex07.2-%REVISION3%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex07.2-%REVISION3%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex07.2-%REVISION3%.pretty.json""^ --combined-output-pickle ""%SCRIPT_DIR%\\..\\data\\annex07-combined-%REVISION3%.pkl""^ --combined-output-text ""%SCRIPT_DIR%\\..\\data\\annex07-combined-%REVISION3%.txt""^ --combined-output-json ""%SCRIPT_DIR%\\..\\data\\annex07-combined-%REVISION3%.json""^ --combined-output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex07-combined-%REVISION3%.pretty.json"" del /F /Q ""%SCRIPT_DIR%\\..\\data\\annex07-combined-%REVISION3%.pkl.tmp"" REM Annex 10 echo Processing annex 10... ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_10.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex10-%REVISION1%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex10-%REVISION1%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex10-%REVISION1%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex10-%REVISION1%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex10-%REVISION1%.pretty.json"" copy /Y ""%SCRIPT_DIR%\\..\\data\\annex10-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex10-%REVISION2%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex10-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex10-%REVISION3%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex10-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex10-%REVISION2%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex10-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex10-%REVISION3%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex10-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex10-%REVISION2%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex10-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex10-%REVISION3%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex10-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex10-%REVISION2%.pretty.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex10-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex10-%REVISION3%.pretty.json"" >NUL REM Annex 13 echo Processing annex 13... ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_13.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex13-%REVISION1%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex13-%REVISION1%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex13-%REVISION1%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex13-%REVISION1%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex13-%REVISION1%.pretty.json"" copy /Y ""%SCRIPT_DIR%\\..\\data\\annex13-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex13-%REVISION2%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex13-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex13-%REVISION2%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex13-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex13-%REVISION2%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex13-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex13-%REVISION2%.pretty.json"" >NUL ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_13.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex13-%REVISION3%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex13-%REVISION3%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex13-%REVISION3%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex13-%REVISION3%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex13-%REVISION3%.pretty.json"" copy /Y ""%SCRIPT_DIR%\\..\\data\\annex13-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex13-combined-%REVISION1%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex13-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex13-combined-%REVISION1%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex13-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex13-combined-%REVISION1%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex13-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex13-combined-%REVISION1%.pretty.json"" >NUL REM Annex 13.1 echo Processing annex 13.1... ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_13_1.py""^ -m ""%SCRIPT_DIR%\\..\\doc\\annex13-%REVISION1%.txt""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex13.1-%REVISION2%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex13.1-%REVISION2%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex13.1-%REVISION2%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex13.1-%REVISION2%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex13.1-%REVISION2%.pretty.json""^ --combined-output-pickle ""%SCRIPT_DIR%\\..\\data\\annex13-combined-%REVISION2%.pkl""^ --combined-output-text ""%SCRIPT_DIR%\\..\\data\\annex13-combined-%REVISION2%.txt""^ --combined-output-json ""%SCRIPT_DIR%\\..\\data\\annex13-combined-%REVISION2%.json""^ --combined-output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex13-combined-%REVISION2%.pretty.json"" ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_13_1.py""^ -m ""%SCRIPT_DIR%\\..\\doc\\annex13-%REVISION3%.txt""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex13.1-%REVISION2%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex13.1-%REVISION3%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex13.1-%REVISION3%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex13.1-%REVISION3%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex13.1-%REVISION3%.pretty.json""^ --combined-output-pickle ""%SCRIPT_DIR%\\..\\data\\annex13-combined-%REVISION3%.pkl.tmp"" REM Annex 13.2 echo Processing annex 13.2... ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_13_2.py""^ -m ""%SCRIPT_DIR%\\..\\data\\annex13-combined-%REVISION3%.pkl.tmp""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex13.2-%REVISION3%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex13.2-%REVISION3%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex13.2-%REVISION3%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex13.2-%REVISION3%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex13.2-%REVISION3%.pretty.json""^ --combined-output-pickle ""%SCRIPT_DIR%\\..\\data\\annex13-combined-%REVISION3%.pkl""^ --combined-output-text ""%SCRIPT_DIR%\\..\\data\\annex13-combined-%REVISION3%.txt""^ --combined-output-json ""%SCRIPT_DIR%\\..\\data\\annex13-combined-%REVISION3%.json""^ --combined-output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex13-combined-%REVISION3%.pretty.json"" del /F /Q ""%SCRIPT_DIR%\\..\\data\\annex13-combined-%REVISION3%.pkl.tmp"" REM Annex 15 echo Processing annex 15... ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_15.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex15-%REVISION1%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex15-%REVISION1%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex15-%REVISION1%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex15-%REVISION1%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex15-%REVISION1%.pretty.json"" copy /Y ""%SCRIPT_DIR%\\..\\data\\annex15-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex15-%REVISION2%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex15-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex15-%REVISION3%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex15-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex15-%REVISION2%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex15-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex15-%REVISION3%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex15-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex15-%REVISION2%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex15-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex15-%REVISION3%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex15-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex15-%REVISION2%.pretty.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex15-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex15-%REVISION3%.pretty.json"" >NUL REM Annex 19 echo Processing annex 19... ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_19.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex19-%REVISION1%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex19-%REVISION1%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex19-%REVISION1%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex19-%REVISION1%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex19-%REVISION1%.pretty.json"" copy /Y ""%SCRIPT_DIR%\\..\\data\\annex19-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex19-%REVISION2%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex19-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex19-%REVISION3%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex19-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex19-%REVISION2%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex19-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex19-%REVISION3%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex19-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex19-%REVISION2%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex19-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex19-%REVISION3%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex19-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex19-%REVISION2%.pretty.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex19-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex19-%REVISION3%.pretty.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex19-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex19-combined-%REVISION1%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex19-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex19-combined-%REVISION1%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex19-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex19-combined-%REVISION1%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex19-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex19-combined-%REVISION1%.pretty.json"" >NUL REM Annex 19.1 echo Processing annex 19.1... ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_19_1.py""^ -m ""%SCRIPT_DIR%\\..\\doc\\annex19-%REVISION1%.txt""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex19.1-%REVISION2%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex19.1-%REVISION2%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex19.1-%REVISION2%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex19.1-%REVISION2%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex19.1-%REVISION2%.pretty.json""^ --combined-output-pickle ""%SCRIPT_DIR%\\..\\data\\annex19-combined-%REVISION2%.pkl""^ --combined-output-text ""%SCRIPT_DIR%\\..\\data\\annex19-combined-%REVISION2%.txt""^ --combined-output-json ""%SCRIPT_DIR%\\..\\data\\annex19-combined-%REVISION2%.json""^ --combined-output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex19-combined-%REVISION2%.pretty.json"" copy /Y ""%SCRIPT_DIR%\\..\\data\\annex19.1-%REVISION2%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex19.1-%REVISION3%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex19.1-%REVISION2%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex19.1-%REVISION3%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex19.1-%REVISION2%.json"" ""%SCRIPT_DIR%\\..\\data\\annex19.1-%REVISION3%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex19.1-%REVISION2%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex19.1-%REVISION3%.pretty.json"" >NUL REM Annex 19.2 echo Processing annex 19.2... ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_19_2.py""^ -m ""%SCRIPT_DIR%\\..\\data\\annex19-combined-%REVISION2%.pkl""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex19.2-%REVISION3%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex19.2-%REVISION3%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex19.2-%REVISION3%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex19.2-%REVISION3%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex19.2-%REVISION3%.pretty.json""^ --combined-output-pickle ""%SCRIPT_DIR%\\..\\data\\annex19-combined-%REVISION3%.pkl""^ --combined-output-text ""%SCRIPT_DIR%\\..\\data\\annex19-combined-%REVISION3%.txt""^ --combined-output-json ""%SCRIPT_DIR%\\..\\data\\annex19-combined-%REVISION3%.json""^ --combined-output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex19-combined-%REVISION3%.pretty.json"" REM Annex 22 echo Processing annex 22... ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_22.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex22-%REVISION1%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex22-%REVISION1%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex22-%REVISION1%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex22-%REVISION1%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex22-%REVISION1%.pretty.json"" copy /Y ""%SCRIPT_DIR%\\..\\data\\annex22-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex22-%REVISION2%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex22-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex22-%REVISION3%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex22-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex22-%REVISION2%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex22-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex22-%REVISION3%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex22-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex22-%REVISION2%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex22-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex22-%REVISION3%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex22-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex22-%REVISION2%.pretty.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex22-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex22-%REVISION3%.pretty.json"" >NUL REM Annex 25 echo Processing annex 25... ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_25.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex25-%REVISION1%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex25-%REVISION1%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex25-%REVISION1%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex25-%REVISION1%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex25-%REVISION1%.pretty.json"" copy /Y ""%SCRIPT_DIR%\\..\\data\\annex25-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex25-%REVISION2%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex25-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex25-%REVISION3%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex25-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex25-%REVISION2%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex25-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex25-%REVISION3%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex25-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex25-%REVISION2%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex25-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex25-%REVISION3%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex25-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex25-%REVISION2%.pretty.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex25-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex25-%REVISION3%.pretty.json"" >NUL REM Annex 26 echo Processing annex 26... ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_26.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex26-%REVISION1%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex26-%REVISION1%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex26-%REVISION1%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex26-%REVISION1%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex26-%REVISION1%.pretty.json"" copy /Y ""%SCRIPT_DIR%\\..\\data\\annex26-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex26-%REVISION2%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex26-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex26-%REVISION3%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex26-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex26-%REVISION2%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex26-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex26-%REVISION3%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex26-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex26-%REVISION2%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex26-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex26-%REVISION3%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex26-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex26-%REVISION2%.pretty.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex26-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex26-%REVISION3%.pretty.json"" >NUL REM Annex 31 echo Processing annex 31... ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_31.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex31-%REVISION1%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex31-%REVISION1%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex31-%REVISION1%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex31-%REVISION1%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex31-%REVISION1%.pretty.json"" ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_31.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex31-%REVISION2%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex31-%REVISION2%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex31-%REVISION2%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex31-%REVISION2%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex31-%REVISION2%.pretty.json"" ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_31.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex31-%REVISION3%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex31-%REVISION3%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex31-%REVISION3%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex31-%REVISION3%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex31-%REVISION3%.pretty.json"" REM Annex 32 echo Processing annex 32... ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_32.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex32-%REVISION1%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex32-%REVISION1%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex32-%REVISION1%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex32-%REVISION1%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex32-%REVISION1%.pretty.json"" copy /Y ""%SCRIPT_DIR%\\..\\data\\annex32-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex32-%REVISION2%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex32-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex32-%REVISION3%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex32-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex32-%REVISION2%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex32-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex32-%REVISION3%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex32-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex32-%REVISION2%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex32-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex32-%REVISION3%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex32-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex32-%REVISION2%.pretty.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex32-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex32-%REVISION3%.pretty.json"" >NUL REM Annex 35 echo Processing annex 35... ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_35.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex35-%REVISION1%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex35-%REVISION1%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex35-%REVISION1%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex35-%REVISION1%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex35-%REVISION1%.pretty.json"" copy /Y ""%SCRIPT_DIR%\\..\\data\\annex35-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex35-%REVISION2%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex35-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex35-%REVISION2%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex35-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex35-%REVISION2%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex35-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex35-%REVISION2%.pretty.json"" >NUL ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_35.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex35-%REVISION3%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex35-%REVISION3%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex35-%REVISION3%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex35-%REVISION3%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex35-%REVISION3%.pretty.json"" REM Annex 36 echo Processing annex 36... ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_36.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex36-%REVISION1%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex36-%REVISION1%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex36-%REVISION1%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex36-%REVISION1%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex36-%REVISION1%.pretty.json"" copy /Y ""%SCRIPT_DIR%\\..\\data\\annex36-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex36-%REVISION2%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex36-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex36-%REVISION3%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex36-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex36-%REVISION2%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex36-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex36-%REVISION3%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex36-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex36-%REVISION2%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex36-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex36-%REVISION3%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex36-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex36-%REVISION2%.pretty.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex36-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex36-%REVISION3%.pretty.json"" >NUL REM Annex 37 echo Processing annex 37... ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_37.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex37-%REVISION1%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex37-%REVISION1%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex37-%REVISION1%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex37-%REVISION1%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex37-%REVISION1%.pretty.json"" ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_37.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex37-%REVISION2%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex37-%REVISION2%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex37-%REVISION2%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex37-%REVISION2%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex37-%REVISION2%.pretty.json"" ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_37.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex37-%REVISION3%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex37-%REVISION3%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex37-%REVISION3%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex37-%REVISION3%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex37-%REVISION3%.pretty.json"" REM Annex 38 echo Processing annex 38... ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_38.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex38-%REVISION1%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex38-%REVISION1%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex38-%REVISION1%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex38-%REVISION1%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex38-%REVISION1%.pretty.json"" copy /Y ""%SCRIPT_DIR%\\..\\data\\annex38-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex38-%REVISION2%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex38-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex38-%REVISION3%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex38-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex38-%REVISION2%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex38-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex38-%REVISION3%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex38-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex38-%REVISION2%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex38-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex38-%REVISION3%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex38-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex38-%REVISION2%.pretty.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex38-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex38-%REVISION3%.pretty.json"" >NUL REM Annex 39 echo Processing annex 39... ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_39.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex39-%REVISION1%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex39-%REVISION1%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex39-%REVISION1%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex39-%REVISION1%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex39-%REVISION1%.pretty.json"" ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_39.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex39-%REVISION2%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex39-%REVISION2%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex39-%REVISION2%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex39-%REVISION2%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex39-%REVISION2%.pretty.json"" ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_39.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex39-%REVISION3%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex39-%REVISION3%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex39-%REVISION3%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex39-%REVISION3%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex39-%REVISION3%.pretty.json"" REM Annex 40 echo Processing annex 40... ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_40.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex40-%REVISION1%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex40-%REVISION1%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex40-%REVISION1%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex40-%REVISION1%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex40-%REVISION1%.pretty.json"" copy /Y ""%SCRIPT_DIR%\\..\\data\\annex40-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex40-%REVISION2%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex40-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex40-%REVISION3%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex40-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex40-%REVISION2%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex40-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex40-%REVISION3%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex40-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex40-%REVISION2%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex40-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex40-%REVISION3%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex40-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex40-%REVISION2%.pretty.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex40-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex40-%REVISION3%.pretty.json"" >NUL REM Annex 41 echo Processing annex 41... ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_41.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex41-%REVISION1%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex41-%REVISION1%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex41-%REVISION1%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex41-%REVISION1%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex41-%REVISION1%.pretty.json"" ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_41.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex41-%REVISION2%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex41-%REVISION2%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex41-%REVISION2%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex41-%REVISION2%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex41-%REVISION2%.pretty.json"" ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_41.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex41-%REVISION3%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex41-%REVISION3%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex41-%REVISION3%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex41-%REVISION3%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex41-%REVISION3%.pretty.json"" REM Annex 42 echo Processing annex 42... ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_42.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex42-%REVISION1%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex42-%REVISION1%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex42-%REVISION1%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex42-%REVISION1%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex42-%REVISION1%.pretty.json"" copy /Y ""%SCRIPT_DIR%\\..\\data\\annex42-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex42-%REVISION2%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex42-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex42-%REVISION3%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex42-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex42-%REVISION2%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex42-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex42-%REVISION3%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex42-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex42-%REVISION2%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex42-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex42-%REVISION3%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex42-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex42-%REVISION2%.pretty.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex42-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex42-%REVISION3%.pretty.json"" >NUL REM Annex 43 echo Processing annex 43... ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_43.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex43-%REVISION1%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex43-%REVISION1%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex43-%REVISION1%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex43-%REVISION1%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex43-%REVISION1%.pretty.json"" ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_43.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex43-%REVISION2%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex43-%REVISION2%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex43-%REVISION2%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex43-%REVISION2%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex43-%REVISION2%.pretty.json"" ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_43.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex43-%REVISION3%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex43-%REVISION3%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex43-%REVISION3%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex43-%REVISION3%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex43-%REVISION3%.pretty.json"" REM Annex 44 echo Processing annex 44... ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_44.py""^ -i ""%SCRIPT_DIR%\\..\\doc\\annex44-%REVISION1%.txt""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\annex44-%REVISION1%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\annex44-%REVISION1%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\annex44-%REVISION1%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\annex44-%REVISION1%.pretty.json"" copy /Y ""%SCRIPT_DIR%\\..\\data\\annex44-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex44-%REVISION2%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex44-%REVISION1%.pkl"" ""%SCRIPT_DIR%\\..\\data\\annex44-%REVISION3%.pkl"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex44-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex44-%REVISION2%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex44-%REVISION1%.txt"" ""%SCRIPT_DIR%\\..\\data\\annex44-%REVISION3%.txt"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex44-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex44-%REVISION2%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex44-%REVISION1%.json"" ""%SCRIPT_DIR%\\..\\data\\annex44-%REVISION3%.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex44-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex44-%REVISION2%.pretty.json"" >NUL copy /Y ""%SCRIPT_DIR%\\..\\data\\annex44-%REVISION1%.pretty.json"" ""%SCRIPT_DIR%\\..\\data\\annex44-%REVISION3%.pretty.json"" >NUL REM Result budget echo Processing result budget... ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_result.py""^ -i ""%SCRIPT_DIR%\\..\\data""^ -r ""%REVISION1%""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\result-%REVISION1%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\result-%REVISION1%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\result-%REVISION1%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\result-%REVISION1%.pretty.json"" ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_result.py""^ -i ""%SCRIPT_DIR%\\..\\data""^ -r ""%REVISION2%""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\result-%REVISION2%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\result-%REVISION2%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\result-%REVISION2%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\result-%REVISION2%.pretty.json"" ""%PYTHON%"" ""%SCRIPT_DIR%\\budget2013_result.py""^ -i ""%SCRIPT_DIR%\\..\\data""^ -r ""%REVISION3%""^ --output-pickle ""%SCRIPT_DIR%\\..\\data\\result-%REVISION3%.pkl""^ --output-text ""%SCRIPT_DIR%\\..\\data\\result-%REVISION3%.txt""^ --output-json ""%SCRIPT_DIR%\\..\\data\\result-%REVISION3%.json""^ --output-json-pretty ""%SCRIPT_DIR%\\..\\data\\result-%REVISION3%.pretty.json"" echo Processing completed. ",16217,True,5903.899013731895,median "#include #include #include #include #include #include #include #include ""printf.h"" //==== System Setting =============================================// #define VERSION_NUMBER ""0.012"" //#define DEBUG_MODE 1 #define SHOW_RATE 1 //=======================================================================// //==== Pin Definition ===================================================// // PIN A4, A5 are used as I2C to connect LCD screen // Pin 11, 12, 13 are used as SPI to connect NRF module // Becareful: when use A6, A7 pin // A6, A7 are analog input only, also have no internal pullup. // You will need to add external pullup/pulldown resistor for them. #define THROTTLE_PIN A0 #define YAW_PIN A1 #define PITCH_PIN A2 #define ROLL_PIN A3 #define V_BATTERY_PIN A6 #define AUX6_PIN A7 //SWD #define AUX1_PIN 2 //Arm - 2 states (bool) //Menu: Save #define AUX2_PIN 3 //Flight Mode - 3 states but could be more (byte: Acro/Angle/...) //Menu: Up #define AUX3_PIN 4 //Bomb Drop - 2 states (bool) //Menu: Down #define AUX4_PIN 5 //Beacon - 2 state (bool) #define AUX5_PIN 6 // #define NRF_CE_PIN 7 #define NRF_CSN_PIN 8 #define BUZZER_PIN 9 //OUTPUT #define MENU_PIN 10 //=======================================================================// //==== Global Constant & Variable =======================================// uint16_t BatteryVoltage = 0; uint16_t LowBatteryVoltageThreshold = 3400; // mV #ifdef SHOW_RATE uint8_t SendRate = 0; uint16_t LoopRate = 0; uint8_t SendCount = 0; uint16_t LoopCount = 0; #endif bool FunctionMode = false; bool TrimmingMode = false; const uint8_t RADIO_UNIQUE_ID_EEPROM_ADDRESS = 0; //(2 bytes 0-1) const uint16_t RADIO_UNIQUE_ID_LOWER_BOUNDARY = 1000; const uint16_t RADIO_UNIQUE_ID_UPPER_BOUNDARY = 9999; uint16_t RadioUniqueId = RADIO_UNIQUE_ID_LOWER_BOUNDARY; const uint8_t RADIO_PA_LEVEL_INDEX_EEPROM_ADDRESS = 4; const uint8_t RADIO_PA_LEVEL_INDEX_LOWER_BOUNDARY = 0; //RF24_PA_MIN, RF24_PA_LOW, RF24_PA_HIGH, RF24_PA_MAX const uint8_t RADIO_PA_LEVEL_INDEX_UPPER_BOUNDARY = 3; //TODO: use index instead int8_t RadioPaLevelIndex = 3; const uint8_t CURRENT_RX_ID_EEPROM_ADDRESS = 5; //TODO: Implement Multiple RX support const uint8_t CURRENT_RX_ID_LOWER_BOUNDARY = 1; const uint8_t CURRENT_RX_ID_UPPER_BOUNDARY = 10; uint8_t CurrentRxId = 1; const uint8_t RX_CONFIG_EEPROM_START_ADDRESS = 100; const uint8_t RX_CONFIG_ALLOCATED_BYTES = 20; const uint8_t RX_TRIM_STEP_RANGE = 15; const uint8_t RX_TRIM_STEP_WIDTH = 2; const uint8_t RADIO_CHANNEL_LOWER_BOUNDARY = 100; const uint8_t RADIO_CHANNEL_UPPER_BOUNDARY = 125; const uint64_t RADIO_PIPE_OUT = 0xE8E8F0F0E1LL; RF24 radio(NRF_CE_PIN, NRF_CSN_PIN); U8G2_SSD1306_128X64_NONAME_2_HW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); const uint8_t AUX1_VALUE_LOWER_BOUNDARY = 0; const uint8_t AUX1_VALUE_UPPER_BOUNDARY = 1; uint8_t Aux1Value = AUX1_VALUE_LOWER_BOUNDARY; Bounce Aux1Bounce = Bounce(); bool Aux1Pressed = false; const uint8_t AUX2_VALUE_LOWER_BOUNDARY = 0; const uint8_t AUX2_VALUE_UPPER_BOUNDARY = 2; uint8_t Aux2Value = AUX2_VALUE_LOWER_BOUNDARY; Bounce Aux2Bounce = Bounce(); bool Aux2Pressed = false; const uint8_t AUX3_VALUE_LOWER_BOUNDARY = 0; const uint8_t AUX3_VALUE_UPPER_BOUNDARY = 1; uint8_t Aux3Value = AUX3_VALUE_LOWER_BOUNDARY; Bounce Aux3Bounce = Bounce(); bool Aux3Pressed = false; const uint8_t AUX4_VALUE_LOWER_BOUNDARY = 0; const uint8_t AUX4_VALUE_UPPER_BOUNDARY = 1; uint8_t Aux4Value = AUX4_VALUE_LOWER_BOUNDARY; Bounce Aux4Bounce = Bounce(); bool Aux4Pressed = false; const uint8_t AUX5_VALUE_LOWER_BOUNDARY = 0; const uint8_t AUX5_VALUE_UPPER_BOUNDARY = 3; uint8_t Aux5Value = AUX5_VALUE_LOWER_BOUNDARY; Bounce Aux5Bounce = Bounce(); bool Aux5Pressed = false; Bounce MenuBounce = Bounce(); bool MenuPressed = false; // NRF24L01+ module can send maximum 32 byte per package struct MyData { uint16_t UniqueId; uint16_t Throttle; uint16_t Yaw; uint16_t Pitch; uint16_t Roll; uint16_t Aux1; uint16_t Aux2; uint16_t Aux3; uint16_t Aux4; uint16_t Aux5; uint16_t Aux6; }; MyData data; const uint16_t BatteryVoltageReadInterval = 10000; unsigned long BatteryVoltageReadLastMillis = 0; const uint16_t FunctionWelcomeScreenShowDuration = 2000; const uint16_t TimerRefreshInterval = 1000; unsigned long TimerRefreshLastMillis = 0; uint16_t Timer_Seconds = 0; uint16_t ScreenRefreshInterval = 500; unsigned long ScreenRefreshLastMillis = 0; bool BuzzerEnabled = true; uint8_t BuzzerTimesToBeep = 0; byte BuzzerState = LOW; uint16_t BuzzerBeepInterval = 50; unsigned long BuzzerBeepLastMillis = 0; const uint8_t RadioSendInterval = 10; unsigned long RadioSendLastMillis = 0; char FlightMode[3][10] = { ""ACRO"", ""ANGLE"", ""HORIZON"" }; // RxConfig data limit is 20 bytes // We allocates 10 RxConfig in EEPROM from address 100 to 299 struct RxConfigData { uint8_t Id; uint8_t RadioChannel; int8_t ThrottleTrim; int8_t YawTrim; int8_t PitchTrim; int8_t RollTrim; char Name[10]; }; RxConfigData RxConfigs[10]; struct RadioPaLevelData { uint8_t PaValue; char PaName[5]; }; RadioPaLevelData RadioPaLevels[4] = { {RF24_PA_MIN, ""MIN""}, {RF24_PA_LOW, ""LOW""}, {RF24_PA_HIGH, ""HIGH""}, {RF24_PA_MAX, ""MAX""} }; char Functions[4][15] = { ""Transmitter ID"", ""Radio PA Level"", ""RX Selection"", ""Wipe All Data"" }; uint8_t CurrentTrimmingIndex = 0; // 0=>Yaw, 1=>Throttle, 2=>Pitch, 3=>Roll uint8_t CurrentFunctionIndex = 0; uint8_t SelectedFunctionIndex = 1; uint8_t SelectedRxId = CurrentRxId; uint8_t RxConfigurationIndex = 0; uint8_t RxConfigurationNameIndex = 0; char RxConfigurationName[10] = """"; uint8_t RxConfigurationChannel = 100; //=======================================================================// void setup() { #ifdef DEBUG_MODE Serial.begin(115200); #endif u8g2.begin(); u8g2.setFont(u8g2_font_profont12_tr); readEeprom(); pinMode(AUX1_PIN, INPUT_PULLUP); pinMode(AUX2_PIN, INPUT_PULLUP); pinMode(AUX3_PIN, INPUT_PULLUP); pinMode(AUX4_PIN, INPUT_PULLUP); pinMode(AUX5_PIN, INPUT_PULLUP); pinMode(MENU_PIN, INPUT_PULLUP); pinMode(BUZZER_PIN, OUTPUT); Aux1Bounce.attach(AUX1_PIN); Aux2Bounce.attach(AUX2_PIN); Aux3Bounce.attach(AUX3_PIN); Aux4Bounce.attach(AUX4_PIN); Aux5Bounce.attach(AUX5_PIN); MenuBounce.attach(MENU_PIN); Aux1Bounce.interval(5); Aux2Bounce.interval(5); Aux3Bounce.interval(5); Aux4Bounce.interval(5); Aux5Bounce.interval(5); MenuBounce.interval(5); MenuBounce.update(); if (MenuBounce.read() == LOW) { FunctionMode = true; ScreenRefreshInterval = 200; BuzzerTimesToBeep = 3; } else { FunctionMode = false; BuzzerTimesToBeep = 1; } // Seed RxConfigs if it does not already exist if (EEPROM.read(RX_CONFIG_EEPROM_START_ADDRESS) == 0) { putRxConfigs(); } //FunctionMode = true; //For testing only, remove after. if (FunctionMode) { drawFunctionWelcomeScreen(); getRxConfigs(); #ifdef DEBUG_MODE for (uint8_t i = 0; i < 10; i++) { Serial.println(RxConfigs[i].Id); } #endif } else { RxConfigData rxConfig = getRxConfig(CurrentRxId); radio.begin(); radio.setPALevel(RadioPaLevels[RadioPaLevelIndex].PaValue); radio.setAutoAck(false); radio.setChannel(rxConfig.RadioChannel); radio.setDataRate(RF24_250KBPS); radio.openWritingPipe(RADIO_PIPE_OUT); radio.startListening(); radio.stopListening(); #ifdef DEBUG_MODE printf_begin(); radio.printDetails(); Serial.print(""UniqueId ""); Serial.print(RadioUniqueId); Serial.print("" Channel ""); Serial.println(rxConfig.RadioChannel); #endif } resetData(); readBatteryVoltage(10001); //Dummy value > BatteryVoltageReadInterval to force battery read once //delete after char testStr[3] = """"; getRxIdStr(testStr, 1); Serial.println(testStr); } void loop() { unsigned long currentMillis = millis(); if (FunctionMode) { if (currentMillis > FunctionWelcomeScreenShowDuration) { setTime(currentMillis); setFunctionValues(); beepBuzzer(currentMillis); refreshFunctionOperationScreen(currentMillis); } } else { readBatteryVoltage(currentMillis); setTime(currentMillis); setButtonsValue(currentMillis); beepBuzzer(currentMillis); sendPayloadData(currentMillis); refreshControlScreen(currentMillis); } #ifdef SHOW_RATE LoopCount++; #endif } void readEeprom() { EEPROM.get(RADIO_UNIQUE_ID_EEPROM_ADDRESS, RadioUniqueId); if (RadioUniqueId < RADIO_UNIQUE_ID_LOWER_BOUNDARY || RadioUniqueId > RADIO_UNIQUE_ID_UPPER_BOUNDARY) { RadioUniqueId = RADIO_UNIQUE_ID_LOWER_BOUNDARY; EEPROM.write(RADIO_UNIQUE_ID_EEPROM_ADDRESS, RadioUniqueId); } RadioPaLevelIndex = EEPROM.read(RADIO_PA_LEVEL_INDEX_EEPROM_ADDRESS); if (RadioPaLevelIndex < RADIO_PA_LEVEL_INDEX_LOWER_BOUNDARY || RadioPaLevelIndex > RADIO_PA_LEVEL_INDEX_UPPER_BOUNDARY) { RadioPaLevelIndex = RADIO_PA_LEVEL_INDEX_UPPER_BOUNDARY; EEPROM.write(RADIO_PA_LEVEL_INDEX_EEPROM_ADDRESS, RadioPaLevelIndex); } CurrentRxId = EEPROM.read(CURRENT_RX_ID_EEPROM_ADDRESS); if (CurrentRxId < CURRENT_RX_ID_LOWER_BOUNDARY || CurrentRxId > CURRENT_RX_ID_UPPER_BOUNDARY) { CurrentRxId = CURRENT_RX_ID_LOWER_BOUNDARY; EEPROM.write(CURRENT_RX_ID_EEPROM_ADDRESS, CurrentRxId); } } void putRxConfigs() { for (int i = CURRENT_RX_ID_LOWER_BOUNDARY; i <= CURRENT_RX_ID_UPPER_BOUNDARY; i++) { uint16_t startAddress = (uint16_t)RX_CONFIG_ALLOCATED_BYTES * (i - 1) + RX_CONFIG_EEPROM_START_ADDRESS; RxConfigData rxConfig; rxConfig.Id = i; rxConfig.RadioChannel = 100; rxConfig.ThrottleTrim = 0; rxConfig.YawTrim = 0; rxConfig.PitchTrim = 0; rxConfig.RollTrim = 0; char rxName[6] = ""RX ""; char rxIdText[3] = """"; itoa(i, rxIdText, 10); if (i < 10) { strcat(rxName, ""0""); } strcat(rxName, rxIdText); strcat(rxName, "" ""); strcpy(rxConfig.Name, rxName); EEPROM.put(startAddress, rxConfig); } } void getRxConfigs() { for (int i = CURRENT_RX_ID_LOWER_BOUNDARY; i <= CURRENT_RX_ID_UPPER_BOUNDARY; i++) { uint16_t startAddress = (uint16_t)RX_CONFIG_ALLOCATED_BYTES * (i - 1) + RX_CONFIG_EEPROM_START_ADDRESS; RxConfigData rxConfig; EEPROM.get(startAddress, rxConfig); RxConfigs[i - 1] = rxConfig; } } RxConfigData getRxConfig(uint8_t rxId) { uint16_t address = (uint16_t)RX_CONFIG_ALLOCATED_BYTES * (rxId - 1) + RX_CONFIG_EEPROM_START_ADDRESS; RxConfigData rxConfig; EEPROM.get(address, rxConfig); return rxConfig; } void clearEeprom() { for (int i = 0 ; i < EEPROM.length() ; i++) { EEPROM.update(i, 0); } softReset(); } void setFunctionValues() { Aux1Bounce.update(); Aux2Bounce.update(); Aux3Bounce.update(); Aux4Bounce.update(); Aux5Bounce.update(); MenuBounce.update(); int pressedButtonIndex = -1; if (MenuBounce.read() == LOW) { if (!MenuPressed) { MenuPressed = true; pressedButtonIndex = 0; BuzzerTimesToBeep = 1; } } else { MenuPressed = false; } if (Aux1Bounce.read() == LOW) { if (!Aux1Pressed) { Aux1Pressed = true; pressedButtonIndex = 2; BuzzerTimesToBeep = 1; } } else { Aux1Pressed = false; } if (Aux4Bounce.read() == LOW) { if (!Aux4Pressed) { Aux4Pressed = true; pressedButtonIndex = 1; BuzzerTimesToBeep = 1; } } else { Aux4Pressed = false; } if (Aux5Bounce.read() == LOW) { if (!Aux5Pressed) { Aux5Pressed = true; pressedButtonIndex = 3; BuzzerTimesToBeep = 1; } } else { Aux5Pressed = false; } if (Aux3Bounce.read() == LOW) { if (!Aux3Pressed) { Aux3Pressed = true; pressedButtonIndex = 4; BuzzerTimesToBeep = 1; } } else { Aux3Pressed = false; } if (pressedButtonIndex > -1) { if (CurrentFunctionIndex == 0) { //Currently at Main Menu switch (pressedButtonIndex) { case 0: //Cancel break; case 1: //Confirm CurrentFunctionIndex = SelectedFunctionIndex; readEeprom(); break; case 2: //Up SelectedFunctionIndex--; break; case 3: //Down SelectedFunctionIndex++; break; } uint8_t functionCount = sizeof(Functions) / sizeof(Functions[0]); if (SelectedFunctionIndex > functionCount) SelectedFunctionIndex = 1; if (SelectedFunctionIndex < 1) SelectedFunctionIndex = functionCount; } else if (CurrentFunctionIndex == 1) { //Currently at Transmitter Id function switch (pressedButtonIndex) { case 0: //Cancel CurrentFunctionIndex = 0; break; case 1: //Confirm EEPROM.put(RADIO_UNIQUE_ID_EEPROM_ADDRESS, RadioUniqueId); break; case 2: //Up RadioUniqueId++; break; case 3: //Down RadioUniqueId--; break; //case 4: //Move Position TODO: make it easier to change value by each digit } if (RadioUniqueId < RADIO_UNIQUE_ID_LOWER_BOUNDARY) RadioUniqueId = RADIO_UNIQUE_ID_UPPER_BOUNDARY; if (RadioUniqueId > RADIO_UNIQUE_ID_UPPER_BOUNDARY) RadioUniqueId = RADIO_UNIQUE_ID_LOWER_BOUNDARY; } else if (CurrentFunctionIndex == 2) { //Currently at Radio PA Level function switch (pressedButtonIndex) { case 0: //Cancel CurrentFunctionIndex = 0; break; case 1: //Confirm EEPROM.update(RADIO_PA_LEVEL_INDEX_EEPROM_ADDRESS, RadioPaLevelIndex); break; case 2: //Up RadioPaLevelIndex++; break; case 3: //Down RadioPaLevelIndex--; break; } if (RadioPaLevelIndex < RADIO_PA_LEVEL_INDEX_LOWER_BOUNDARY) RadioPaLevelIndex = RADIO_PA_LEVEL_INDEX_UPPER_BOUNDARY; if (RadioPaLevelIndex > RADIO_PA_LEVEL_INDEX_UPPER_BOUNDARY) RadioPaLevelIndex = RADIO_PA_LEVEL_INDEX_LOWER_BOUNDARY; } else if (CurrentFunctionIndex == 3) { //Currently at RX Selection function switch (pressedButtonIndex) { case 0: //Cancel SelectedRxId = CurrentRxId; CurrentFunctionIndex = 0; break; case 1: //Confirm #ifdef DEBUG_MODE Serial.print(""SelectedRxId: ""); Serial.println(SelectedRxId); #endif CurrentRxId = SelectedRxId; EEPROM.update(CURRENT_RX_ID_EEPROM_ADDRESS, CurrentRxId); strcpy(RxConfigurationName, RxConfigs[CurrentRxId - 1].Name); RxConfigurationChannel = RxConfigs[CurrentRxId - 1].RadioChannel; RxConfigurationIndex = 0; RxConfigurationNameIndex = 0; CurrentFunctionIndex = 10; // 10 for RX Configuration function break; case 2: //Up SelectedRxId--; break; case 3: //Down SelectedRxId++; break; } if (SelectedRxId < CURRENT_RX_ID_LOWER_BOUNDARY) SelectedRxId = CURRENT_RX_ID_UPPER_BOUNDARY; if (SelectedRxId > CURRENT_RX_ID_UPPER_BOUNDARY) SelectedRxId = CURRENT_RX_ID_LOWER_BOUNDARY; } else if (CurrentFunctionIndex == 4) { //Currently at Wipe All Data function switch (pressedButtonIndex) { case 0: //Cancel CurrentFunctionIndex = 0; break; case 1: //Confirm clearEeprom(); break; } } else if (CurrentFunctionIndex == 10) { //Currently at RX Configuration function switch (pressedButtonIndex) { case 0: //Cancel CurrentFunctionIndex = 0; break; case 1: //Confirm strcpy(RxConfigs[CurrentRxId - 1].Name, RxConfigurationName); RxConfigs[CurrentRxId - 1].RadioChannel = RxConfigurationChannel; EEPROM.put(RX_CONFIG_EEPROM_START_ADDRESS + (CurrentRxId - 1) * RX_CONFIG_ALLOCATED_BYTES, RxConfigs[CurrentRxId - 1]); break; case 2: //Up switch (RxConfigurationIndex) { case 0: //RX Name RxConfigurationName[RxConfigurationNameIndex] -= 1; if (RxConfigurationName[RxConfigurationNameIndex] < 32) RxConfigurationName[RxConfigurationNameIndex] = 126; break; case 1: //RX Channel RxConfigurationChannel++; if (RxConfigurationChannel > RADIO_CHANNEL_UPPER_BOUNDARY) RxConfigurationChannel = RADIO_CHANNEL_LOWER_BOUNDARY; } break; case 3: //Down switch (RxConfigurationIndex) { case 0: //RX Name #ifdef DEBUG_MODE Serial.println(RxConfigurationName); #endif RxConfigurationName[RxConfigurationNameIndex] += 1; if (RxConfigurationName[RxConfigurationNameIndex] > 126) RxConfigurationName[RxConfigurationNameIndex] = 32; #ifdef DEBUG_MODE Serial.println(RxConfigurationName); #endif break; case 1: //RX Channel RxConfigurationChannel--; if (RxConfigurationChannel < RADIO_CHANNEL_LOWER_BOUNDARY) RxConfigurationChannel = RADIO_CHANNEL_UPPER_BOUNDARY; } break; case 4: //Move Position if (RxConfigurationIndex == 0) { RxConfigurationNameIndex++; if (RxConfigurationNameIndex > 8) { //TODO: Make it globle variable RxConfigurationNameIndex = 0; RxConfigurationIndex = 1; } } else { RxConfigurationIndex = 0; } break; } } else { //Other function } } } void setTime(unsigned long currentMillis) { if (currentMillis - TimerRefreshLastMillis >= TimerRefreshInterval) { TimerRefreshLastMillis = currentMillis; if (Aux1Value > 0) Timer_Seconds++; else Timer_Seconds = 0; #ifdef SHOW_RATE SendRate = SendCount; LoopRate = LoopCount; SendCount = 0; LoopCount = 0; #endif } } void resetData() { //Value 1000 - 2000, 1500 is middle/neutral data.Throttle = 1000; data.Yaw = 1500; data.Pitch = 1500; data.Roll = 1500; data.Aux1 = 1000; data.Aux2 = 1000; data.Aux3 = 1000; data.Aux4 = 1000; data.Aux5 = 1000; data.Aux6 = 1000; } uint16_t mapJoystickValues(uint16_t val, uint16_t lower, uint16_t middle, uint16_t upper, bool reverse) { val = constrain(val, lower, upper); if (val < middle) val = map(val, lower, middle, 1000, 1500); else val = map(val, middle, upper, 1500, 2000); return reverse ? 3000 - val : val; } //TODO: Implement trimming function void setButtonsValue(unsigned long currentMillis) { Aux1Bounce.update(); Aux2Bounce.update(); Aux3Bounce.update(); Aux4Bounce.update(); Aux5Bounce.update(); MenuBounce.update(); if (Aux1Bounce.read() == LOW) { if (!Aux1Pressed) { if (TrimmingMode) { switch (CurrentTrimmingIndex) { case 0: //Yaw if (RxConfigs[CurrentRxId - 1].YawTrim >= RX_TRIM_STEP_RANGE) { RxConfigs[CurrentRxId - 1].YawTrim = RX_TRIM_STEP_RANGE; } else { RxConfigs[CurrentRxId - 1].YawTrim++; if (RxConfigs[CurrentRxId - 1].YawTrim == 0) BuzzerTimesToBeep = 3; else BuzzerTimesToBeep = 1; } break; case 1: //Throttle if (RxConfigs[CurrentRxId - 1].ThrottleTrim >= RX_TRIM_STEP_RANGE) { RxConfigs[CurrentRxId - 1].ThrottleTrim = RX_TRIM_STEP_RANGE; } else { RxConfigs[CurrentRxId - 1].ThrottleTrim++; if (RxConfigs[CurrentRxId - 1].ThrottleTrim == 0) BuzzerTimesToBeep = 3; else BuzzerTimesToBeep = 1; } break; case 2: //Pitch if (RxConfigs[CurrentRxId - 1].PitchTrim >= RX_TRIM_STEP_RANGE) { RxConfigs[CurrentRxId - 1].PitchTrim = RX_TRIM_STEP_RANGE; } else { RxConfigs[CurrentRxId - 1].PitchTrim++; if (RxConfigs[CurrentRxId - 1].PitchTrim == 0) BuzzerTimesToBeep = 3; else BuzzerTimesToBeep = 1; } break; case 3: //Roll if (RxConfigs[CurrentRxId - 1].RollTrim >= RX_TRIM_STEP_RANGE) { RxConfigs[CurrentRxId - 1].RollTrim = RX_TRIM_STEP_RANGE; } else { RxConfigs[CurrentRxId - 1].RollTrim++; if (RxConfigs[CurrentRxId - 1].RollTrim == 0) BuzzerTimesToBeep = 3; else BuzzerTimesToBeep = 1; } break; } EEPROM.put(RX_CONFIG_EEPROM_START_ADDRESS + (CurrentRxId - 1) * RX_CONFIG_ALLOCATED_BYTES, RxConfigs[CurrentRxId - 1]); } else { //For safty prevent arming when throttle is not off if (data.Throttle > 1000) { BuzzerTimesToBeep = 5; return; } Aux1Value++; if (Aux1Value > AUX1_VALUE_UPPER_BOUNDARY) { Aux1Value = AUX1_VALUE_LOWER_BOUNDARY; } Aux1Pressed = true; BuzzerTimesToBeep = Aux1Value + 1; } } } else { Aux1Pressed = false; } if (Aux2Bounce.read() == LOW) { if (!Aux2Pressed) { Aux2Value++; if (Aux2Value > AUX2_VALUE_UPPER_BOUNDARY) { Aux2Value = AUX2_VALUE_LOWER_BOUNDARY; } Aux2Pressed = true; BuzzerTimesToBeep = Aux2Value + 1; } } else { Aux2Pressed = false; } if (Aux3Bounce.read() == LOW) { if (!Aux3Pressed) { if (TrimmingMode) { CurrentTrimmingIndex++; if (CurrentTrimmingIndex > 3) CurrentTrimmingIndex = 0; } else { Aux3Value++; if (Aux3Value > AUX3_VALUE_UPPER_BOUNDARY) { Aux3Value = AUX3_VALUE_LOWER_BOUNDARY; } Aux3Pressed = true; BuzzerTimesToBeep = Aux3Value + 1; } } } else { Aux3Pressed = false; } if (Aux4Bounce.read() == LOW) { if (!Aux4Pressed) { Aux4Value++; if (Aux4Value > AUX4_VALUE_UPPER_BOUNDARY) { Aux4Value = AUX4_VALUE_LOWER_BOUNDARY; } Aux4Pressed = true; BuzzerTimesToBeep = Aux4Value + 1; } } else { Aux4Pressed = false; } if (Aux5Bounce.read() == LOW) { if (!Aux5Pressed) { if (TrimmingMode) { switch (CurrentTrimmingIndex) { case 0: //Yaw if (RxConfigs[CurrentRxId - 1].YawTrim <= -RX_TRIM_STEP_RANGE) { RxConfigs[CurrentRxId - 1].YawTrim = -RX_TRIM_STEP_RANGE; } else { RxConfigs[CurrentRxId - 1].YawTrim--; if (RxConfigs[CurrentRxId - 1].YawTrim == 0) BuzzerTimesToBeep = 3; else BuzzerTimesToBeep = 1; } break; case 1: //Throttle if (RxConfigs[CurrentRxId - 1].ThrottleTrim <= -RX_TRIM_STEP_RANGE) { RxConfigs[CurrentRxId - 1].ThrottleTrim = -RX_TRIM_STEP_RANGE; } else { RxConfigs[CurrentRxId - 1].ThrottleTrim--; if (RxConfigs[CurrentRxId - 1].ThrottleTrim == 0) BuzzerTimesToBeep = 3; else BuzzerTimesToBeep = 1; } break; case 2: //Pitch if (RxConfigs[CurrentRxId - 1].PitchTrim <= -RX_TRIM_STEP_RANGE) { RxConfigs[CurrentRxId - 1].PitchTrim = -RX_TRIM_STEP_RANGE; } else { RxConfigs[CurrentRxId - 1].PitchTrim--; if (RxConfigs[CurrentRxId - 1].PitchTrim == 0) BuzzerTimesToBeep = 3; else BuzzerTimesToBeep = 1; } break; case 3: //Roll if (RxConfigs[CurrentRxId - 1].RollTrim <= -RX_TRIM_STEP_RANGE) { RxConfigs[CurrentRxId - 1].RollTrim = -RX_TRIM_STEP_RANGE; } else { RxConfigs[CurrentRxId - 1].RollTrim--; if (RxConfigs[CurrentRxId - 1].RollTrim == 0) BuzzerTimesToBeep = 3; else BuzzerTimesToBeep = 1; } break; } EEPROM.put(RX_CONFIG_EEPROM_START_ADDRESS + (CurrentRxId - 1) * RX_CONFIG_ALLOCATED_BYTES, RxConfigs[CurrentRxId - 1]); } else { Aux5Value++; if (Aux5Value > AUX5_VALUE_UPPER_BOUNDARY) { Aux5Value = AUX5_VALUE_LOWER_BOUNDARY; } Aux5Pressed = true; BuzzerTimesToBeep = Aux5Value + 1; } } } else { Aux5Pressed = false; } if (MenuBounce.read() == LOW) { if (!MenuPressed) { // if (TrimmingMode) { // BuzzerTimesToBeep = 1; // TrimmingMode = false; // } else { // BuzzerTimesToBeep = 5; // TrimmingMode = true; // } // CurrentTrimmingIndex = 0; MenuPressed = true; } else { MenuPressed = false; } } } void readBatteryVoltage(unsigned long currentMillis) { if (currentMillis - BatteryVoltageReadLastMillis >= BatteryVoltageReadInterval) { BatteryVoltageReadLastMillis = currentMillis; uint8_t batteryVoltageSampleCount = 10; //Some value greater than 4 would make sense, keep it small though. uint16_t batteryVoltageValues[batteryVoltageSampleCount]; for (uint8_t i = 0; i < batteryVoltageSampleCount; i++) { batteryVoltageValues[i] = analogRead(V_BATTERY_PIN); } sort(batteryVoltageValues, batteryVoltageSampleCount); uint16_t aggregatedValue = 0; for (uint8_t i = 2; i < batteryVoltageSampleCount - 2; i++) { aggregatedValue += batteryVoltageValues[i]; } uint16_t averageValue = aggregatedValue / (batteryVoltageSampleCount - 4); // Here using 4.7k/10k voltage divider, adjust up 3%. uint8_t adjustPersentage = 3; BatteryVoltage = averageValue * 0.1007937 * (100 + adjustPersentage); // (147 / 47) * 33 / 1024) #ifdef DEBUG_MODE Serial.print(""Voltage: ""); Serial.println(BatteryVoltage); #endif if (BatteryVoltage < LowBatteryVoltageThreshold) { BuzzerTimesToBeep = 10; } } } void beepBuzzer(unsigned long currentMillis) { if (!BuzzerEnabled) return; if (BuzzerTimesToBeep > 0 || BuzzerState == HIGH) { if (currentMillis - BuzzerBeepLastMillis >= BuzzerBeepInterval) { BuzzerBeepLastMillis = currentMillis; if (BuzzerState == LOW) { BuzzerState = HIGH; BuzzerTimesToBeep--; } else { BuzzerState = LOW; } digitalWrite(BUZZER_PIN, BuzzerState); } } } void getPayloadData() { data.UniqueId = RadioUniqueId; //Get the middle value for Yaw, Pitch and Roll from Serial Monitor data.Throttle = mapJoystickValues(analogRead(THROTTLE_PIN), 0, 511, 1023, false ) + RxConfigs[CurrentRxId - 1].ThrottleTrim * RX_TRIM_STEP_WIDTH; data.Yaw = mapJoystickValues(analogRead(YAW_PIN), 0, 515, 1023, true ) + RxConfigs[CurrentRxId - 1].YawTrim * RX_TRIM_STEP_WIDTH; data.Pitch = mapJoystickValues(analogRead(PITCH_PIN), 0, 513, 1023, false ) + RxConfigs[CurrentRxId - 1].PitchTrim * RX_TRIM_STEP_WIDTH; data.Roll = mapJoystickValues(analogRead(ROLL_PIN), 0, 504, 1023, true ) + RxConfigs[CurrentRxId - 1].RollTrim * RX_TRIM_STEP_WIDTH; data.Aux1 = map(Aux1Value, AUX1_VALUE_LOWER_BOUNDARY, AUX1_VALUE_UPPER_BOUNDARY, 1000, 2000); data.Aux2 = map(Aux2Value, AUX2_VALUE_LOWER_BOUNDARY, AUX2_VALUE_UPPER_BOUNDARY, 1000, 2000); data.Aux3 = map(Aux3Value, AUX3_VALUE_LOWER_BOUNDARY, AUX3_VALUE_UPPER_BOUNDARY, 1000, 2000); data.Aux4 = map(Aux4Value, AUX4_VALUE_LOWER_BOUNDARY, AUX4_VALUE_UPPER_BOUNDARY, 1000, 2000); data.Aux5 = map(Aux5Value, AUX5_VALUE_LOWER_BOUNDARY, AUX5_VALUE_UPPER_BOUNDARY, 1000, 2000); data.Aux6 = mapJoystickValues(analogRead(AUX6_PIN), 0, 511, 1023, false ); //#ifdef DEBUG_MODE // Serial.print(""Throttle: ""); Serial.print(analogRead(THROTTLE_PIN)); Serial.print("" ""); // Serial.print(""Yaw: ""); Serial.print(analogRead(YAW_PIN)); Serial.print("" ""); // Serial.print(""Pitch: ""); Serial.print(analogRead(PITCH_PIN)); Serial.print("" ""); // Serial.print(""Roll: ""); Serial.print(analogRead(ROLL_PIN)); Serial.print("" ""); // Serial.print(""Aux1: ""); Serial.print(Aux1Value); Serial.print("" ""); // Serial.print(""Aux2: ""); Serial.print(Aux2Value); Serial.print("" ""); // Serial.print(""Aux3: ""); Serial.print(Aux3Value); Serial.print("" ""); // Serial.print(""Aux4: ""); Serial.print(Aux4Value); Serial.print("" ""); // Serial.print(""Aux5: ""); Serial.print(Aux5Value); Serial.print("" ""); // Serial.print(""Aux6: ""); Serial.print(analogRead(AUX6_PIN)); Serial.print(""\\n""); // // Serial.print(""UniqueId: ""); Serial.print(data.UniqueId); Serial.print("" ""); // Serial.print(""Throttle: ""); Serial.print(data.Throttle); Serial.print("" ""); // Serial.print(""Yaw: ""); Serial.print(data.Yaw); Serial.print("" ""); // Serial.print(""Pitch: ""); Serial.print(data.Pitch); Serial.print("" ""); // Serial.print(""Roll: ""); Serial.print(data.Roll); Serial.print("" ""); // Serial.print(""Aux1: ""); Serial.print(data.Aux1); Serial.print("" ""); // Serial.print(""Aux2: ""); Serial.print(data.Aux2); Serial.print("" ""); // Serial.print(""Aux3: ""); Serial.print(data.Aux3); Serial.print("" ""); // Serial.print(""Aux4: ""); Serial.print(data.Aux4); Serial.print("" ""); // Serial.print(""Aux5: ""); Serial.print(data.Aux5); Serial.print("" ""); // Serial.print(""Aux6: ""); Serial.print(data.Aux6); Serial.print(""\\n""); //#endif } void sendPayloadData(unsigned long currentMillis) { if (currentMillis - RadioSendLastMillis >= RadioSendInterval) { RadioSendLastMillis = currentMillis; getPayloadData(); radio.write(&data, sizeof(MyData)); #ifdef SHOW_RATE SendCount++; #endif } } void drawFunctionWelcomeScreen() { u8g2.firstPage(); do { char versionText[15] = ""AffoFly V""; strcat(versionText, VERSION_NUMBER); u8g2.drawStr(0, 10, versionText); u8g2.drawLine(0, 15, 128, 15); } while (u8g2.nextPage()); } void refreshFunctionOperationScreen(unsigned long currentMillis) { if (currentMillis - ScreenRefreshLastMillis >= ScreenRefreshInterval) { ScreenRefreshLastMillis = currentMillis; u8g2.firstPage(); do { switch (CurrentFunctionIndex) { case 0: //Main screen drawFunctionMainScreen(); #ifdef SHOW_RATE drawRate(); #endif break; case 1: //Transmitter ID screen drawFunctionTransmitterIdScreen(); break; case 2: //Radio PA Level screen drawFunctionRadioPaLevelScreen(); break; case 3: //RX Selection screen drawFunctionRxSelectionScreen(); break; case 4: //Wipe All Data screen drawFunctionWipeEepromScreen(); break; case 10: //RX Configuration screen drawFunctionRxConfigurationScreen(); break; } } while (u8g2.nextPage()); } } void drawFunctionMainScreen() { u8g2.drawStr(0, 10, ""Functions""); u8g2.drawLine(0, 15, 128, 15); uint8_t functionCount = sizeof(Functions) / sizeof(Functions[0]); uint8_t menuItemStartX = 10; uint8_t menuItemStartY = 25; uint8_t lineHeight = 12; for (uint8_t i = 0; i < functionCount; i++) { u8g2.drawStr(menuItemStartX, menuItemStartY, Functions[i]); menuItemStartY += lineHeight; } uint8_t selectionBoxStartX = 1; uint8_t selectionBoxStartY = 19; uint8_t selectionBoxWidth = 4; uint8_t selectionBoxHeight = 4; selectionBoxStartY += lineHeight * (SelectedFunctionIndex - 1); u8g2.drawBox(selectionBoxStartX, selectionBoxStartY, selectionBoxWidth, selectionBoxHeight); } void drawFunctionTransmitterIdScreen() { u8g2.drawStr(0, 10, ""Transmitter ID""); u8g2.drawLine(0, 15, 128, 15); char strRadioUniqueId[5] = """"; itoa(RadioUniqueId, strRadioUniqueId, 10); u8g2.drawStr(50, 40, strRadioUniqueId); } void drawFunctionRadioPaLevelScreen() { u8g2.drawStr(0, 10, ""Radio PA Level""); u8g2.drawLine(0, 15, 128, 15); u8g2.drawStr(50, 40, RadioPaLevels[RadioPaLevelIndex].PaName); } void drawFunctionRxSelectionScreen() { u8g2.drawStr(0, 10, ""Select RX""); char finalText[3] = """"; getRxIdStr(finalText, CurrentRxId); u8g2.drawStr(115, 10, finalText); u8g2.drawLine(0, 15, 128, 15); uint8_t pageSize = 4; uint8_t currentPage = SelectedRxId / pageSize; if (SelectedRxId % pageSize != 0 ) { currentPage += 1; } uint8_t startRxId = (currentPage - 1) * pageSize + 1; uint8_t menuItemStartX = 10; uint8_t menuItemStartY = 25; uint8_t lineHeight = 12; for (uint8_t i = 0; i < pageSize; i++) { if (startRxId + i > CURRENT_RX_ID_UPPER_BOUNDARY) break; char finalText[15] = """"; uint8_t rxId = RxConfigs[startRxId + i - 1].Id; getRxIdStr(finalText, rxId); strcat(finalText, "" ""); strcat(finalText, RxConfigs[startRxId + i - 1].Name); u8g2.drawStr(menuItemStartX, menuItemStartY, finalText); menuItemStartY += lineHeight; } uint8_t selectionBoxStartX = 1; uint8_t selectionBoxStartY = 19; uint8_t selectionBoxWidth = 4; uint8_t selectionBoxHeight = 4; uint8_t selectionIndexOnPage = SelectedRxId % pageSize; if (selectionIndexOnPage == 0) selectionIndexOnPage = 4; selectionBoxStartY += lineHeight * (selectionIndexOnPage - 1); u8g2.drawBox(selectionBoxStartX, selectionBoxStartY, selectionBoxWidth, selectionBoxHeight); } void drawFunctionRxConfigurationScreen() { u8g2.drawStr(0, 10, ""RX Configuration""); char finalText[3] = """"; getRxIdStr(finalText, CurrentRxId); u8g2.drawStr(115, 10, finalText); u8g2.drawLine(0, 15, 128, 15); uint8_t menuItemStartY = 25; uint8_t lineHeight = 12; char rxNameText[17] = ""Name: ""; strcat(rxNameText, RxConfigurationName); u8g2.drawStr(0, menuItemStartY, rxNameText); char rxChannelText[13] = ""Channel: ""; char channelText[4] = """"; itoa(RxConfigurationChannel, channelText, 10); strcat(rxChannelText, channelText); u8g2.drawStr(0, menuItemStartY + lineHeight, rxChannelText); if (RxConfigurationIndex == 0) { uint8_t firstLetterStartX = 36; uint8_t letterWidth = 5; uint8_t startX = firstLetterStartX + RxConfigurationNameIndex * letterWidth + RxConfigurationNameIndex; u8g2.drawLine(startX, menuItemStartY + 1, startX + letterWidth, menuItemStartY + 1); } else if (RxConfigurationIndex == 1) { uint8_t channelNumberStartX = 54; uint8_t channelNumberWidth = 17; u8g2.drawLine(channelNumberStartX, menuItemStartY + lineHeight + 1, channelNumberStartX + channelNumberWidth, menuItemStartY + lineHeight + 1); } else { } } void drawFunctionWipeEepromScreen() { u8g2.drawStr(0, 10, ""Wipe All Data""); u8g2.drawLine(0, 15, 128, 15); u8g2.drawStr(25, 40, ""Are you sure?""); } //TODO: re-arrange screen real estate void refreshControlScreen(unsigned long currentMillis) { if (currentMillis - ScreenRefreshLastMillis >= ScreenRefreshInterval) { ScreenRefreshLastMillis = currentMillis; u8g2.firstPage(); do { drawBattery(4200, 3400, BatteryVoltage, 0); #ifdef SHOW_RATE drawRate(); #endif drawTimer(); drawRx(); drawFlightMode(); drawTrim(); drawAuxStatus(75, 28, ""A3"", data.Aux3); drawAuxStatus(75, 40, ""A4"", data.Aux4); drawAuxStatus(75, 52, ""A5"", data.Aux5); drawAuxStatus(75, 64, ""A6"", data.Aux6); //drawJoystick(0, 18, data.Yaw, data.Throttle); //drawJoystick(88, 18, data.Roll, data.Pitch); } while (u8g2.nextPage()); } } void drawBattery(uint16_t maxVotage, uint16_t minVotage, uint16_t actualVotage, uint8_t startX) { u8g2.drawFrame(startX, 1, 35, 15); u8g2.drawLine(startX + 35, 5, startX + 35, 11); u8g2.drawLine(startX + 36, 6, startX + 36, 10); int8_t percentage = 0; if (actualVotage > minVotage) { percentage = (float)(actualVotage - minVotage) / (maxVotage - minVotage) * 100; while (percentage > 0) { startX += 3; u8g2.drawFrame(startX, 3, 2, 11); percentage -= 10; } } char finalText[6] = """"; dtostrf((float)actualVotage / 1000, 6, 2, finalText); strcat(finalText, ""v""); u8g2.drawStr(30, 13, finalText); } void drawRate() { if (Aux1Value == 0) { char text[12] = """"; char sendRateText[4] = """"; char loopRateText[5] = """"; itoa(SendRate, sendRateText, 10); itoa(LoopRate, loopRateText, 10); strcat(text, sendRateText); strcat(text, ""|""); strcat(text, loopRateText); u8g2.drawStr(80, 13, text); } } void drawTimer() { if (Aux1Value > 0) { u8g2.drawFrame(91, 1, 37, 15); char minutes_str[3]; char seconds_str[3]; char time_str[6] = """"; uint8_t minute = (int)Timer_Seconds / 60; uint8_t second = Timer_Seconds % 60; itoa(minute, minutes_str, 10); itoa(second, seconds_str, 10); if (minute < 10) { strcat(time_str, ""0""); } strcat(time_str, minutes_str); strcat(time_str, "":""); if (second < 10) { strcat(time_str, ""0""); } strcat(time_str, seconds_str); u8g2.drawStr(95, 13, time_str); } } void drawRx() { char finalText[7] = ""RX: ""; char rxIdText[3] = """"; getRxIdStr(rxIdText, CurrentRxId); strcat(finalText, rxIdText); u8g2.drawStr(0, 28, finalText); } void drawFlightMode() { u8g2.drawStr(0, 40, FlightMode[Aux2Value]); } //TODO: redeign trimmer style void drawTrim() { u8g2.drawStr(0, 52, ""Y""); if (TrimmingMode && CurrentTrimmingIndex == 0) { u8g2.drawLine(0, 52, 5, 52); } u8g2.drawLine(9, 48, 40, 48); u8g2.drawLine(25, 47, 25, 49); //Neutral mark uint8_t yawTrim = RxConfigs[CurrentRxId - 1].YawTrim; u8g2.drawLine(25 + yawTrim, 46, 25 + yawTrim, 50); u8g2.drawStr(0, 64, ""R""); if (TrimmingMode && CurrentTrimmingIndex == 3) { u8g2.drawLine(0, 63, 5, 63); } u8g2.drawLine(9, 60, 40, 60); u8g2.drawLine(25, 59, 25, 61); //Neutral mark uint8_t rollTrim = RxConfigs[CurrentRxId - 1].RollTrim; u8g2.drawLine(25 + rollTrim, 58, 25 + rollTrim, 62); u8g2.drawStr(48, 64, ""T""); u8g2.drawLine(50, 20, 50, 51); u8g2.drawLine(49, 36, 51, 36); //Neutral mark uint8_t throttleTrim = RxConfigs[CurrentRxId - 1].ThrottleTrim; u8g2.drawLine(48, 36 + throttleTrim, 52, 36 + throttleTrim); u8g2.drawStr(60, 64, ""P""); u8g2.drawLine(62, 20, 62, 51); u8g2.drawLine(61, 36, 63, 36); //Neutral mark uint8_t pitchTrim = RxConfigs[CurrentRxId - 1].PitchTrim; u8g2.drawLine(60, 36 + pitchTrim, 64, 36 + pitchTrim); } void drawAuxStatus(uint8_t startX, uint8_t startY, char channel[2], uint16_t value) { u8g2.drawStr(startX, startY, channel); u8g2.drawFrame(startX + 13, startY - 8, 40, 8); uint16_t len = (value - 1000) / 25; //#ifdef DEBUG_MODE // Serial.print(channel); Serial.print("": ""); Serial.print(value); Serial.print("" ""); Serial.println(len); //#endif u8g2.drawBox(startX + 13, startY - 8, len, 8); } void drawJoystick(byte startX, byte startY, byte valueX, byte valueY) { u8g2.drawFrame(startX, startY, 40, 40); float positionX = map(valueX, 0, 255, startX + 4, startX + 40 - 4); float positionY = map(valueY, 0, 255, startY + 40 - 4, startY + 4); if (positionX < startX + 4) positionX = startX + 4; if (positionX > startX + 40 - 5) positionX = startX + 40 - 5; if (positionY < startY + 4) positionY = startY + 4; if (positionY > startY + 40 - 5) positionY = startY + 40 - 5; u8g2.drawDisc(positionX, positionY, 3, U8G2_DRAW_ALL); } void drawSignal(byte percentage, byte startX) { if (percentage > 0) { u8g2.drawLine(startX, 13, startX, 15); //20% u8g2.drawLine(startX + 1, 13, startX + 1, 15); } if (percentage > 20) { u8g2.drawLine(startX + 4, 10, startX + 4, 15); u8g2.drawLine(startX + 5, 10, startX + 5, 15); } if (percentage > 40) { u8g2.drawLine(startX + 8, 7, startX + 8, 15); u8g2.drawLine(startX + 9, 7, startX + 9, 15); } if (percentage > 60) { u8g2.drawLine(startX + 12, 4, startX + 12, 15); u8g2.drawLine(startX + 13, 4, startX + 13, 15); } if (percentage > 80) { u8g2.drawLine(startX + 16, 1, startX + 16, 15); u8g2.drawLine(startX + 17, 1, startX + 17, 15); } } void getRxIdStr(char* outStr, uint8_t rxId) { char finalText[3] = """"; char rxIdText[3] = """"; itoa(rxId, rxIdText, 10); if (rxId < 10) { strcat(finalText, ""0""); } strcat(finalText, rxIdText); strcpy(outStr, finalText); } void sort(int *a, int n) { for (int i = 1; i < n; ++i) { int j = a[i]; int k; for (k = i - 1; (k >= 0) && (j < a[k]); k--) { a[k + 1] = a[k]; } a[k + 1] = j; } } void softReset() { asm volatile ("" jmp 0""); } ",12518,False,2121.9942239563275,median "/* FlipMode.ino Universal 8bit Graphics Library (https://github.com/olikraus/u8g2/) Copyright (c) 2016, olikraus@gmail.com All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #ifdef U8X8_HAVE_HW_SPI #include #endif #ifdef U8X8_HAVE_HW_I2C #include #endif /* Preconditions: Uno with DOGS102 Shield */ // Please UNCOMMENT one of the contructor lines below // U8g2 Contructor List (Picture Loop Page Buffer) // The complete list is available here: https://github.com/olikraus/u8g2/wiki/u8g2setupcpp // Please update the pin numbers according to your setup. Use U8X8_PIN_NONE if the reset pin is not connected //U8G2_NULL u8g2(U8G2_R0); // null device, a 8x8 pixel display which does nothing //U8G2_SSD1306_128X64_NONAME_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1306_128X64_NONAME_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 12, /* dc=*/ 4, /* reset=*/ 6); // Arduboy (Production, Kickstarter Edition) //U8G2_SSD1306_128X64_NONAME_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1306_128X64_NONAME_1_3W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* reset=*/ 8); //U8G2_SSD1306_128X64_NONAME_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); //U8G2_SSD1306_128X64_ALT0_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); // same as the NONAME variant, but may solve the ""every 2nd line skipped"" problem //U8G2_SSD1306_128X64_NONAME_1_SW_I2C u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* reset=*/ 8); //U8G2_SSD1306_128X64_NONAME_1_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // All Boards without Reset of the Display //U8G2_SSD1306_128X64_NONAME_1_SW_I2C u8g2(U8G2_R0, /* clock=*/ 16, /* data=*/ 17, /* reset=*/ U8X8_PIN_NONE); // ESP32 Thing, pure SW emulated I2C //U8G2_SSD1306_128X64_NONAME_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE, /* clock=*/ 16, /* data=*/ 17); // ESP32 Thing, HW I2C with pin remapping //U8G2_SSD1306_128X64_NONAME_1_6800 u8g2(U8G2_R0, 13, 11, 2, 3, 4, 5, 6, A4, /*enable=*/ 7, /*cs=*/ 10, /*dc=*/ 9, /*reset=*/ 8); //U8G2_SSD1306_128X64_NONAME_1_8080 u8g2(U8G2_R0, 13, 11, 2, 3, 4, 5, 6, A4, /*enable=*/ 7, /*cs=*/ 10, /*dc=*/ 9, /*reset=*/ 8); //U8G2_SSD1306_128X64_VCOMH0_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but maximizes setContrast() range //U8G2_SSD1306_128X64_ALT0_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but may solve the ""every 2nd line skipped"" problem //U8G2_SH1106_128X64_NONAME_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SH1106_128X64_NONAME_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); //U8G2_SH1106_128X64_VCOMH0_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but maximizes setContrast() range //U8G2_SH1106_128X64_WINSTAR_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but uses updated SH1106 init sequence //U8G2_SH1106_72X40_WISE_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SH1107_64X128_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SH1107_128X128_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SH1107_128X128_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); //U8G2_SH1107_SEEED_96X96_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SH1108_160X160_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SH1122_256X64_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8G2_16BIT in u8g2.h //U8G2_SSD1306_128X32_UNIVISION_1_SW_I2C u8g2(U8G2_R0, /* clock=*/ 21, /* data=*/ 20, /* reset=*/ U8X8_PIN_NONE); // Adafruit Feather M0 Basic Proto + FeatherWing OLED //U8G2_SSD1306_128X32_UNIVISION_1_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // Adafruit Feather ESP8266/32u4 Boards + FeatherWing OLED //U8G2_SSD1306_128X32_UNIVISION_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); // Adafruit ESP8266/32u4/ARM Boards + FeatherWing OLED //U8G2_SSD1306_128X32_UNIVISION_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE, /* clock=*/ SCL, /* data=*/ SDA); // pin remapping with ESP8266 HW I2C //U8G2_SSD1306_64X48_ER_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); // EastRising 0.66"" OLED breakout board, Uno: A4=SDA, A5=SCL, 5V powered //U8G2_SSD1306_48X64_WINSTAR_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); //U8G2_SSD1306_64X32_NONAME_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); //U8G2_SSD1306_64X32_1F_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); //U8G2_SSD1306_96X16_ER_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); // EastRising 0.69"" OLED //U8G2_SSD1322_NHD_256X64_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8G2_16BIT in u8g2.h //U8G2_SSD1322_NHD_256X64_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8G2_16BIT in u8g2.h //U8G2_SSD1322_NHD_128X64_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1322_NHD_128X64_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1325_NHD_128X64_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1325_NHD_128X64_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1326_ER_256X32_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // experimental driver for ER-OLED018-1 //U8G2_SSD1327_SEEED_96X96_1_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // Seeedstudio Grove OLED 96x96 //U8G2_SSD1327_SEEED_96X96_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); // Seeedstudio Grove OLED 96x96 //U8G2_SSD1327_EA_W128128_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1327_EA_W128128_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1327_EA_W128128_1_SW_I2C u8g2(U8G2_R0, /* clock=*/ 5, /* data=*/ 4, /* reset=*/ U8X8_PIN_NONE); //U8G2_SSD1327_EA_W128128_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); //U8G2_SSD1327_MIDAS_128X128_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1327_MIDAS_128X128_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1329_128X96_NONAME_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1329_128X96_NONAME_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1305_128X32_NONAME_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1305_128X32_NONAME_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1305_128X64_ADAFRUIT_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1305_128X64_ADAFRUIT_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1309_128X64_NONAME0_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1309_128X64_NONAME0_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1309_128X64_NONAME2_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1309_128X64_NONAME2_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_LD7032_60X32_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 11, /* data=*/ 12, /* cs=*/ 9, /* dc=*/ 10, /* reset=*/ 8); // SW SPI Nano Board //U8G2_LD7032_60X32_1_4W_SW_I2C u8g2(U8G2_R0, /* clock=*/ 11, /* data=*/ 12, /* reset=*/ U8X8_PIN_NONE); // NOT TESTED! //U8G2_UC1701_EA_DOGS102_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_UC1701_EA_DOGS102_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_PCD8544_84X48_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Nokia 5110 Display //U8G2_PCD8544_84X48_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Nokia 5110 Display //U8G2_PCF8812_96X65_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Could be also PCF8814 //U8G2_PCF8812_96X65_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Could be also PCF8814 //U8G2_HX1230_96X68_1_3W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* reset=*/ 8); //U8G2_HX1230_96X68_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_KS0108_128X64_1 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*dc=*/ 17, /*cs0=*/ 14, /*cs1=*/ 15, /*cs2=*/ U8X8_PIN_NONE, /* reset=*/ U8X8_PIN_NONE); // Set R/W to low! //U8G2_KS0108_ERM19264_1 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*dc=*/ 17, /*cs0=*/ 14, /*cs1=*/ 15, /*cs2=*/ 16, /* reset=*/ U8X8_PIN_NONE); // Set R/W to low! //U8G2_ST7920_192X32_1_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ U8X8_PIN_NONE, /*dc=*/ 17, /*reset=*/ U8X8_PIN_NONE); //U8G2_ST7920_192X32_1_SW_SPI u8g2(U8G2_R0, /* clock=*/ 18 /* A4 */ , /* data=*/ 16 /* A2 */, /* CS=*/ 17 /* A3 */, /* reset=*/ U8X8_PIN_NONE); //U8G2_ST7920_128X64_1_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18 /* A4 */, /*cs=*/ U8X8_PIN_NONE, /*dc/rs=*/ 17 /* A3 */, /*reset=*/ 15 /* A1 */); // Remember to set R/W to 0 //U8G2_ST7920_128X64_1_SW_SPI u8g2(U8G2_R0, /* clock=*/ 18 /* A4 */ , /* data=*/ 16 /* A2 */, /* CS=*/ 17 /* A3 */, /* reset=*/ U8X8_PIN_NONE); //U8G2_ST7920_128X64_1_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* CS=*/ 10, /* reset=*/ 8); //U8G2_ST7920_128X64_1_HW_SPI u8g2(U8G2_R0, /* CS=*/ 10, /* reset=*/ 8); //U8G2_ST7565_EA_DOGM128_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_EA_DOGM128_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_64128N_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_64128N_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_EA_DOGM132_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); // DOGM132 Shield //U8G2_ST7565_EA_DOGM132_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); // DOGM132 Shield //U8G2_ST7565_ZOLEN_128X64_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_ZOLEN_128X64_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_LM6059_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Adafruit ST7565 GLCD //U8G2_ST7565_LM6059_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Adafruit ST7565 GLCD //U8G2_ST7565_LX12864_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_LX12864_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_ERC12864_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_ERC12864_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_NHD_C12832_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_NHD_C12832_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_NHD_C12864_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_NHD_C12864_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_JLX12864_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_JLX12864_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7567_PI_132X64_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); // Pax Instruments Shield, LCD_BL=6 //U8G2_ST7567_PI_132X64_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); // Pax Instruments Shield, LCD_BL=6 //U8G2_ST7567_JLX12864_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7567_JLX12864_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7567_ENH_DG128064_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7567_ENH_DG128064_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7567_ENH_DG128064I_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7567_ENH_DG128064I_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST75256_JLX172104_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST75256_JLX172104_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST75256_JLX256128_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Uno, Enable U8g2 16 bit mode for this display //U8G2_ST75256_JLX256128_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Uno, Enable U8g2 16 bit mode for this display //U8G2_ST75256_JLX256128_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 9, /* data=*/ 8, /* cs=*/ 7, /* dc=*/ 6, /* reset=*/ 5); // MKR Zero, Enable U8g2 16 bit mode for this display //U8G2_ST75256_JLX256128_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 7, /* dc=*/ 6, /* reset=*/ 5); // MKR Zero, Enable U8g2 16 bit mode for this display //U8G2_ST75256_JLX256160_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Uno, Enable U8g2 16 bit mode for this display //U8G2_ST75256_JLX256160_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Uno, Enable U8g2 16 bit mode for this display //U8G2_ST75256_JLX240160_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST75256_JLX240160_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST75256_JLX25664_1_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, enable U8g2 16 bit mode for this display //U8G2_NT7534_TG12864R_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_NT7534_TG12864R_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7588_JLX12864_1_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ 5); //U8G2_ST7588_JLX12864_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ 5); //U8G2_IST3020_ERC19264_1_6800 u8g2(U8G2_R0, 44, 43, 42, 41, 40, 39, 38, 37, /*enable=*/ 28, /*cs=*/ 32, /*dc=*/ 30, /*reset=*/ 31); // Connect WR pin with GND //U8G2_IST3020_ERC19264_1_8080 u8g2(U8G2_R0, 44, 43, 42, 41, 40, 39, 38, 37, /*enable=*/ 29, /*cs=*/ 32, /*dc=*/ 30, /*reset=*/ 31); // Connect RD pin with 3.3V //U8G2_IST3020_ERC19264_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_LC7981_160X80_1_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RW with GND //U8G2_LC7981_160X160_1_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RW with GND //U8G2_LC7981_240X128_1_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RW with GND //U8G2_LC7981_240X64_1_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RW with GND //U8G2_SED1520_122X32_1 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*dc=*/ A0, /*e1=*/ A3, /*e2=*/ A2, /* reset=*/ A4); // Set R/W to low! //U8G2_T6963_240X128_1_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RD with +5V, FS0 and FS1 with GND //U8G2_T6963_256X64_1_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RD with +5V, FS0 and FS1 with GND //U8G2_T6963_160X80_1_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RD with +5V, FS0 and FS1 with GND //U8G2_SED1330_240X128_1_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect /RD = E with +5V, enable is /WR = RW, FG with GND, 14=Uno Pin A0 //U8G2_SED1330_240X128_1_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // A0 is dc pin, /WR = RW = GND, enable is /RD = E //U8G2_RA8835_NHD_240X128_1_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect /RD = E with +5V, enable is /WR = RW, FG with GND, 14=Uno Pin A0 //U8G2_RA8835_NHD_240X128_1_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // A0 is dc pin, /WR = RW = GND, enable is /RD = E //U8G2_UC1601_128X32_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_UC1601_128X32_1_3W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* reset=*/ 8); //U8G2_UC1604_JLX19264_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_UC1604_JLX19264_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_UC1608_ERC24064_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // SW SPI, Due ERC24064-1 Test Setup //U8G2_UC1608_ERC240120_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_UC1608_240X128_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // SW SPI, Due ERC24064-1 Test Setup //U8G2_UC1610_EA_DOGXL160_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8G2_UC1610_EA_DOGXL160_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8G2_UC1611_EA_DOGM240_1_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGM240 Test Board //U8G2_UC1611_EA_DOGM240_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // SW SPI, Due DOGXL240 Test Board //U8G2_UC1611_EA_DOGXL240_1_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGXL240 Test Board //U8G2_UC1611_EA_DOGXL240_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // SW SPI, Due DOGXL240 Test Board //U8G2_UC1611_EW50850_1_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 3, /*dc=*/ 16, /*reset=*/ 16); // 240x160, Connect RD/WR1 pin with 3.3V, CS is aktive high //U8G2_UC1638_160X128_1_4W_HW_SPI u8g2(U8G2_R2, /* cs=*/ 2, /* dc=*/ 3, /* reset=*/ 4); // Not tested //U8G2_SSD1606_172X72_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // eInk/ePaper Display //U8G2_SSD1607_200X200_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // eInk/ePaper Display, original LUT from embedded artists //U8G2_SSD1607_GD_200X200_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Good Display //U8G2_IL3820_296X128_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // WaveShare 2.9 inch eInk/ePaper Display, enable 16 bit mode for this display! //U8G2_IL3820_V2_296X128_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // ePaper Display, lesser flickering and faster speed, enable 16 bit mode for this display! // End of constructor list void setup(void) { u8g2.begin(); u8g2.setFont(u8g2_font_6x10_tr); } void draw(const char *s) { u8g2.firstPage(); do { u8g2.drawStr(0,15,""Hello World!""); u8g2.drawStr(0,30,s); u8g2.drawFrame(0,0,u8g2.getDisplayWidth(),u8g2.getDisplayHeight() ); } while ( u8g2.nextPage() ); delay(2000); } void loop(void) { u8g2.setDisplayRotation(U8G2_R0); u8g2.setFlipMode(0); draw(""R0,F0""); u8g2.setFlipMode(1); draw(""R0,F1""); u8g2.setDisplayRotation(U8G2_R1); u8g2.setFlipMode(0); draw(""R1,F0""); u8g2.setFlipMode(1); draw(""R1,F1""); u8g2.setDisplayRotation(U8G2_R2); u8g2.setFlipMode(0); draw(""R2,F0""); u8g2.setFlipMode(1); draw(""R2,F1""); u8g2.setDisplayRotation(U8G2_R3); u8g2.setFlipMode(0); draw(""R3,F0""); u8g2.setFlipMode(1); draw(""R3,F1""); } ",12047,True,3582.838347135744,median "/* PrintProgmem.ino AVR Architecture: Use the (Arduino compatible) u8g2 function ""print"" to draw a string, which is located in PROGMEM. For string constants use the F() macro, but this example use global strings instead. Universal 8bit Graphics Library (https://github.com/olikraus/u8g2/) Copyright (c) 2016, olikraus@gmail.com All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ""AS IS"" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #include #include #ifdef U8X8_HAVE_HW_SPI #include #endif #ifdef U8X8_HAVE_HW_I2C #include #endif /* U8glib Example Overview: Frame Buffer Examples: clearBuffer/sendBuffer. Fast, but may not work with all Arduino boards because of RAM consumption Page Buffer Examples: firstPage/nextPage. Less RAM usage, should work with all Arduino boards. U8x8 Text Only Example: No RAM usage, direct communication with display controller. No graphics, 8x8 Text only. This is a page buffer example. */ // U8g2 Contructor List (Picture Loop Page Buffer) // The complete list is available here: https://github.com/olikraus/u8g2/wiki/u8g2setupcpp // Please update the pin numbers according to your setup. Use U8X8_PIN_NONE if the reset pin is not connected //U8G2_NULL u8g2(U8G2_R0); // null device, a 8x8 pixel display which does nothing //U8G2_SSD1306_128X64_NONAME_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1306_128X64_NONAME_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 12, /* dc=*/ 4, /* reset=*/ 6); // Arduboy (Production, Kickstarter Edition) //U8G2_SSD1306_128X64_NONAME_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1306_128X64_NONAME_1_3W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* reset=*/ 8); //U8G2_SSD1306_128X64_NONAME_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); //U8G2_SSD1306_128X64_ALT0_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); // same as the NONAME variant, but may solve the ""every 2nd line skipped"" problem //U8G2_SSD1306_128X64_NONAME_1_SW_I2C u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* reset=*/ 8); //U8G2_SSD1306_128X64_NONAME_1_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // All Boards without Reset of the Display //U8G2_SSD1306_128X64_NONAME_1_SW_I2C u8g2(U8G2_R0, /* clock=*/ 16, /* data=*/ 17, /* reset=*/ U8X8_PIN_NONE); // ESP32 Thing, pure SW emulated I2C //U8G2_SSD1306_128X64_NONAME_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE, /* clock=*/ 16, /* data=*/ 17); // ESP32 Thing, HW I2C with pin remapping //U8G2_SSD1306_128X64_NONAME_1_6800 u8g2(U8G2_R0, 13, 11, 2, 3, 4, 5, 6, A4, /*enable=*/ 7, /*cs=*/ 10, /*dc=*/ 9, /*reset=*/ 8); //U8G2_SSD1306_128X64_NONAME_1_8080 u8g2(U8G2_R0, 13, 11, 2, 3, 4, 5, 6, A4, /*enable=*/ 7, /*cs=*/ 10, /*dc=*/ 9, /*reset=*/ 8); //U8G2_SSD1306_128X64_VCOMH0_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but maximizes setContrast() range //U8G2_SSD1306_128X64_ALT0_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but may solve the ""every 2nd line skipped"" problem //U8G2_SH1106_128X64_NONAME_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SH1106_128X64_NONAME_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); //U8G2_SH1106_128X64_VCOMH0_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but maximizes setContrast() range //U8G2_SH1106_128X64_WINSTAR_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but uses updated SH1106 init sequence //U8G2_SH1106_72X40_WISE_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SH1107_64X128_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SH1107_128X128_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SH1107_128X128_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); //U8G2_SH1107_SEEED_96X96_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SH1108_160X160_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SH1122_256X64_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8G2_16BIT in u8g2.h //U8G2_SSD1306_128X32_UNIVISION_1_SW_I2C u8g2(U8G2_R0, /* clock=*/ 21, /* data=*/ 20, /* reset=*/ U8X8_PIN_NONE); // Adafruit Feather M0 Basic Proto + FeatherWing OLED //U8G2_SSD1306_128X32_UNIVISION_1_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // Adafruit Feather ESP8266/32u4 Boards + FeatherWing OLED //U8G2_SSD1306_128X32_UNIVISION_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); // Adafruit ESP8266/32u4/ARM Boards + FeatherWing OLED //U8G2_SSD1306_128X32_UNIVISION_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE, /* clock=*/ SCL, /* data=*/ SDA); // pin remapping with ESP8266 HW I2C //U8G2_SSD1306_64X48_ER_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); // EastRising 0.66"" OLED breakout board, Uno: A4=SDA, A5=SCL, 5V powered //U8G2_SSD1306_48X64_WINSTAR_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); //U8G2_SSD1306_64X32_NONAME_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); //U8G2_SSD1306_64X32_1F_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); //U8G2_SSD1306_96X16_ER_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); // EastRising 0.69"" OLED //U8G2_SSD1322_NHD_256X64_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8G2_16BIT in u8g2.h //U8G2_SSD1322_NHD_256X64_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Enable U8G2_16BIT in u8g2.h //U8G2_SSD1322_NHD_128X64_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1322_NHD_128X64_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1325_NHD_128X64_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1325_NHD_128X64_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1326_ER_256X32_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // experimental driver for ER-OLED018-1 //U8G2_SSD1327_SEEED_96X96_1_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // Seeedstudio Grove OLED 96x96 //U8G2_SSD1327_SEEED_96X96_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); // Seeedstudio Grove OLED 96x96 //U8G2_SSD1327_EA_W128128_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1327_EA_W128128_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1327_EA_W128128_1_SW_I2C u8g2(U8G2_R0, /* clock=*/ 5, /* data=*/ 4, /* reset=*/ U8X8_PIN_NONE); //U8G2_SSD1327_EA_W128128_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); //U8G2_SSD1327_MIDAS_128X128_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1327_MIDAS_128X128_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1329_128X96_NONAME_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1329_128X96_NONAME_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1305_128X32_NONAME_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1305_128X32_NONAME_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1305_128X64_ADAFRUIT_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1305_128X64_ADAFRUIT_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1309_128X64_NONAME0_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1309_128X64_NONAME0_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1309_128X64_NONAME2_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1309_128X64_NONAME2_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1317_96X96_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_SSD1317_96X96_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_LD7032_60X32_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 11, /* data=*/ 12, /* cs=*/ 9, /* dc=*/ 10, /* reset=*/ 8); // SW SPI Nano Board //U8G2_LD7032_60X32_1_4W_SW_I2C u8g2(U8G2_R0, /* clock=*/ 11, /* data=*/ 12, /* reset=*/ U8X8_PIN_NONE); // NOT TESTED! //U8G2_UC1701_EA_DOGS102_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_UC1701_EA_DOGS102_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_PCD8544_84X48_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Nokia 5110 Display //U8G2_PCD8544_84X48_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Nokia 5110 Display //U8G2_PCF8812_96X65_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Could be also PCF8814 //U8G2_PCF8812_96X65_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Could be also PCF8814 //U8G2_HX1230_96X68_1_3W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* reset=*/ 8); //U8G2_HX1230_96X68_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_KS0108_128X64_1 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*dc=*/ 17, /*cs0=*/ 14, /*cs1=*/ 15, /*cs2=*/ U8X8_PIN_NONE, /* reset=*/ U8X8_PIN_NONE); // Set R/W to low! //U8G2_KS0108_ERM19264_1 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*dc=*/ 17, /*cs0=*/ 14, /*cs1=*/ 15, /*cs2=*/ 16, /* reset=*/ U8X8_PIN_NONE); // Set R/W to low! //U8G2_ST7920_192X32_1_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ U8X8_PIN_NONE, /*dc=*/ 17, /*reset=*/ U8X8_PIN_NONE); //U8G2_ST7920_192X32_1_SW_SPI u8g2(U8G2_R0, /* clock=*/ 18 /* A4 */ , /* data=*/ 16 /* A2 */, /* CS=*/ 17 /* A3 */, /* reset=*/ U8X8_PIN_NONE); //U8G2_ST7920_128X64_1_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18 /* A4 */, /*cs=*/ U8X8_PIN_NONE, /*dc/rs=*/ 17 /* A3 */, /*reset=*/ 15 /* A1 */); // Remember to set R/W to 0 //U8G2_ST7920_128X64_1_SW_SPI u8g2(U8G2_R0, /* clock=*/ 18 /* A4 */ , /* data=*/ 16 /* A2 */, /* CS=*/ 17 /* A3 */, /* reset=*/ U8X8_PIN_NONE); //U8G2_ST7920_128X64_1_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* CS=*/ 10, /* reset=*/ 8); //U8G2_ST7920_128X64_1_HW_SPI u8g2(U8G2_R0, /* CS=*/ 10, /* reset=*/ 8); //U8G2_ST7565_EA_DOGM128_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_EA_DOGM128_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_64128N_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_64128N_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_EA_DOGM132_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); // DOGM132 Shield //U8G2_ST7565_EA_DOGM132_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); // DOGM132 Shield //U8G2_ST7565_ZOLEN_128X64_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_ZOLEN_128X64_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_LM6059_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Adafruit ST7565 GLCD //U8G2_ST7565_LM6059_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Adafruit ST7565 GLCD //U8G2_ST7565_LX12864_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_LX12864_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_ERC12864_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_ERC12864_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_NHD_C12832_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_NHD_C12832_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_NHD_C12864_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_NHD_C12864_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_JLX12864_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7565_JLX12864_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7567_PI_132X64_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); // Pax Instruments Shield, LCD_BL=6 //U8G2_ST7567_PI_132X64_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); // Pax Instruments Shield, LCD_BL=6 //U8G2_ST7567_JLX12864_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7567_JLX12864_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7567_ENH_DG128064_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7567_ENH_DG128064_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7567_ENH_DG128064I_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7567_ENH_DG128064I_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7567_64X32_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ U8X8_PIN_NONE); //U8G2_ST75256_JLX172104_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST75256_JLX172104_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST75256_JLX256128_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Uno, Enable U8g2 16 bit mode for this display //U8G2_ST75256_JLX256128_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Uno, Enable U8g2 16 bit mode for this display //U8G2_ST75256_JLX256128_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 9, /* data=*/ 8, /* cs=*/ 7, /* dc=*/ 6, /* reset=*/ 5); // MKR Zero, Enable U8g2 16 bit mode for this display //U8G2_ST75256_JLX256128_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 7, /* dc=*/ 6, /* reset=*/ 5); // MKR Zero, Enable U8g2 16 bit mode for this display //U8G2_ST75256_JLX256160_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Uno, Enable U8g2 16 bit mode for this display //U8G2_ST75256_JLX256160_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Uno, Enable U8g2 16 bit mode for this display //U8G2_ST75256_JLX240160_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST75256_JLX240160_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST75256_JLX25664_1_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, enable U8g2 16 bit mode for this display //U8G2_NT7534_TG12864R_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_NT7534_TG12864R_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_ST7588_JLX12864_1_SW_I2C u8g2(U8G2_R0, /* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ 5); //U8G2_ST7588_JLX12864_1_HW_I2C u8g2(U8G2_R0, /* reset=*/ 5); //U8G2_IST3020_ERC19264_1_6800 u8g2(U8G2_R0, 44, 43, 42, 41, 40, 39, 38, 37, /*enable=*/ 28, /*cs=*/ 32, /*dc=*/ 30, /*reset=*/ 31); // Connect WR pin with GND //U8G2_IST3020_ERC19264_1_8080 u8g2(U8G2_R0, 44, 43, 42, 41, 40, 39, 38, 37, /*enable=*/ 29, /*cs=*/ 32, /*dc=*/ 30, /*reset=*/ 31); // Connect RD pin with 3.3V //U8G2_IST3020_ERC19264_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_LC7981_160X80_1_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RW with GND //U8G2_LC7981_160X160_1_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RW with GND //U8G2_LC7981_240X128_1_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RW with GND //U8G2_LC7981_240X64_1_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RW with GND //U8G2_SED1520_122X32_1 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*dc=*/ A0, /*e1=*/ A3, /*e2=*/ A2, /* reset=*/ A4); // Set R/W to low! //U8G2_T6963_240X128_1_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RD with +5V, FS0 and FS1 with GND //U8G2_T6963_256X64_1_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RD with +5V, FS0 and FS1 with GND //U8G2_T6963_160X80_1_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect RD with +5V, FS0 and FS1 with GND //U8G2_SED1330_240X128_1_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect /RD = E with +5V, enable is /WR = RW, FG with GND, 14=Uno Pin A0 //U8G2_SED1330_240X128_1_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // A0 is dc pin, /WR = RW = GND, enable is /RD = E //U8G2_RA8835_NHD_240X128_1_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // Connect /RD = E with +5V, enable is /WR = RW, FG with GND, 14=Uno Pin A0 //U8G2_RA8835_NHD_240X128_1_6800 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 17, /*cs=*/ 14, /*dc=*/ 15, /*reset=*/ 16); // A0 is dc pin, /WR = RW = GND, enable is /RD = E //U8G2_UC1601_128X32_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_UC1601_128X32_1_3W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* reset=*/ 8); //U8G2_UC1604_JLX19264_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_UC1604_JLX19264_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_UC1608_ERC24064_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // SW SPI, Due ERC24064-1 Test Setup //U8G2_UC1608_ERC240120_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8G2_UC1608_240X128_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // SW SPI, Due ERC24064-1 Test Setup //U8G2_UC1610_EA_DOGXL160_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8G2_UC1610_EA_DOGXL160_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8G2_UC1611_EA_DOGM240_1_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGM240 Test Board //U8G2_UC1611_EA_DOGM240_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // SW SPI, Due DOGXL240 Test Board //U8G2_UC1611_EA_DOGXL240_1_2ND_HW_I2C u8g2(U8G2_R0, /* reset=*/ 8); // Due, 2nd I2C, DOGXL240 Test Board //U8G2_UC1611_EA_DOGXL240_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // SW SPI, Due DOGXL240 Test Board //U8G2_UC1611_EW50850_1_8080 u8g2(U8G2_R0, 8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 3, /*dc=*/ 16, /*reset=*/ 16); // 240x160, Connect RD/WR1 pin with 3.3V, CS is aktive high //U8G2_UC1638_160X128_1_4W_HW_SPI u8g2(U8G2_R2, /* cs=*/ 2, /* dc=*/ 3, /* reset=*/ 4); // Not tested //U8G2_SSD1606_172X72_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // eInk/ePaper Display //U8G2_SSD1607_200X200_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // eInk/ePaper Display, original LUT from embedded artists //U8G2_SSD1607_GD_200X200_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Good Display //U8G2_IL3820_296X128_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // WaveShare 2.9 inch eInk/ePaper Display, enable 16 bit mode for this display! //U8G2_IL3820_V2_296X128_1_4W_SW_SPI u8g2(U8G2_R0, /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // ePaper Display, lesser flickering and faster speed, enable 16 bit mode for this display! //U8G2_LS013B7DH03_128X128_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ U8X8_PIN_NONE, /* reset=*/ 8); // there is no DC line for this display //U8G2_LS027B7DH01_400X240_1_4W_HW_SPI u8g2(U8G2_R0, /* cs=*/ 10, /* dc=*/ U8X8_PIN_NONE, /* reset=*/ 8); // there is no DC line for this display // End of constructor list void setup(void) { u8g2.begin(); } const char s[] PROGMEM = ""Progmem""; const char s1[] PROGMEM = ""ABC"" ; const char s2[] PROGMEM = ""DEF"" ; const char s3[] PROGMEM = ""GHI"" ; const char s4[] PROGMEM = ""JKL"" ; const char *a[] = { s1, s2, s3, s4 }; int i = 0; void loop(void) { u8g2.setFont(u8g2_font_ncenB14_tr); u8g2.firstPage(); do { u8g2.setCursor(0, 20); u8g2.print((class __FlashStringHelper *)s); // print a sting, located in PROGMEM u8g2.setCursor(0, 40); u8g2.print((class __FlashStringHelper *)a[i]); // print a sting (PROGMEM) via RAM array. } while ( u8g2.nextPage() ); delay(1000); i++; if ( i >= 4 ) i = 0; } ",12388,True,3824.056256372196,median "cmd_/home/lu-yi-hsun/Dropbox/my-project/driver/veth.o := gcc -Wp,-MD,/home/lu-yi-hsun/Dropbox/my-project/driver/.veth.o.d -nostdinc -isystem /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/include -I./arch/x86/include -I./arch/x86/include/generated -I./include -I./arch/x86/include/uapi -I./arch/x86/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -include ./include/linux/compiler_types.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -fshort-wchar -Werror-implicit-function-declaration -Wno-format-security -std=gnu89 -fno-PIE -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -mno-avx -m64 -falign-jumps=1 -falign-loops=1 -mno-80387 -mno-fp-ret-in-387 -mpreferred-stack-boundary=3 -mskip-rax-setup -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -DCONFIG_X86_X32_ABI -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -DCONFIG_AS_CFI_SECTIONS=1 -DCONFIG_AS_FXSAVEQ=1 -DCONFIG_AS_SSSE3=1 -DCONFIG_AS_CRC32=1 -DCONFIG_AS_AVX=1 -DCONFIG_AS_AVX2=1 -DCONFIG_AS_AVX512=1 -DCONFIG_AS_SHA1_NI=1 -DCONFIG_AS_SHA256_NI=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mindirect-branch=thunk-extern -mindirect-branch-register -fno-jump-tables -fno-delete-null-pointer-checks -Wno-frame-address -Wno-format-truncation -Wno-format-overflow -Wno-int-in-bool-context -O2 --param=allow-store-data-races=0 -Wframe-larger-than=2048 -fstack-protector-strong -Wno-unused-but-set-variable -Wno-unused-const-variable -fno-var-tracking-assignments -pg -mrecord-mcount -mfentry -DCC_USING_FENTRY -Wdeclaration-after-statement -Wno-pointer-sign -Wno-stringop-truncation -fno-strict-overflow -fno-merge-all-constants -fmerge-constants -fno-stack-check -fconserve-stack -Werror=implicit-int -Werror=strict-prototypes -Werror=date-time -Werror=incompatible-pointer-types -Werror=designated-init -fmacro-prefix-map=./= -Wno-packed-not-aligned -DMODULE -DKBUILD_BASENAME='""veth""' -DKBUILD_MODNAME='""veth""' -c -o /home/lu-yi-hsun/Dropbox/my-project/driver/.tmp_veth.o /home/lu-yi-hsun/Dropbox/my-project/driver/veth.c source_/home/lu-yi-hsun/Dropbox/my-project/driver/veth.o := /home/lu-yi-hsun/Dropbox/my-project/driver/veth.c deps_/home/lu-yi-hsun/Dropbox/my-project/driver/veth.o := \\ $(wildcard include/config/net/poll/controller.h) \\ include/linux/kconfig.h \\ $(wildcard include/config/cpu/big/endian.h) \\ $(wildcard include/config/booger.h) \\ $(wildcard include/config/foo.h) \\ include/linux/compiler_types.h \\ $(wildcard include/config/have/arch/compiler/h.h) \\ $(wildcard include/config/enable/must/check.h) \\ $(wildcard include/config/arch/supports/optimized/inlining.h) \\ $(wildcard include/config/optimize/inlining.h) \\ include/linux/compiler-gcc.h \\ $(wildcard include/config/retpoline.h) \\ $(wildcard include/config/arch/use/builtin/bswap.h) \\ include/linux/netdevice.h \\ $(wildcard include/config/dcb.h) \\ $(wildcard include/config/hyperv/net.h) \\ $(wildcard include/config/wlan.h) \\ $(wildcard include/config/ax25.h) \\ $(wildcard include/config/mac80211/mesh.h) \\ $(wildcard include/config/net/ipip.h) \\ $(wildcard include/config/net/ipgre.h) \\ $(wildcard include/config/ipv6/sit.h) \\ $(wildcard include/config/ipv6/tunnel.h) \\ $(wildcard include/config/rps.h) \\ $(wildcard include/config/netpoll.h) \\ $(wildcard include/config/smp.h) \\ $(wildcard include/config/sysfs.h) \\ $(wildcard include/config/xps.h) \\ $(wildcard include/config/numa.h) \\ $(wildcard include/config/bql.h) \\ $(wildcard include/config/sysctl.h) \\ $(wildcard include/config/rfs/accel.h) \\ $(wildcard include/config/fcoe.h) \\ $(wildcard include/config/xfrm/offload.h) \\ $(wildcard include/config/tls/device.h) \\ $(wildcard include/config/libfcoe.h) \\ $(wildcard include/config/wireless/ext.h) \\ $(wildcard include/config/net/switchdev.h) \\ $(wildcard include/config/net/l3/master/dev.h) \\ $(wildcard include/config/ipv6.h) \\ $(wildcard include/config/vlan/8021q.h) \\ $(wildcard include/config/net/dsa.h) \\ $(wildcard include/config/tipc.h) \\ $(wildcard include/config/irda.h) \\ $(wildcard include/config/atalk.h) \\ $(wildcard include/config/decnet.h) \\ $(wildcard include/config/mpls/routing.h) \\ $(wildcard include/config/net/cls/act.h) \\ $(wildcard include/config/netfilter/ingress.h) \\ $(wildcard include/config/net/sched.h) \\ $(wildcard include/config/garp.h) \\ $(wildcard include/config/mrp.h) \\ $(wildcard include/config/cgroup/net/prio.h) \\ $(wildcard include/config/net/flow/limit.h) \\ $(wildcard include/config/bug.h) \\ $(wildcard include/config/proc/fs.h) \\ $(wildcard include/config/dynamic/debug.h) \\ include/linux/timer.h \\ $(wildcard include/config/lockdep.h) \\ $(wildcard include/config/debug/objects/timers.h) \\ $(wildcard include/config/no/hz/common.h) \\ $(wildcard include/config/hotplug/cpu.h) \\ include/linux/list.h \\ $(wildcard include/config/debug/list.h) \\ include/linux/types.h \\ $(wildcard include/config/have/uid16.h) \\ $(wildcard include/config/uid16.h) \\ $(wildcard include/config/lbdaf.h) \\ $(wildcard include/config/arch/dma/addr/t/64bit.h) \\ $(wildcard include/config/phys/addr/t/64bit.h) \\ $(wildcard include/config/64bit.h) \\ include/uapi/linux/types.h \\ arch/x86/include/uapi/asm/types.h \\ include/uapi/asm-generic/types.h \\ include/asm-generic/int-ll64.h \\ include/uapi/asm-generic/int-ll64.h \\ arch/x86/include/uapi/asm/bitsperlong.h \\ include/asm-generic/bitsperlong.h \\ include/uapi/asm-generic/bitsperlong.h \\ include/uapi/linux/posix_types.h \\ include/linux/stddef.h \\ include/uapi/linux/stddef.h \\ include/linux/compiler_types.h \\ arch/x86/include/asm/posix_types.h \\ $(wildcard include/config/x86/32.h) \\ arch/x86/include/uapi/asm/posix_types_64.h \\ include/uapi/asm-generic/posix_types.h \\ include/linux/poison.h \\ $(wildcard include/config/illegal/pointer/value.h) \\ $(wildcard include/config/page/poisoning/zero.h) \\ include/linux/const.h \\ include/uapi/linux/const.h \\ include/linux/kernel.h \\ $(wildcard include/config/preempt/voluntary.h) \\ $(wildcard include/config/debug/atomic/sleep.h) \\ $(wildcard include/config/mmu.h) \\ $(wildcard include/config/prove/locking.h) \\ $(wildcard include/config/arch/has/refcount.h) \\ $(wildcard include/config/panic/timeout.h) \\ $(wildcard include/config/tracing.h) \\ $(wildcard include/config/ftrace/mcount/record.h) \\ /usr/lib/gcc/x86_64-pc-linux-gnu/8.3.0/include/stdarg.h \\ include/linux/linkage.h \\ include/linux/stringify.h \\ include/linux/export.h \\ $(wildcard include/config/modules.h) \\ $(wildcard include/config/modversions.h) \\ $(wildcard include/config/module/rel/crcs.h) \\ $(wildcard include/config/have/arch/prel32/relocations.h) \\ $(wildcard include/config/trim/unused/ksyms.h) \\ $(wildcard include/config/unused/symbols.h) \\ include/linux/compiler.h \\ $(wildcard include/config/trace/branch/profiling.h) \\ $(wildcard include/config/profile/all/branches.h) \\ $(wildcard include/config/stack/validation.h) \\ $(wildcard include/config/kasan.h) \\ arch/x86/include/asm/barrier.h \\ arch/x86/include/asm/alternative.h \\ arch/x86/include/asm/asm.h \\ arch/x86/include/asm/nops.h \\ $(wildcard include/config/mk7.h) \\ $(wildcard include/config/x86/p6/nop.h) \\ $(wildcard include/config/x86/64.h) \\ include/asm-generic/barrier.h \\ include/linux/kasan-checks.h \\ arch/x86/include/asm/linkage.h \\ $(wildcard include/config/x86/alignment/16.h) \\ include/linux/bitops.h \\ include/linux/bits.h \\ arch/x86/include/asm/bitops.h \\ $(wildcard include/config/x86/cmov.h) \\ arch/x86/include/asm/rmwcc.h \\ $(wildcard include/config/cc/has/asm/goto.h) \\ include/asm-generic/bitops/find.h \\ $(wildcard include/config/generic/find/first/bit.h) \\ include/asm-generic/bitops/sched.h \\ arch/x86/include/asm/arch_hweight.h \\ arch/x86/include/asm/cpufeatures.h \\ arch/x86/include/asm/required-features.h \\ $(wildcard include/config/x86/minimum/cpu/family.h) \\ $(wildcard include/config/math/emulation.h) \\ $(wildcard include/config/x86/pae.h) \\ $(wildcard include/config/x86/cmpxchg64.h) \\ $(wildcard include/config/x86/use/3dnow.h) \\ $(wildcard include/config/matom.h) \\ $(wildcard include/config/paravirt.h) \\ arch/x86/include/asm/disabled-features.h \\ $(wildcard include/config/x86/intel/mpx.h) \\ $(wildcard include/config/x86/intel/umip.h) \\ $(wildcard include/config/x86/intel/memory/protection/keys.h) \\ $(wildcard include/config/x86/5level.h) \\ $(wildcard include/config/page/table/isolation.h) \\ include/asm-generic/bitops/const_hweight.h \\ include/asm-generic/bitops/le.h \\ arch/x86/include/uapi/asm/byteorder.h \\ include/linux/byteorder/little_endian.h \\ include/uapi/linux/byteorder/little_endian.h \\ include/linux/swab.h \\ include/uapi/linux/swab.h \\ arch/x86/include/uapi/asm/swab.h \\ include/linux/byteorder/generic.h \\ include/asm-generic/bitops/ext2-atomic-setbit.h \\ include/linux/log2.h \\ $(wildcard include/config/arch/has/ilog2/u32.h) \\ $(wildcard include/config/arch/has/ilog2/u64.h) \\ include/linux/typecheck.h \\ include/linux/printk.h \\ $(wildcard include/config/message/loglevel/default.h) \\ $(wildcard include/config/console/loglevel/default.h) \\ $(wildcard include/config/console/loglevel/quiet.h) \\ $(wildcard include/config/early/printk.h) \\ $(wildcard include/config/printk/nmi.h) \\ $(wildcard include/config/printk.h) \\ include/linux/init.h \\ $(wildcard include/config/strict/kernel/rwx.h) \\ $(wildcard include/config/strict/module/rwx.h) \\ include/linux/kern_levels.h \\ include/linux/cache.h \\ $(wildcard include/config/arch/has/cache/line/size.h) \\ include/uapi/linux/kernel.h \\ include/uapi/linux/sysinfo.h \\ arch/x86/include/asm/cache.h \\ $(wildcard include/config/x86/l1/cache/shift.h) \\ $(wildcard include/config/x86/internode/cache/shift.h) \\ $(wildcard include/config/x86/vsmp.h) \\ include/linux/dynamic_debug.h \\ $(wildcard include/config/jump/label.h) \\ include/linux/jump_label.h \\ arch/x86/include/asm/jump_label.h \\ include/linux/build_bug.h \\ include/linux/ktime.h \\ include/linux/time.h \\ $(wildcard include/config/arch/uses/gettimeoffset.h) \\ include/linux/seqlock.h \\ $(wildcard include/config/debug/lock/alloc.h) \\ include/linux/spinlock.h \\ $(wildcard include/config/debug/spinlock.h) \\ $(wildcard include/config/preempt.h) \\ include/linux/preempt.h \\ $(wildcard include/config/preempt/count.h) \\ $(wildcard include/config/debug/preempt.h) \\ $(wildcard include/config/trace/preempt/toggle.h) \\ $(wildcard include/config/preempt/notifiers.h) \\ arch/x86/include/asm/preempt.h \\ arch/x86/include/asm/percpu.h \\ $(wildcard include/config/x86/64/smp.h) \\ include/asm-generic/percpu.h \\ $(wildcard include/config/have/setup/per/cpu/area.h) \\ include/linux/threads.h \\ $(wildcard include/config/nr/cpus.h) \\ $(wildcard include/config/base/small.h) \\ include/linux/percpu-defs.h \\ $(wildcard include/config/debug/force/weak/per/cpu.h) \\ $(wildcard include/config/virtualization.h) \\ $(wildcard include/config/amd/mem/encrypt.h) \\ include/linux/thread_info.h \\ $(wildcard include/config/thread/info/in/task.h) \\ $(wildcard include/config/have/arch/within/stack/frames.h) \\ $(wildcard include/config/hardened/usercopy.h) \\ include/linux/bug.h \\ $(wildcard include/config/generic/bug.h) \\ $(wildcard include/config/bug/on/data/corruption.h) \\ arch/x86/include/asm/bug.h \\ $(wildcard include/config/debug/bugverbose.h) \\ include/asm-generic/bug.h \\ $(wildcard include/config/generic/bug/relative/pointers.h) \\ include/linux/restart_block.h \\ include/linux/time64.h \\ $(wildcard include/config/64bit/time.h) \\ include/linux/math64.h \\ $(wildcard include/config/arch/supports/int128.h) \\ arch/x86/include/asm/div64.h \\ include/asm-generic/div64.h \\ include/uapi/linux/time.h \\ arch/x86/include/asm/current.h \\ arch/x86/include/asm/thread_info.h \\ $(wildcard include/config/vm86.h) \\ $(wildcard include/config/frame/pointer.h) \\ $(wildcard include/config/compat.h) \\ $(wildcard include/config/ia32/emulation.h) \\ arch/x86/include/asm/page.h \\ arch/x86/include/asm/page_types.h \\ $(wildcard include/config/physical/start.h) \\ $(wildcard include/config/physical/align.h) \\ $(wildcard include/config/dynamic/physical/mask.h) \\ include/linux/mem_encrypt.h \\ $(wildcard include/config/arch/has/mem/encrypt.h) \\ arch/x86/include/asm/mem_encrypt.h \\ arch/x86/include/uapi/asm/bootparam.h \\ include/linux/screen_info.h \\ include/uapi/linux/screen_info.h \\ include/linux/apm_bios.h \\ include/uapi/linux/apm_bios.h \\ include/uapi/linux/ioctl.h \\ arch/x86/include/uapi/asm/ioctl.h \\ include/asm-generic/ioctl.h \\ include/uapi/asm-generic/ioctl.h \\ include/linux/edd.h \\ include/uapi/linux/edd.h \\ arch/x86/include/asm/ist.h \\ arch/x86/include/uapi/asm/ist.h \\ include/video/edid.h \\ $(wildcard include/config/x86.h) \\ include/uapi/video/edid.h \\ arch/x86/include/asm/page_64_types.h \\ $(wildcard include/config/kasan/extra.h) \\ $(wildcard include/config/dynamic/memory/layout.h) \\ $(wildcard include/config/randomize/base.h) \\ arch/x86/include/asm/kaslr.h \\ $(wildcard include/config/randomize/memory.h) \\ arch/x86/include/asm/page_64.h \\ $(wildcard include/config/debug/virtual.h) \\ $(wildcard include/config/flatmem.h) \\ $(wildcard include/config/x86/vsyscall/emulation.h) \\ include/linux/range.h \\ include/asm-generic/memory_model.h \\ $(wildcard include/config/discontigmem.h) \\ $(wildcard include/config/sparsemem/vmemmap.h) \\ $(wildcard include/config/sparsemem.h) \\ include/linux/pfn.h \\ include/asm-generic/getorder.h \\ arch/x86/include/asm/cpufeature.h \\ $(wildcard include/config/x86/feature/names.h) \\ arch/x86/include/asm/processor.h \\ $(wildcard include/config/kvm.h) \\ $(wildcard include/config/stackprotector.h) \\ $(wildcard include/config/x86/debugctlmsr.h) \\ $(wildcard include/config/cpu/sup/amd.h) \\ $(wildcard include/config/xen.h) \\ arch/x86/include/asm/processor-flags.h \\ arch/x86/include/uapi/asm/processor-flags.h \\ arch/x86/include/asm/math_emu.h \\ arch/x86/include/asm/ptrace.h \\ arch/x86/include/asm/segment.h \\ $(wildcard include/config/xen/pv.h) \\ $(wildcard include/config/x86/32/lazy/gs.h) \\ arch/x86/include/uapi/asm/ptrace.h \\ arch/x86/include/uapi/asm/ptrace-abi.h \\ arch/x86/include/asm/paravirt_types.h \\ $(wildcard include/config/pgtable/levels.h) \\ $(wildcard include/config/paravirt/debug.h) \\ arch/x86/include/asm/desc_defs.h \\ arch/x86/include/asm/kmap_types.h \\ $(wildcard include/config/debug/highmem.h) \\ include/asm-generic/kmap_types.h \\ arch/x86/include/asm/pgtable_types.h \\ $(wildcard include/config/mem/soft/dirty.h) \\ arch/x86/include/asm/pgtable_64_types.h \\ arch/x86/include/asm/sparsemem.h \\ include/asm-generic/pgtable-nop4d.h \\ arch/x86/include/asm/nospec-branch.h \\ include/linux/static_key.h \\ arch/x86/include/asm/alternative-asm.h \\ arch/x86/include/asm/msr-index.h \\ arch/x86/include/asm/spinlock_types.h \\ $(wildcard include/config/paravirt/spinlocks.h) \\ include/asm-generic/qspinlock_types.h \\ include/asm-generic/qrwlock_types.h \\ include/asm-generic/ptrace.h \\ arch/x86/include/uapi/asm/sigcontext.h \\ arch/x86/include/asm/msr.h \\ $(wildcard include/config/tracepoints.h) \\ arch/x86/include/asm/msr-index.h \\ arch/x86/include/uapi/asm/errno.h \\ include/uapi/asm-generic/errno.h \\ include/uapi/asm-generic/errno-base.h \\ arch/x86/include/asm/cpumask.h \\ include/linux/cpumask.h \\ $(wildcard include/config/cpumask/offstack.h) \\ $(wildcard include/config/debug/per/cpu/maps.h) \\ include/linux/bitmap.h \\ include/linux/string.h \\ $(wildcard include/config/binary/printf.h) \\ $(wildcard include/config/fortify/source.h) \\ include/uapi/linux/string.h \\ arch/x86/include/asm/string.h \\ arch/x86/include/asm/string_64.h \\ $(wildcard include/config/x86/mce.h) \\ $(wildcard include/config/arch/has/uaccess/flushcache.h) \\ arch/x86/include/uapi/asm/msr.h \\ arch/x86/include/asm/atomic.h \\ arch/x86/include/asm/cmpxchg.h \\ arch/x86/include/asm/cmpxchg_64.h \\ arch/x86/include/asm/atomic64_64.h \\ include/asm-generic/atomic-instrumented.h \\ include/linux/tracepoint-defs.h \\ include/linux/atomic.h \\ $(wildcard include/config/generic/atomic64.h) \\ include/asm-generic/atomic-long.h \\ arch/x86/include/asm/paravirt.h \\ $(wildcard include/config/debug/entry.h) \\ arch/x86/include/asm/frame.h \\ arch/x86/include/asm/special_insns.h \\ arch/x86/include/asm/fpu/types.h \\ arch/x86/include/asm/unwind_hints.h \\ arch/x86/include/asm/orc_types.h \\ include/linux/personality.h \\ include/uapi/linux/personality.h \\ include/linux/err.h \\ include/linux/irqflags.h \\ $(wildcard include/config/trace/irqflags.h) \\ $(wildcard include/config/irqsoff/tracer.h) \\ $(wildcard include/config/preempt/tracer.h) \\ $(wildcard include/config/trace/irqflags/support.h) \\ arch/x86/include/asm/irqflags.h \\ include/linux/bottom_half.h \\ include/linux/spinlock_types.h \\ include/linux/lockdep.h \\ $(wildcard include/config/lock/stat.h) \\ include/linux/rwlock_types.h \\ arch/x86/include/asm/spinlock.h \\ arch/x86/include/asm/qspinlock.h \\ include/asm-generic/qspinlock.h \\ arch/x86/include/asm/qrwlock.h \\ include/asm-generic/qrwlock.h \\ include/linux/rwlock.h \\ include/linux/spinlock_api_smp.h \\ $(wildcard include/config/inline/spin/lock.h) \\ $(wildcard include/config/inline/spin/lock/bh.h) \\ $(wildcard include/config/inline/spin/lock/irq.h) \\ $(wildcard include/config/inline/spin/lock/irqsave.h) \\ $(wildcard include/config/inline/spin/trylock.h) \\ $(wildcard include/config/inline/spin/trylock/bh.h) \\ $(wildcard include/config/uninline/spin/unlock.h) \\ $(wildcard include/config/inline/spin/unlock/bh.h) \\ $(wildcard include/config/inline/spin/unlock/irq.h) \\ $(wildcard include/config/inline/spin/unlock/irqrestore.h) \\ $(wildcard include/config/generic/lockbreak.h) \\ include/linux/rwlock_api_smp.h \\ $(wildcard include/config/inline/read/lock.h) \\ $(wildcard include/config/inline/write/lock.h) \\ $(wildcard include/config/inline/read/lock/bh.h) \\ $(wildcard include/config/inline/write/lock/bh.h) \\ $(wildcard include/config/inline/read/lock/irq.h) \\ $(wildcard include/config/inline/write/lock/irq.h) \\ $(wildcard include/config/inline/read/lock/irqsave.h) \\ $(wildcard include/config/inline/write/lock/irqsave.h) \\ $(wildcard include/config/inline/read/trylock.h) \\ $(wildcard include/config/inline/write/trylock.h) \\ $(wildcard include/config/inline/read/unlock.h) \\ $(wildcard include/config/inline/write/unlock.h) \\ $(wildcard include/config/inline/read/unlock/bh.h) \\ $(wildcard include/config/inline/write/unlock/bh.h) \\ $(wildcard include/config/inline/read/unlock/irq.h) \\ $(wildcard include/config/inline/write/unlock/irq.h) \\ $(wildcard include/config/inline/read/unlock/irqrestore.h) \\ $(wildcard include/config/inline/write/unlock/irqrestore.h) \\ include/linux/time32.h \\ include/linux/jiffies.h \\ include/linux/timex.h \\ include/uapi/linux/timex.h \\ include/uapi/linux/param.h \\ arch/x86/include/uapi/asm/param.h \\ include/asm-generic/param.h \\ $(wildcard include/config/hz.h) \\ include/uapi/asm-generic/param.h \\ arch/x86/include/asm/timex.h \\ arch/x86/include/asm/tsc.h \\ $(wildcard include/config/x86/tsc.h) \\ include/generated/timeconst.h \\ include/linux/timekeeping.h \\ include/linux/errno.h \\ include/uapi/linux/errno.h \\ include/linux/timekeeping32.h \\ include/linux/debugobjects.h \\ $(wildcard include/config/debug/objects.h) \\ $(wildcard include/config/debug/objects/free.h) \\ include/linux/delay.h \\ arch/x86/include/asm/delay.h \\ include/asm-generic/delay.h \\ include/linux/prefetch.h \\ include/linux/percpu.h \\ $(wildcard include/config/need/per/cpu/embed/first/chunk.h) \\ $(wildcard include/config/need/per/cpu/page/first/chunk.h) \\ include/linux/mmdebug.h \\ $(wildcard include/config/debug/vm.h) \\ $(wildcard include/config/debug/vm/pgflags.h) \\ include/linux/smp.h \\ $(wildcard include/config/up/late/init.h) \\ include/linux/llist.h \\ $(wildcard include/config/arch/have/nmi/safe/cmpxchg.h) \\ arch/x86/include/asm/smp.h \\ $(wildcard include/config/x86/local/apic.h) \\ $(wildcard include/config/x86/io/apic.h) \\ $(wildcard include/config/debug/nmi/selftest.h) \\ arch/x86/include/asm/mpspec.h \\ $(wildcard include/config/eisa.h) \\ $(wildcard include/config/x86/mpparse.h) \\ arch/x86/include/asm/mpspec_def.h \\ arch/x86/include/asm/x86_init.h \\ arch/x86/include/asm/apicdef.h \\ arch/x86/include/asm/apic.h \\ $(wildcard include/config/x86/x2apic.h) \\ arch/x86/include/asm/fixmap.h \\ $(wildcard include/config/provide/ohci1394/dma/init.h) \\ $(wildcard include/config/pci/mmconfig.h) \\ $(wildcard include/config/x86/intel/mid.h) \\ $(wildcard include/config/acpi/apei/ghes.h) \\ $(wildcard include/config/intel/txt.h) \\ arch/x86/include/asm/acpi.h \\ $(wildcard include/config/acpi/apei.h) \\ $(wildcard include/config/acpi.h) \\ $(wildcard include/config/acpi/numa.h) \\ include/acpi/pdc_intel.h \\ arch/x86/include/asm/numa.h \\ $(wildcard include/config/numa/emu.h) \\ include/linux/nodemask.h \\ $(wildcard include/config/highmem.h) \\ include/linux/numa.h \\ $(wildcard include/config/nodes/shift.h) \\ arch/x86/include/asm/topology.h \\ $(wildcard include/config/sched/mc/prio.h) \\ include/asm-generic/topology.h \\ $(wildcard include/config/need/multiple/nodes.h) \\ $(wildcard include/config/have/memoryless/nodes.h) \\ arch/x86/include/asm/mmu.h \\ $(wildcard include/config/modify/ldt/syscall.h) \\ include/linux/rwsem.h \\ $(wildcard include/config/rwsem/spin/on/owner.h) \\ $(wildcard include/config/rwsem/generic/spinlock.h) \\ include/linux/osq_lock.h \\ arch/x86/include/asm/rwsem.h \\ include/linux/mutex.h \\ $(wildcard include/config/mutex/spin/on/owner.h) \\ $(wildcard include/config/debug/mutexes.h) \\ include/linux/debug_locks.h \\ $(wildcard include/config/debug/locking/api/selftests.h) \\ arch/x86/include/asm/realmode.h \\ $(wildcard include/config/acpi/sleep.h) \\ arch/x86/include/asm/io.h \\ $(wildcard include/config/mtrr.h) \\ $(wildcard include/config/x86/pat.h) \\ arch/x86/include/generated/asm/early_ioremap.h \\ include/asm-generic/early_ioremap.h \\ $(wildcard include/config/generic/early/ioremap.h) \\ include/asm-generic/iomap.h \\ $(wildcard include/config/has/ioport/map.h) \\ $(wildcard include/config/pci.h) \\ $(wildcard include/config/generic/iomap.h) \\ include/asm-generic/pci_iomap.h \\ $(wildcard include/config/no/generic/pci/ioport/map.h) \\ $(wildcard include/config/generic/pci/iomap.h) \\ include/xen/xen.h \\ $(wildcard include/config/xen/pvh.h) \\ $(wildcard include/config/xen/dom0.h) \\ include/xen/interface/xen.h \\ arch/x86/include/asm/xen/interface.h \\ arch/x86/include/asm/xen/interface_64.h \\ arch/x86/include/asm/pvclock-abi.h \\ arch/x86/include/asm/xen/hypervisor.h \\ include/asm-generic/io.h \\ $(wildcard include/config/virt/to/bus.h) \\ include/linux/logic_pio.h \\ $(wildcard include/config/indirect/pio.h) \\ include/linux/fwnode.h \\ include/linux/vmalloc.h \\ include/linux/rbtree.h \\ include/linux/rcupdate.h \\ $(wildcard include/config/preempt/rcu.h) \\ $(wildcard include/config/rcu/stall/common.h) \\ $(wildcard include/config/no/hz/full.h) \\ $(wildcard include/config/rcu/nocb/cpu.h) \\ $(wildcard include/config/tasks/rcu.h) \\ $(wildcard include/config/tree/rcu.h) \\ $(wildcard include/config/tiny/rcu.h) \\ $(wildcard include/config/debug/objects/rcu/head.h) \\ $(wildcard include/config/prove/rcu.h) \\ $(wildcard include/config/rcu/boost.h) \\ $(wildcard include/config/arch/weak/release/acquire.h) \\ include/linux/rcutree.h \\ include/linux/overflow.h \\ arch/x86/include/uapi/asm/vsyscall.h \\ include/asm-generic/fixmap.h \\ arch/x86/include/asm/hardirq.h \\ $(wildcard include/config/kvm/intel.h) \\ $(wildcard include/config/have/kvm.h) \\ $(wildcard include/config/x86/thermal/vector.h) \\ $(wildcard include/config/x86/mce/threshold.h) \\ $(wildcard include/config/x86/mce/amd.h) \\ $(wildcard include/config/hyperv.h) \\ arch/x86/include/asm/io_apic.h \\ arch/x86/include/asm/irq_vectors.h \\ $(wildcard include/config/pci/msi.h) \\ include/linux/rculist.h \\ include/linux/workqueue.h \\ $(wildcard include/config/debug/objects/work.h) \\ $(wildcard include/config/freezer.h) \\ $(wildcard include/config/wq/watchdog.h) \\ include/linux/dynamic_queue_limits.h \\ include/linux/ethtool.h \\ include/linux/compat.h \\ $(wildcard include/config/arch/has/syscall/wrapper.h) \\ $(wildcard include/config/x86/x32/abi.h) \\ $(wildcard include/config/compat/old/sigaction.h) \\ $(wildcard include/config/odd/rt/sigaction.h) \\ include/linux/compat_time.h \\ include/linux/stat.h \\ arch/x86/include/uapi/asm/stat.h \\ include/uapi/linux/stat.h \\ include/linux/uidgid.h \\ $(wildcard include/config/multiuser.h) \\ $(wildcard include/config/user/ns.h) \\ include/linux/highuid.h \\ include/linux/sem.h \\ $(wildcard include/config/sysvipc.h) \\ include/uapi/linux/sem.h \\ include/linux/ipc.h \\ include/linux/rhashtable-types.h \\ include/uapi/linux/ipc.h \\ arch/x86/include/uapi/asm/ipcbuf.h \\ include/uapi/asm-generic/ipcbuf.h \\ include/linux/refcount.h \\ $(wildcard include/config/refcount/full.h) \\ arch/x86/include/asm/refcount.h \\ arch/x86/include/uapi/asm/sembuf.h \\ include/linux/socket.h \\ arch/x86/include/uapi/asm/socket.h \\ include/uapi/asm-generic/socket.h \\ arch/x86/include/uapi/asm/sockios.h \\ include/uapi/asm-generic/sockios.h \\ include/uapi/linux/sockios.h \\ include/linux/uio.h \\ $(wildcard include/config/arch/has/uaccess/mcsafe.h) \\ include/uapi/linux/uio.h \\ include/uapi/linux/socket.h \\ include/uapi/linux/if.h \\ include/uapi/linux/libc-compat.h \\ include/uapi/linux/hdlc/ioctl.h \\ include/linux/fs.h \\ $(wildcard include/config/fs/posix/acl.h) \\ $(wildcard include/config/security.h) \\ $(wildcard include/config/cgroup/writeback.h) \\ $(wildcard include/config/ima.h) \\ $(wildcard include/config/fsnotify.h) \\ $(wildcard include/config/fs/encryption.h) \\ $(wildcard include/config/epoll.h) \\ $(wildcard include/config/file/locking.h) \\ $(wildcard include/config/quota.h) \\ $(wildcard include/config/blk/dev/loop.h) \\ $(wildcard include/config/fs/dax.h) \\ $(wildcard include/config/block.h) \\ $(wildcard include/config/mandatory/file/locking.h) \\ $(wildcard include/config/migration.h) \\ include/linux/wait_bit.h \\ include/linux/wait.h \\ include/uapi/linux/wait.h \\ include/linux/kdev_t.h \\ include/uapi/linux/kdev_t.h \\ include/linux/dcache.h \\ include/linux/rculist_bl.h \\ include/linux/list_bl.h \\ include/linux/bit_spinlock.h \\ include/linux/lockref.h \\ $(wildcard include/config/arch/use/cmpxchg/lockref.h) \\ include/generated/bounds.h \\ include/linux/stringhash.h \\ $(wildcard include/config/dcache/word/access.h) \\ include/linux/hash.h \\ $(wildcard include/config/have/arch/hash.h) \\ include/linux/path.h \\ include/linux/list_lru.h \\ $(wildcard include/config/memcg/kmem.h) \\ include/linux/shrinker.h \\ include/linux/radix-tree.h \\ $(wildcard include/config/radix/tree/multiorder.h) \\ include/linux/xarray.h \\ include/linux/pid.h \\ include/linux/mm_types.h \\ $(wildcard include/config/have/aligned/struct/page.h) \\ $(wildcard include/config/memcg.h) \\ $(wildcard include/config/userfaultfd.h) \\ $(wildcard include/config/have/arch/compat/mmap/bases.h) \\ $(wildcard include/config/membarrier.h) \\ $(wildcard include/config/aio.h) \\ $(wildcard include/config/mmu/notifier.h) \\ $(wildcard include/config/transparent/hugepage.h) \\ $(wildcard include/config/numa/balancing.h) \\ $(wildcard include/config/arch/want/batched/unmap/tlb/flush.h) \\ $(wildcard include/config/hugetlb/page.h) \\ $(wildcard include/config/hmm.h) \\ include/linux/mm_types_task.h \\ $(wildcard include/config/split/ptlock/cpus.h) \\ $(wildcard include/config/arch/enable/split/pmd/ptlock.h) \\ arch/x86/include/asm/tlbbatch.h \\ include/linux/auxvec.h \\ include/uapi/linux/auxvec.h \\ arch/x86/include/uapi/asm/auxvec.h \\ include/linux/completion.h \\ include/linux/uprobes.h \\ $(wildcard include/config/uprobes.h) \\ arch/x86/include/asm/uprobes.h \\ include/linux/notifier.h \\ $(wildcard include/config/tree/srcu.h) \\ include/linux/srcu.h \\ $(wildcard include/config/tiny/srcu.h) \\ $(wildcard include/config/srcu.h) \\ include/linux/rcu_segcblist.h \\ include/linux/srcutree.h \\ include/linux/rcu_node_tree.h \\ $(wildcard include/config/rcu/fanout.h) \\ $(wildcard include/config/rcu/fanout/leaf.h) \\ include/linux/page-flags-layout.h \\ include/linux/capability.h \\ include/uapi/linux/capability.h \\ include/linux/semaphore.h \\ include/linux/fcntl.h \\ include/uapi/linux/fcntl.h \\ arch/x86/include/uapi/asm/fcntl.h \\ include/uapi/asm-generic/fcntl.h \\ include/uapi/linux/fiemap.h \\ include/linux/migrate_mode.h \\ include/linux/percpu-rwsem.h \\ include/linux/rcuwait.h \\ include/linux/rcu_sync.h \\ include/linux/delayed_call.h \\ include/linux/uuid.h \\ include/uapi/linux/uuid.h \\ include/linux/errseq.h \\ include/linux/ioprio.h \\ include/linux/sched.h \\ $(wildcard include/config/virt/cpu/accounting/native.h) \\ $(wildcard include/config/sched/info.h) \\ $(wildcard include/config/schedstats.h) \\ $(wildcard include/config/fair/group/sched.h) \\ $(wildcard include/config/rt/group/sched.h) \\ $(wildcard include/config/cgroup/sched.h) \\ $(wildcard include/config/blk/dev/io/trace.h) \\ $(wildcard include/config/compat/brk.h) \\ $(wildcard include/config/cgroups.h) \\ $(wildcard include/config/blk/cgroup.h) \\ $(wildcard include/config/arch/has/scaled/cputime.h) \\ $(wildcard include/config/virt/cpu/accounting/gen.h) \\ $(wildcard include/config/posix/timers.h) \\ $(wildcard include/config/detect/hung/task.h) \\ $(wildcard include/config/auditsyscall.h) \\ $(wildcard include/config/rt/mutexes.h) \\ $(wildcard include/config/ubsan.h) \\ $(wildcard include/config/task/xacct.h) \\ $(wildcard include/config/cpusets.h) \\ $(wildcard include/config/intel/rdt.h) \\ $(wildcard include/config/futex.h) \\ $(wildcard include/config/perf/events.h) \\ $(wildcard include/config/rseq.h) \\ $(wildcard include/config/task/delay/acct.h) \\ $(wildcard include/config/fault/injection.h) \\ $(wildcard include/config/latencytop.h) \\ $(wildcard include/config/function/graph/tracer.h) \\ $(wildcard include/config/kcov.h) \\ $(wildcard include/config/bcache.h) \\ $(wildcard include/config/vmap/stack.h) \\ $(wildcard include/config/livepatch.h) \\ $(wildcard include/config/arch/task/struct/on/stack.h) \\ $(wildcard include/config/debug/rseq.h) \\ include/uapi/linux/sched.h \\ include/linux/shm.h \\ include/uapi/linux/shm.h \\ include/uapi/asm-generic/hugetlb_encode.h \\ arch/x86/include/uapi/asm/shmbuf.h \\ include/uapi/asm-generic/shmbuf.h \\ arch/x86/include/asm/shmparam.h \\ include/linux/kcov.h \\ include/uapi/linux/kcov.h \\ include/linux/plist.h \\ $(wildcard include/config/debug/pi/list.h) \\ include/linux/hrtimer.h \\ $(wildcard include/config/high/res/timers.h) \\ $(wildcard include/config/time/low/res.h) \\ $(wildcard include/config/timerfd.h) \\ include/linux/timerqueue.h \\ include/linux/seccomp.h \\ $(wildcard include/config/seccomp.h) \\ $(wildcard include/config/have/arch/seccomp/filter.h) \\ $(wildcard include/config/seccomp/filter.h) \\ $(wildcard include/config/checkpoint/restore.h) \\ include/uapi/linux/seccomp.h \\ arch/x86/include/asm/seccomp.h \\ arch/x86/include/asm/unistd.h \\ arch/x86/include/uapi/asm/unistd.h \\ arch/x86/include/generated/uapi/asm/unistd_64.h \\ arch/x86/include/generated/asm/unistd_64_x32.h \\ arch/x86/include/asm/ia32_unistd.h \\ arch/x86/include/generated/asm/unistd_32_ia32.h \\ include/asm-generic/seccomp.h \\ include/uapi/linux/unistd.h \\ include/linux/resource.h \\ include/uapi/linux/resource.h \\ arch/x86/include/uapi/asm/resource.h \\ include/asm-generic/resource.h \\ include/uapi/asm-generic/resource.h \\ include/linux/latencytop.h \\ include/linux/sched/prio.h \\ include/linux/signal_types.h \\ $(wildcard include/config/old/sigaction.h) \\ include/uapi/linux/signal.h \\ arch/x86/include/asm/signal.h \\ arch/x86/include/uapi/asm/signal.h \\ include/uapi/asm-generic/signal-defs.h \\ arch/x86/include/uapi/asm/siginfo.h \\ include/uapi/asm-generic/siginfo.h \\ include/linux/task_io_accounting.h \\ $(wildcard include/config/task/io/accounting.h) \\ include/uapi/linux/rseq.h \\ include/linux/sched/rt.h \\ include/linux/iocontext.h \\ include/uapi/linux/fs.h \\ include/uapi/linux/limits.h \\ include/linux/quota.h \\ $(wildcard include/config/quota/netlink/interface.h) \\ include/linux/percpu_counter.h \\ include/linux/gfp.h \\ $(wildcard include/config/zone/dma.h) \\ $(wildcard include/config/zone/dma32.h) \\ $(wildcard include/config/zone/device.h) \\ $(wildcard include/config/pm/sleep.h) \\ $(wildcard include/config/memory/isolation.h) \\ $(wildcard include/config/compaction.h) \\ $(wildcard include/config/cma.h) \\ include/linux/mmzone.h \\ $(wildcard include/config/force/max/zoneorder.h) \\ $(wildcard include/config/zsmalloc.h) \\ $(wildcard include/config/memory/hotplug.h) \\ $(wildcard include/config/flat/node/mem/map.h) \\ $(wildcard include/config/page/extension.h) \\ $(wildcard include/config/no/bootmem.h) \\ $(wildcard include/config/deferred/struct/page/init.h) \\ $(wildcard include/config/have/memory/present.h) \\ $(wildcard include/config/have/memblock/node/map.h) \\ $(wildcard include/config/have/arch/early/pfn/to/nid.h) \\ $(wildcard include/config/sparsemem/extreme.h) \\ $(wildcard include/config/memory/hotremove.h) \\ $(wildcard include/config/have/arch/pfn/valid.h) \\ $(wildcard include/config/holes/in/zone.h) \\ $(wildcard include/config/arch/has/holes/memorymodel.h) \\ include/linux/pageblock-flags.h \\ $(wildcard include/config/hugetlb/page/size/variable.h) \\ include/linux/memory_hotplug.h \\ $(wildcard include/config/arch/has/add/pages.h) \\ $(wildcard include/config/have/arch/nodedata/extension.h) \\ $(wildcard include/config/have/bootmem/info/node.h) \\ arch/x86/include/asm/mmzone.h \\ arch/x86/include/asm/mmzone_64.h \\ include/linux/topology.h \\ $(wildcard include/config/use/percpu/numa/node/id.h) \\ $(wildcard include/config/sched/smt.h) \\ include/uapi/linux/dqblk_xfs.h \\ include/linux/dqblk_v1.h \\ include/linux/dqblk_v2.h \\ include/linux/dqblk_qtree.h \\ include/linux/projid.h \\ include/uapi/linux/quota.h \\ include/linux/nfs_fs_i.h \\ include/uapi/linux/aio_abi.h \\ include/linux/uaccess.h \\ arch/x86/include/asm/uaccess.h \\ $(wildcard include/config/x86/intel/usercopy.h) \\ arch/x86/include/asm/smap.h \\ $(wildcard include/config/x86/smap.h) \\ arch/x86/include/asm/extable.h \\ arch/x86/include/asm/uaccess_64.h \\ arch/x86/include/asm/compat.h \\ include/linux/sched/task_stack.h \\ $(wildcard include/config/stack/growsup.h) \\ $(wildcard include/config/debug/stack/usage.h) \\ include/uapi/linux/magic.h \\ arch/x86/include/asm/user32.h \\ arch/x86/include/asm/syscall_wrapper.h \\ $(wildcard include/config/x86/x32.h) \\ include/uapi/linux/ethtool.h \\ include/linux/if_ether.h \\ include/linux/skbuff.h \\ $(wildcard include/config/nf/conntrack.h) \\ $(wildcard include/config/bridge/netfilter.h) \\ $(wildcard include/config/xfrm.h) \\ $(wildcard include/config/ipv6/ndisc/nodetype.h) \\ $(wildcard include/config/net/rx/busy/poll.h) \\ $(wildcard include/config/network/secmark.h) \\ $(wildcard include/config/have/efficient/unaligned/access.h) \\ $(wildcard include/config/network/phy/timestamping.h) \\ $(wildcard include/config/netfilter/xt/target/trace.h) \\ $(wildcard include/config/nf/tables.h) \\ $(wildcard include/config/ip/vs.h) \\ include/linux/net.h \\ include/linux/random.h \\ $(wildcard include/config/gcc/plugin/latent/entropy.h) \\ $(wildcard include/config/arch/random.h) \\ include/linux/once.h \\ include/uapi/linux/random.h \\ include/linux/irqnr.h \\ include/uapi/linux/irqnr.h \\ arch/x86/include/asm/archrandom.h \\ include/uapi/linux/net.h \\ include/linux/textsearch.h \\ include/linux/slab.h \\ $(wildcard include/config/debug/slab.h) \\ $(wildcard include/config/failslab.h) \\ $(wildcard include/config/have/hardened/usercopy/allocator.h) \\ $(wildcard include/config/slab.h) \\ $(wildcard include/config/slub.h) \\ $(wildcard include/config/slob.h) \\ include/linux/kasan.h \\ include/net/checksum.h \\ arch/x86/include/asm/checksum.h \\ arch/x86/include/asm/checksum_64.h \\ include/linux/dma-mapping.h \\ $(wildcard include/config/have/generic/dma/coherent.h) \\ $(wildcard include/config/has/dma.h) \\ $(wildcard include/config/arch/has/dma/set/coherent/mask.h) \\ $(wildcard include/config/need/dma/map/state.h) \\ include/linux/sizes.h \\ include/linux/device.h \\ $(wildcard include/config/debug/devres.h) \\ $(wildcard include/config/generic/msi/irq/domain.h) \\ $(wildcard include/config/pinctrl.h) \\ $(wildcard include/config/generic/msi/irq.h) \\ $(wildcard include/config/dma/cma.h) \\ $(wildcard include/config/of.h) \\ $(wildcard include/config/devtmpfs.h) \\ $(wildcard include/config/sysfs/deprecated.h) \\ include/linux/ioport.h \\ include/linux/kobject.h \\ $(wildcard include/config/uevent/helper.h) \\ $(wildcard include/config/debug/kobject/release.h) \\ include/linux/sysfs.h \\ include/linux/kernfs.h \\ $(wildcard include/config/kernfs.h) \\ include/linux/idr.h \\ include/linux/kobject_ns.h \\ include/linux/kref.h \\ include/linux/klist.h \\ include/linux/pm.h \\ $(wildcard include/config/vt/console/sleep.h) \\ $(wildcard include/config/pm.h) \\ $(wildcard include/config/pm/clk.h) \\ $(wildcard include/config/pm/generic/domains.h) \\ include/linux/ratelimit.h \\ arch/x86/include/asm/device.h \\ $(wildcard include/config/intel/iommu.h) \\ $(wildcard include/config/amd/iommu.h) \\ $(wildcard include/config/sta2x11.h) \\ $(wildcard include/config/x86/dev/dma/ops.h) \\ $(wildcard include/config/pci/domains.h) \\ include/linux/pm_wakeup.h \\ include/linux/dma-debug.h \\ $(wildcard include/config/dma/api/debug.h) \\ include/linux/dma-direction.h \\ include/linux/scatterlist.h \\ $(wildcard include/config/need/sg/dma/length.h) \\ $(wildcard include/config/debug/sg.h) \\ $(wildcard include/config/sgl/alloc.h) \\ $(wildcard include/config/arch/has/sg/chain.h) \\ $(wildcard include/config/sg/pool.h) \\ include/linux/mm.h \\ $(wildcard include/config/have/arch/mmap/rnd/bits.h) \\ $(wildcard include/config/have/arch/mmap/rnd/compat/bits.h) \\ $(wildcard include/config/arch/uses/high/vma/flags.h) \\ $(wildcard include/config/arch/has/pkeys.h) \\ $(wildcard include/config/ppc.h) \\ $(wildcard include/config/parisc.h) \\ $(wildcard include/config/ia64.h) \\ $(wildcard include/config/sparc64.h) \\ $(wildcard include/config/dev/pagemap/ops.h) \\ $(wildcard include/config/shmem.h) \\ $(wildcard include/config/have/memblock.h) \\ $(wildcard include/config/debug/vm/rb.h) \\ $(wildcard include/config/page/poisoning.h) \\ $(wildcard include/config/debug/pagealloc.h) \\ $(wildcard include/config/hibernation.h) \\ $(wildcard include/config/hugetlbfs.h) \\ include/linux/percpu-refcount.h \\ include/linux/page_ext.h \\ $(wildcard include/config/idle/page/tracking.h) \\ include/linux/stacktrace.h \\ $(wildcard include/config/stacktrace.h) \\ $(wildcard include/config/user/stacktrace/support.h) \\ include/linux/stackdepot.h \\ include/linux/page_ref.h \\ $(wildcard include/config/debug/page/ref.h) \\ include/linux/page-flags.h \\ $(wildcard include/config/arch/uses/pg/uncached.h) \\ $(wildcard include/config/memory/failure.h) \\ $(wildcard include/config/swap.h) \\ $(wildcard include/config/thp/swap.h) \\ $(wildcard include/config/ksm.h) \\ include/linux/memremap.h \\ arch/x86/include/asm/pgtable.h \\ $(wildcard include/config/debug/wx.h) \\ $(wildcard include/config/have/arch/transparent/hugepage/pud.h) \\ $(wildcard include/config/have/arch/soft/dirty.h) \\ $(wildcard include/config/arch/enable/thp/migration.h) \\ arch/x86/include/asm/pgtable_64.h \\ arch/x86/include/asm/pgtable-invert.h \\ include/asm-generic/pgtable.h \\ $(wildcard include/config/have/arch/huge/vmap.h) \\ $(wildcard include/config/x86/espfix64.h) \\ include/linux/huge_mm.h \\ include/linux/sched/coredump.h \\ $(wildcard include/config/core/dump/default/elf/headers.h) \\ include/linux/vmstat.h \\ $(wildcard include/config/vm/event/counters.h) \\ $(wildcard include/config/debug/tlbflush.h) \\ $(wildcard include/config/debug/vm/vmacache.h) \\ include/linux/vm_event_item.h \\ $(wildcard include/config/memory/balloon.h) \\ $(wildcard include/config/balloon/compaction.h) \\ arch/x86/include/asm/dma-mapping.h \\ $(wildcard include/config/isa.h) \\ arch/x86/include/asm/swiotlb.h \\ $(wildcard include/config/swiotlb.h) \\ include/linux/swiotlb.h \\ include/linux/dma-contiguous.h \\ include/linux/netdev_features.h \\ include/linux/sched/clock.h \\ $(wildcard include/config/have/unstable/sched/clock.h) \\ $(wildcard include/config/irq/time/accounting.h) \\ include/net/flow_dissector.h \\ include/linux/in6.h \\ include/uapi/linux/in6.h \\ include/uapi/linux/if_ether.h \\ include/linux/splice.h \\ include/linux/pipe_fs_i.h \\ include/uapi/linux/if_packet.h \\ include/net/flow.h \\ include/net/net_namespace.h \\ $(wildcard include/config/ieee802154/6lowpan.h) \\ $(wildcard include/config/ip/sctp.h) \\ $(wildcard include/config/ip/dccp.h) \\ $(wildcard include/config/netfilter.h) \\ $(wildcard include/config/nf/defrag/ipv6.h) \\ $(wildcard include/config/netfilter/netlink/acct.h) \\ $(wildcard include/config/nf/ct/netlink/timeout.h) \\ $(wildcard include/config/wext/core.h) \\ $(wildcard include/config/mpls.h) \\ $(wildcard include/config/can.h) \\ $(wildcard include/config/net/ns.h) \\ include/linux/sysctl.h \\ include/uapi/linux/sysctl.h \\ include/net/netns/core.h \\ include/net/netns/mib.h \\ $(wildcard include/config/xfrm/statistics.h) \\ include/net/snmp.h \\ include/uapi/linux/snmp.h \\ include/linux/u64_stats_sync.h \\ include/net/netns/unix.h \\ include/net/netns/packet.h \\ include/net/netns/ipv4.h \\ $(wildcard include/config/ip/multiple/tables.h) \\ $(wildcard include/config/ip/route/classid.h) \\ $(wildcard include/config/ip/mroute.h) \\ $(wildcard include/config/ip/mroute/multiple/tables.h) \\ $(wildcard include/config/ip/route/multipath.h) \\ include/net/inet_frag.h \\ include/linux/siphash.h \\ include/net/netns/ipv6.h \\ $(wildcard include/config/ipv6/multiple/tables.h) \\ $(wildcard include/config/ipv6/mroute.h) \\ $(wildcard include/config/ipv6/mroute/multiple/tables.h) \\ include/net/dst_ops.h \\ include/net/netns/ieee802154_6lowpan.h \\ include/net/netns/sctp.h \\ include/net/netns/dccp.h \\ include/net/netns/netfilter.h \\ $(wildcard include/config/netfilter/family/arp.h) \\ $(wildcard include/config/netfilter/family/bridge.h) \\ $(wildcard include/config/nf/defrag/ipv4.h) \\ include/linux/netfilter_defs.h \\ include/uapi/linux/netfilter.h \\ include/linux/in.h \\ include/uapi/linux/in.h \\ include/net/netns/x_tables.h \\ $(wildcard include/config/bridge/nf/ebtables.h) \\ include/net/netns/conntrack.h \\ $(wildcard include/config/nf/ct/proto/dccp.h) \\ $(wildcard include/config/nf/ct/proto/sctp.h) \\ $(wildcard include/config/nf/conntrack/events.h) \\ $(wildcard include/config/nf/conntrack/labels.h) \\ include/linux/list_nulls.h \\ include/linux/netfilter/nf_conntrack_tcp.h \\ include/uapi/linux/netfilter/nf_conntrack_tcp.h \\ include/linux/netfilter/nf_conntrack_dccp.h \\ include/uapi/linux/netfilter/nf_conntrack_tuple_common.h \\ include/linux/netfilter/nf_conntrack_common.h \\ include/uapi/linux/netfilter/nf_conntrack_common.h \\ include/linux/netfilter/nf_conntrack_sctp.h \\ include/uapi/linux/netfilter/nf_conntrack_sctp.h \\ include/net/netns/nftables.h \\ include/net/netns/xfrm.h \\ include/uapi/linux/xfrm.h \\ include/net/netns/mpls.h \\ include/net/netns/can.h \\ include/linux/ns_common.h \\ include/linux/seq_file_net.h \\ include/linux/seq_file.h \\ include/linux/cred.h \\ $(wildcard include/config/debug/credentials.h) \\ $(wildcard include/config/keys.h) \\ include/linux/key.h \\ include/linux/assoc_array.h \\ $(wildcard include/config/associative/array.h) \\ include/linux/selinux.h \\ $(wildcard include/config/security/selinux.h) \\ include/linux/sched/user.h \\ $(wildcard include/config/fanotify.h) \\ $(wildcard include/config/posix/mqueue.h) \\ $(wildcard include/config/bpf/syscall.h) \\ $(wildcard include/config/net.h) \\ include/net/dcbnl.h \\ include/uapi/linux/dcbnl.h \\ include/net/netprio_cgroup.h \\ include/linux/cgroup.h \\ $(wildcard include/config/cgroup/cpuacct.h) \\ $(wildcard include/config/sock/cgroup/data.h) \\ $(wildcard include/config/cgroup/net/classid.h) \\ $(wildcard include/config/cgroup/data.h) \\ include/uapi/linux/cgroupstats.h \\ include/uapi/linux/taskstats.h \\ include/linux/nsproxy.h \\ include/linux/user_namespace.h \\ $(wildcard include/config/inotify/user.h) \\ $(wildcard include/config/persistent/keyrings.h) \\ include/linux/kernel_stat.h \\ include/linux/interrupt.h \\ $(wildcard include/config/irq/forced/threading.h) \\ $(wildcard include/config/generic/irq/probe.h) \\ $(wildcard include/config/irq/timings.h) \\ include/linux/irqreturn.h \\ include/linux/hardirq.h \\ include/linux/ftrace_irq.h \\ $(wildcard include/config/ftrace/nmi/enter.h) \\ $(wildcard include/config/hwlat/tracer.h) \\ include/linux/vtime.h \\ $(wildcard include/config/virt/cpu/accounting.h) \\ include/linux/context_tracking_state.h \\ $(wildcard include/config/context/tracking.h) \\ arch/x86/include/asm/irq.h \\ arch/x86/include/asm/sections.h \\ include/asm-generic/sections.h \\ include/linux/cgroup-defs.h \\ include/linux/bpf-cgroup.h \\ $(wildcard include/config/cgroup/bpf.h) \\ include/uapi/linux/bpf.h \\ $(wildcard include/config/efficient/unaligned/access.h) \\ $(wildcard include/config/bpf/kprobe/override.h) \\ $(wildcard include/config/function/error/injection.h) \\ $(wildcard include/config/bpf/lirc/mode2.h) \\ include/uapi/linux/bpf_common.h \\ include/linux/cgroup_subsys.h \\ $(wildcard include/config/cgroup/device.h) \\ $(wildcard include/config/cgroup/freezer.h) \\ $(wildcard include/config/cgroup/perf.h) \\ $(wildcard include/config/cgroup/hugetlb.h) \\ $(wildcard include/config/cgroup/pids.h) \\ $(wildcard include/config/cgroup/rdma.h) \\ $(wildcard include/config/cgroup/debug.h) \\ include/net/xdp.h \\ include/uapi/linux/neighbour.h \\ include/linux/netlink.h \\ include/net/scm.h \\ $(wildcard include/config/security/network.h) \\ include/linux/security.h \\ $(wildcard include/config/security/infiniband.h) \\ $(wildcard include/config/security/network/xfrm.h) \\ $(wildcard include/config/security/path.h) \\ $(wildcard include/config/audit.h) \\ $(wildcard include/config/securityfs.h) \\ include/linux/sched/signal.h \\ $(wildcard include/config/sched/autogroup.h) \\ $(wildcard include/config/bsd/process/acct.h) \\ $(wildcard include/config/taskstats.h) \\ include/linux/signal.h \\ include/linux/sched/jobctl.h \\ include/linux/sched/task.h \\ $(wildcard include/config/have/copy/thread/tls.h) \\ $(wildcard include/config/have/exit/thread.h) \\ $(wildcard include/config/arch/wants/dynamic/task/struct.h) \\ $(wildcard include/config/have/arch/thread/struct/whitelist.h) \\ include/uapi/linux/netlink.h \\ include/uapi/linux/netdevice.h \\ include/linux/if_link.h \\ include/uapi/linux/if_link.h \\ include/uapi/linux/if_bonding.h \\ include/uapi/linux/pkt_cls.h \\ $(wildcard include/config/net/cls/ind.h) \\ include/uapi/linux/pkt_sched.h \\ include/linux/hashtable.h \\ include/linux/etherdevice.h \\ arch/x86/include/asm/unaligned.h \\ include/linux/unaligned/access_ok.h \\ include/linux/unaligned/generic.h \\ include/net/rtnetlink.h \\ include/linux/rtnetlink.h \\ $(wildcard include/config/net/ingress.h) \\ $(wildcard include/config/net/egress.h) \\ include/uapi/linux/rtnetlink.h \\ include/uapi/linux/if_addr.h \\ include/net/netlink.h \\ include/net/dst.h \\ include/net/neighbour.h \\ include/net/xfrm.h \\ $(wildcard include/config/xfrm/sub/policy.h) \\ $(wildcard include/config/xfrm/migrate.h) \\ include/uapi/linux/pfkeyv2.h \\ include/uapi/linux/ipsec.h \\ include/linux/audit.h \\ $(wildcard include/config/audit/compat/generic.h) \\ include/linux/ptrace.h \\ include/linux/pid_namespace.h \\ $(wildcard include/config/pid/ns.h) \\ include/uapi/linux/ptrace.h \\ include/uapi/linux/audit.h \\ include/uapi/linux/elf-em.h \\ arch/x86/include/asm/syscall.h \\ arch/x86/include/asm/asm-offsets.h \\ include/generated/asm-offsets.h \\ include/net/sock.h \\ $(wildcard include/config/sock/validate/xmit.h) \\ $(wildcard include/config/inet.h) \\ include/linux/page_counter.h \\ include/linux/memcontrol.h \\ $(wildcard include/config/memcg/swap.h) \\ include/linux/vmpressure.h \\ include/linux/eventfd.h \\ $(wildcard include/config/eventfd.h) \\ include/linux/writeback.h \\ include/linux/flex_proportions.h \\ include/linux/backing-dev-defs.h \\ $(wildcard include/config/debug/fs.h) \\ include/linux/blk_types.h \\ $(wildcard include/config/alpha.h) \\ $(wildcard include/config/blk/dev/integrity.h) \\ include/linux/bvec.h \\ include/linux/bio.h \\ include/linux/highmem.h \\ arch/x86/include/asm/cacheflush.h \\ include/asm-generic/cacheflush.h \\ include/linux/mempool.h \\ include/linux/filter.h \\ $(wildcard include/config/bpf/jit.h) \\ $(wildcard include/config/have/ebpf/jit.h) \\ include/linux/cryptohash.h \\ include/linux/set_memory.h \\ $(wildcard include/config/arch/has/set/memory.h) \\ arch/x86/include/asm/set_memory.h \\ include/asm-generic/set_memory.h \\ include/linux/kallsyms.h \\ $(wildcard include/config/kallsyms/all.h) \\ $(wildcard include/config/kallsyms.h) \\ include/linux/module.h \\ $(wildcard include/config/modules/tree/lookup.h) \\ $(wildcard include/config/module/sig.h) \\ $(wildcard include/config/event/tracing.h) \\ $(wildcard include/config/module/unload.h) \\ $(wildcard include/config/constructors.h) \\ include/linux/kmod.h \\ include/linux/umh.h \\ include/linux/elf.h \\ arch/x86/include/asm/elf.h \\ arch/x86/include/asm/user.h \\ arch/x86/include/asm/user_64.h \\ arch/x86/include/asm/vdso.h \\ include/uapi/linux/elf.h \\ include/linux/moduleparam.h \\ $(wildcard include/config/ppc64.h) \\ include/linux/rbtree_latch.h \\ include/linux/error-injection.h \\ arch/x86/include/asm/error-injection.h \\ include/asm-generic/error-injection.h \\ arch/x86/include/asm/module.h \\ $(wildcard include/config/unwinder/orc.h) \\ $(wildcard include/config/m486.h) \\ $(wildcard include/config/m586.h) \\ $(wildcard include/config/m586tsc.h) \\ $(wildcard include/config/m586mmx.h) \\ $(wildcard include/config/mcore2.h) \\ $(wildcard include/config/m686.h) \\ $(wildcard include/config/mpentiumii.h) \\ $(wildcard include/config/mpentiumiii.h) \\ $(wildcard include/config/mpentiumm.h) \\ $(wildcard include/config/mpentium4.h) \\ $(wildcard include/config/mk6.h) \\ $(wildcard include/config/mk8.h) \\ $(wildcard include/config/melan.h) \\ $(wildcard include/config/mcrusoe.h) \\ $(wildcard include/config/mefficeon.h) \\ $(wildcard include/config/mwinchipc6.h) \\ $(wildcard include/config/mwinchip3d.h) \\ $(wildcard include/config/mcyrixiii.h) \\ $(wildcard include/config/mviac3/2.h) \\ $(wildcard include/config/mviac7.h) \\ $(wildcard include/config/mgeodegx1.h) \\ $(wildcard include/config/mgeode/lx.h) \\ include/asm-generic/module.h \\ $(wildcard include/config/have/mod/arch/specific.h) \\ $(wildcard include/config/modules/use/elf/rel.h) \\ $(wildcard include/config/modules/use/elf/rela.h) \\ arch/x86/include/asm/orc_types.h \\ include/linux/if_vlan.h \\ include/uapi/linux/if_vlan.h \\ include/net/sch_generic.h \\ include/uapi/linux/pkt_cls.h \\ include/net/gen_stats.h \\ include/uapi/linux/gen_stats.h \\ include/uapi/linux/filter.h \\ include/linux/rculist_nulls.h \\ include/linux/poll.h \\ include/uapi/linux/poll.h \\ arch/x86/include/generated/uapi/asm/poll.h \\ include/uapi/asm-generic/poll.h \\ include/uapi/linux/eventpoll.h \\ include/net/tcp_states.h \\ include/uapi/linux/net_tstamp.h \\ include/net/smc.h \\ include/net/l3mdev.h \\ include/net/fib_rules.h \\ include/uapi/linux/fib_rules.h \\ include/net/fib_notifier.h \\ include/net/ip.h \\ include/linux/ip.h \\ include/uapi/linux/ip.h \\ include/linux/jhash.h \\ include/linux/unaligned/packed_struct.h \\ include/net/inet_sock.h \\ include/net/request_sock.h \\ include/net/netns/hash.h \\ include/net/route.h \\ include/net/inetpeer.h \\ include/net/ipv6.h \\ include/linux/ipv6.h \\ $(wildcard include/config/ipv6/router/pref.h) \\ $(wildcard include/config/ipv6/route/info.h) \\ $(wildcard include/config/ipv6/optimistic/dad.h) \\ $(wildcard include/config/ipv6/seg6/hmac.h) \\ $(wildcard include/config/ipv6/mip6.h) \\ $(wildcard include/config/ipv6/subtrees.h) \\ include/uapi/linux/ipv6.h \\ include/linux/icmpv6.h \\ include/uapi/linux/icmpv6.h \\ include/linux/tcp.h \\ $(wildcard include/config/smc.h) \\ $(wildcard include/config/bpf.h) \\ $(wildcard include/config/tcp/md5sig.h) \\ include/linux/win_minmax.h \\ include/net/inet_connection_sock.h \\ include/net/inet_timewait_sock.h \\ include/net/timewait_sock.h \\ include/uapi/linux/tcp.h \\ include/linux/udp.h \\ include/uapi/linux/udp.h \\ include/net/if_inet6.h \\ include/net/ndisc.h \\ include/linux/if_arp.h \\ $(wildcard include/config/firewire/net.h) \\ include/uapi/linux/if_arp.h \\ include/net/ip_fib.h \\ include/uapi/linux/in_route.h \\ include/uapi/linux/route.h \\ include/net/ip6_fib.h \\ include/linux/ipv6_route.h \\ include/uapi/linux/ipv6_route.h \\ include/net/gro_cells.h \\ include/uapi/linux/veth.h \\ /home/lu-yi-hsun/Dropbox/my-project/driver/veth.o: $(deps_/home/lu-yi-hsun/Dropbox/my-project/driver/veth.o) $(deps_/home/lu-yi-hsun/Dropbox/my-project/driver/veth.o): ",16280,True,4549.604994563679,median "/********* wemos-d1mini-warninglight.ino Created on : 2020-04-25 Author : Bruno Brito Semedo Wemos D1 Mini sends an HTTP request to the specified status endpoint if the status is ""pass"", the warning light is switched off else if the status is ""fail"", the warning light is switched on The warning light stays switch on as long as the status is not ""pass"" *********/ #include #include #include #include #include #include #include #include #include // maximum number of seconds between resets that // counts as a double reset #define DRD_TIMEOUT 2.0 // address to the block in the RTC user memory #define DRD_ADDRESS 0x00 ESP8266WiFiMulti WiFiMulti; AsyncWebServer server(80); DNSServer dns; DoubleResetDetect drd(DRD_TIMEOUT, DRD_ADDRESS); const uint8_t pin_relay = 5; const uint8_t setup_wait = 5; const char* endpoint_url_default = """"; const unsigned long check_interval_default = 15000; unsigned long check_interval_time = 0; const unsigned long check_retry_default = 3; const char* PARAM_ENDPOINT_URL = ""endpoint_url""; const char* PARAM_CHECK_INTERVAL = ""check_interval""; const char* PARAM_CHECK_RETRY = ""check_retry""; const char index_html[] PROGMEM = R""rawliteral( Dashboard | Warning Light

%endpoint_url%

SYSTEM INFORMATION

%cpu_frequency%
%system_heap%
%wifi_ssid%
Go to Admin
)rawliteral""; const char admin_html[] PROGMEM = R""rawliteral( Admin | Warning Light

Probe

0 to disable retry

WiFi

Board

Go to Dashboard
)rawliteral""; const char redirect_home[] PROGMEM = R""rawliteral( Warning Light )rawliteral""; void logRoute(AsyncWebServerRequest *request) { Serial.print(""[HTTP] ""); Serial.print(request->client()->remoteIP()); Serial.print("" ""); Serial.println(request->url()); } void notFound(AsyncWebServerRequest *request) { logRoute(request); request->send(404, ""text/plain"", """"); } void handleRoot(AsyncWebServerRequest *request) { logRoute(request); request->send_P(200, ""text/html"", index_html, processor); } void handleAdmin(AsyncWebServerRequest *request) { logRoute(request); request->send_P(200, ""text/html"", admin_html, processor); } void handleConfigure(AsyncWebServerRequest *request) { logRoute(request); String inputMessage; if (request->hasParam(PARAM_ENDPOINT_URL)) { inputMessage = request->getParam(PARAM_ENDPOINT_URL)->value(); writeFile(SPIFFS, ""/endpoint_url.txt"", inputMessage.c_str()); } else if (request->hasParam(PARAM_CHECK_INTERVAL)) { inputMessage = request->getParam(PARAM_CHECK_INTERVAL)->value(); writeFile(SPIFFS, ""/check_interval.txt"", inputMessage.c_str()); } else if (request->hasParam(PARAM_CHECK_RETRY)) { inputMessage = request->getParam(PARAM_CHECK_RETRY)->value(); writeFile(SPIFFS, ""/check_retry.txt"", inputMessage.c_str()); } else { inputMessage = ""[HTTP] /configure: No message sent""; } request->send(200, ""text/text"", inputMessage); } void handleReset(AsyncWebServerRequest *request) { logRoute(request); request->send(200, ""text/html"", redirect_home); delay(2000); reset(); } void handleResetFactory(AsyncWebServerRequest *request) { logRoute(request); request->send(200, ""text/html"", redirect_home); resetFactory(); } void handleRestart(AsyncWebServerRequest *request) { logRoute(request); request->send(200, ""text/html"", redirect_home); delay(2000); restart(); } void handleWiFiDisconnect(AsyncWebServerRequest *request) { logRoute(request); request->send(200, ""text/html"", ""redirect_home""); disconnectWiFi(); } String readFile(fs::FS &fs, const char * path){ File file = fs.open(path, ""r""); if(!file || file.isDirectory()){ Serial.printf(""[FILE] OPEN %s... failure\\r\\n"", path); return String(); } String fileContent; while(file.available()){ fileContent+=String((char)file.read()); } file.close(); return fileContent; } void writeFile(fs::FS &fs, const char * path, const char * message){ Serial.printf(""[FILE] WRITE %s...\\r\\n"", path); Serial.println(message); File file = fs.open(path, ""w""); if(!file){ Serial.println(""[FILE] OPEN... failure""); return; } if(file.print(message)){ Serial.println(""[FILE] WRITE... success""); } else { Serial.println(""[FILE] WRITE... failure""); } file.close(); } // replace placeholder with stored values String processor(const String& var){ //Serial.println(var); if(var == ""endpoint_url""){ return readFile(SPIFFS, ""/endpoint_url.txt""); } else if(var == ""check_interval"") { return readFile(SPIFFS, ""/check_interval.txt""); } else if(var == ""check_retry"") { return readFile(SPIFFS, ""/check_retry.txt""); } else if(var == ""check_status"") { return readFile(SPIFFS, ""/check_status.txt""); } else if(var == ""cpu_frequency"") { String cpu_frequency = String(ESP.getCpuFreqMHz()) + "" MHz""; return cpu_frequency; } else if(var == ""system_heap"") { String system_heap = String(ESP.getFreeHeap()) + "" bytes""; return system_heap; } else if(var == ""wifi_ssid"") { return WiFi.SSID();; } return String(); } void reset() { ESP.reset(); delay(1000); } void resetFactory() { Serial.println(""[SYSTEM] Factory reset...""); Serial.print(""[SYSTEM] Clear WiFi credentials...""); AsyncWiFiManager wifiManager(&server,&dns); wifiManager.resetSettings(); Serial.print("" success""); Serial.print(""[SYSTEM] Format filesystem...""); if(SPIFFS.format()) { Serial.print("" success""); } else { Serial.print("" failure""); } reset(); } void restart() { ESP.restart(); delay(1000); } void disconnectWiFi() { Serial.print(""[WIFI] Disconnect...""); AsyncWiFiManager wifiManager(&server,&dns); wifiManager.resetSettings(); if(WiFi.status() == WL_DISCONNECTED ) { Serial.println("" success""); reset(); return; } Serial.println("" failure""); } void checkEndpoint(int retry) { const unsigned long check_retry = atol(readFile(SPIFFS, ""/check_retry.txt"").c_str()); if (check_retry == 0) { Serial.println(""[HTTP] Retry disabled.""); } else if (retry < check_retry) { Serial.printf(""[HTTP] Retry... %d\\n"", retry); delay(200); } else if (retry < 0) { // all retries have been performed return; } WiFiClient client; HTTPClient http; http.setTimeout(5000); Serial.print(""[HTTP] begin...\\n""); if (http.begin(client, readFile(SPIFFS, ""/endpoint_url.txt""))) { Serial.print(""[HTTP] GET...\\n""); int httpCode = http.GET(); if (httpCode > 0) { // httpCode will be negative on error // HTTP header has been send and Server response header has been handled Serial.printf(""[HTTP] GET... code: %d\\n"", httpCode); // file found at server if (httpCode == HTTP_CODE_OK) { String payload = http.getString(); Serial.println(payload); bool pass = (payload == ""ok"" || payload == ""up"" || payload == ""pass""); if (pass && digitalRead(pin_relay) == HIGH) { // switch off the warning light, if on digitalWrite(pin_relay, LOW); } else if (!pass && digitalRead(pin_relay) == LOW) { // switch on the warning light, if off digitalWrite(pin_relay, HIGH); } // save last check to memory writeFile(SPIFFS, ""/check_status.txt"", (pass ? ""pass"" : ""fail"")); } } else { // error with unsupported HTTP code Serial.printf(""[HTTP] GET... failed, error: %s\\n"", http.errorToString(httpCode).c_str()); const int n_retry = retry - 1; checkEndpoint(n_retry); if (retry == 0 && digitalRead(pin_relay) == LOW) { digitalWrite(pin_relay, HIGH); } writeFile(SPIFFS, ""/check_status.txt"", ""fail""); } http.end(); } else { // unable to contact server Serial.printf(""[HTTP] Unable to connect\\n""); const int n_retry = retry - 1; checkEndpoint(n_retry); if (retry == 0 && digitalRead(pin_relay) == LOW) { digitalWrite(pin_relay, HIGH); } writeFile(SPIFFS, ""/check_status.txt"", ""fail""); } } void ota(){ // Hostname defaults to esp8266-[ChipID] // char cstr[16]; // const char* chip_id = itoa(ESP.getChipId(), cstr, 10); // ArduinoOTA.setHostname(chip_id); // No authentication by default ArduinoOTA.setPassword((const char *)""845210""); ArduinoOTA.onStart([]() { Serial.println(""[OTA] Start""); }); ArduinoOTA.onEnd([]() { Serial.println(""\\n[OTA] End""); }); ArduinoOTA.onProgress([](unsigned int progress, unsigned int total) { Serial.printf(""[OTA] Progress %u%%\\r"", (progress / (total / 100))); }); ArduinoOTA.onError([](ota_error_t error) { Serial.printf(""[OTA] Error[%u]: "", error); if (error == OTA_AUTH_ERROR) Serial.println(""Auth Failed""); else if (error == OTA_BEGIN_ERROR) Serial.println(""Begin Failed""); else if (error == OTA_CONNECT_ERROR) Serial.println(""Connect Failed""); else if (error == OTA_RECEIVE_ERROR) Serial.println(""Receive Failed""); else if (error == OTA_END_ERROR) Serial.println(""End Failed""); }); ArduinoOTA.begin(); Serial.println(""[OTA] Ready""); } void setup() { // check double reset if (drd.detect()) { Serial.println(""[SYSTEM] Double reset detected""); resetFactory(); } // initialize pin pinMode(pin_relay, OUTPUT); Serial.begin(115200); // Serial.setDebugOutput(true); Serial.println(); Serial.println(); Serial.println(); // initialize SPIFFS if(!SPIFFS.begin()){ Serial.println(""[SPIFFS] Error on mount""); return; } // store default values if(readFile(SPIFFS, ""/endpoint_url.txt"") == """") { writeFile(SPIFFS, ""/endpoint_url.txt"", endpoint_url_default); } if(readFile(SPIFFS, ""/check_interval.txt"") == """") { char cstr[16]; const char* check_interval = itoa(check_interval_default, cstr, 10); writeFile(SPIFFS, ""/check_interval.txt"", check_interval); } if(readFile(SPIFFS, ""/check_retry.txt"") == """") { char cstr[16]; const char* check_retry = itoa(check_retry_default, cstr, 10); writeFile(SPIFFS, ""/check_retry.txt"", check_retry); } for (uint8_t t = setup_wait; t > 0; t--) { Serial.printf(""[SETUP] WAIT %d...\\n"", t); Serial.flush(); // indicate visual cue for setup digitalWrite(pin_relay, (t % 2) ? LOW : HIGH); delay(1000); } // keep the warning light on digitalWrite(pin_relay, HIGH); // connect to WiFi AsyncWiFiManager wifiManager(&server,&dns); wifiManager.autoConnect(); // wait for WiFi connection Serial.print(""[WIFI] CONNECT""); while (WiFi.status() != WL_CONNECTED) { delay(500); Serial.print("".""); } Serial.println("" connected""); // show IP address Serial.print(""[WIFI] IP address: ""); Serial.println(WiFi.localIP()); // initialize OTA ota(); // Set routes server.on(""/"", HTTP_GET, handleRoot); server.on(""/admin"", HTTP_GET, handleAdmin); server.on(""/configure"", HTTP_GET, handleConfigure); server.on(""/reset/factory"", HTTP_POST, handleResetFactory); server.on(""/reset"", HTTP_POST, handleReset); server.on(""/restart"", HTTP_POST, handleRestart); server.on(""/wifi/disconnect"", HTTP_POST, handleWiFiDisconnect); server.onNotFound(notFound); server.begin(); } void loop() { ArduinoOTA.handle(); // check WiFi connection (connect if required) if ((WiFiMulti.run() == WL_CONNECTED)) { // check timer unsigned long current_time = millis(); const unsigned long check_interval = atol(readFile(SPIFFS, ""/check_interval.txt"").c_str()); if (current_time - check_interval_time < check_interval) { return; } check_interval_time = current_time; const unsigned long check_retry = atol(readFile(SPIFFS, ""/check_retry.txt"").c_str()); checkEndpoint(check_retry); } } ",12164,False,2416.642379261564,median "@echo off set QSG=%cd% SetLocal EnableDelayedExpansion REM ---------------------------------------------------------------------------- REM Copyright 2018 WSO2, Inc. http://www.wso2.org REM REM Licensed under the Apache License, Version 2.0 (the ""License""); REM you may not use this file except in compliance with the License. REM You may obtain a copy of the License at REM REM http://www.apache.org/licenses/LICENSE-2.0 REM REM Unless required by applicable law or agreed to in writing, software REM distributed under the License is distributed on an ""AS IS"" BASIS, REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. REM See the License for the specific language governing permissions and REM limitations under the License. echo Please start from step 1:. echo ""----------------------------------------------------------------"" echo ""| This is the Quick Start Guide for GDPR demonstrations. |"" echo ""| ===================================================== |"" echo ""Before Run: Make sure the following - "" echo "" * Added server details to the server.properties file in the QSG/bin folder "" echo "" * Your WSO2 IS 5.7.0 and Tomcat is running. "" echo "" * Configure the running domains/ips and ports in server.properties file "" echo "" in the QSG/bin folder. "" echo "" Next, Try the below steps in order "" echo "" If okay to continue, Please press 'Y' else press 'N' "" echo( set /p input=""Please enter your answer..."" set result=false IF ""%input%""==""n"" ( set result=true ) IF ""%input%""==""N"" ( set result=true ) IF ""%result%"" == ""true"" ( echo ""Please make the necessary configurations and restart the script."" echo( exit -1 ) echo ""Reading server paths from %PROPERTY_FILE%"" FOR /F ""eol=; tokens=6,2 delims=="" %%i IN ('findstr ""wso2is.host.domain"" server.properties') DO SET IS_HOST_NEW=%%i REM echo %IS_HOST_NEW% FOR /F ""eol=; tokens=6,2 delims=="" %%i IN ('findstr ""wso2is.host.port"" server.properties') DO SET IS_PORT=%%i REM echo %IS_PORT% FOR /F ""eol=; tokens=6,2 delims=="" %%i IN ('findstr ""tomcat.host.domain"" server.properties') DO SET TOMCAT_HOST_NEW=%%i REM echo %TOMCAT_HOST_NEW% FOR /F ""eol=; tokens=6,2 delims=="" %%i IN ('findstr ""tomcat.host.port"" server.properties') DO SET TOMCAT_PORT=%%i REM echo %TOMCAT_PORT% IF ""%IS_HOST_NEW%""==""localhost"" ( set IS_HOST=127.0.0.1 ) REM echo %IS_HOST% IF ""%TOMCAT_HOST_NEW%""==""localhost"" ( set TOMCAT_HOST=127.0.0.1 ) REM echo %TOMCAT_HOST% echo ""----------------------------------------------------------------"" echo ""| GDPR QSG is based on two scenarios. |"" echo ""| Scenario 1: Provide consent during self-sign up |"" echo ""| Scenario 2: Provide consent for JIT provisioning in a |"" echo ""| federated scenario |"" echo ""| |"" echo ""| Activity 1: |"" echo ""| |"" echo ""| Step 1 - Add an admin user and Configure service providers. |"" echo ""| |"" echo ""| Once you finish step 1, Try out the below scenarios |"" echo ""| Scenario 1: Admin add consent purposes for |"" echo ""| self-registration |"" echo ""| Scenario 2: Granting consent during Self registration |"" echo ""| Scenario 3: View consents provided via the user portal |"" echo ""| Scenario 4: Use of consent for access resources |"" echo ""| |"" echo ""| |"" echo ""| Step 2 - Add multiple users with consents. |"" echo ""| Scenario 5: Admin user view users who has provided consent|"" echo ""| for promotion via notification app in order to|"" echo ""| send promotions via email or mobile |"" echo ""| |"" echo ""| Activity 2: |"" echo ""| Step 3 - Add an admin user, a Twitter IDP and Configure |"" echo ""| service providers. |"" echo ""| |"" echo ""| Once you finish step 3, Try out the below scenarios |"" echo ""| Scenario 6: Admin add consent purposes for |"" echo ""| JIT provisioning for user-on-boarding |"" echo ""| Scenario 7: Granting consent during Federated user login |"" echo ""| Scenario 8: View consents provided via the user portal |"" echo ""----------------------------------------------------------------"" echo ""Please enter the Activity you want to try : "" set /p scenario=Enter the step number you selected. IF ""%scenario%""==""1"" ( CALL :run_step01 %IS_HOST% %IS_PORT% %TOMCAT_HOST% %TOMCAT_PORT% echo ""Now you can try out the scenarios 1 to 4 !"" echo ""Once you finish please type any key to start step 2:"" set /p nextStep1=Enter the step 2 you selected. CALL :next_step_02 ) ELSE ( IF ""%scenario%""==""2"" ( echo ""You are now configuring pickup as a Service Provider and configure twitter as the federated IDP"" CALL :run_fed_step01 %IS_HOST% %IS_PORT% %TOMCAT_HOST% %TOMCAT_PORT% echo ""Now you can try out the scenario 6,7,8 !"" echo ""Once you finish, press 'q' to delete the set-up"" set /p nextStep3=Enter q to delete the set up. IF ""%nextStep3%""==""q"" ( CALL :delete_setup %IS_HOST% %IS_PORT% CALL :delete_idp urn:deleteIdP https://%IS_HOST%:%IS_PORT%/services/IdentityProviderMgtService.IdentityProviderMgtServiceHttpsSoap11Endpoint/ ) ELSE ( echo Set up is not deleted. Please delete the set-up manually. ) ) ELSE ( echo Please enter the correct step. It should be Step1. CALL :delete_setup %IS_HOST% %IS_PORT% EXIT 0 ) ) REM Add a Federated authenticator support :run_fed_step01 set is_host=%~1 set is_port=%~2 set tomcat_domain=%~3 set tomcat_port=%~4 CALL :add_user admin admin %is_host% %is_port% CALL :add_identity_provider admin admin %is_host% %is_port% CALL :add_service_provider ""pickup"" ""urn:createApplication"" ""https://%is_host%:%is_port%/services/IdentityApplicationManagementService.IdentityApplicationManagementServiceHttpsSoap11Endpoint/"" ""Y2FtZXJvbjpjYW1lcm9uMTIz"" %is_host% %is_port% %tomcat_host% %tomcat_port% CALL :configure_oidc ""pickup"" ""urn:registerOAuthApplicationData"" ""https://%is_host%:%is_port%/services/OAuthAdminService.OAuthAdminServiceHttpsSoap11Endpoint/"" ""Y2FtZXJvbjpjYW1lcm9uMTIz"" CALL :update_application_oidc ""pickup"" ""Y2FtZXJvbjpjYW1lcm9uMTIz"" ""ZGlzcGF0Y2g="" ""ZGlzcGF0Y2gxMjM0"" ""urn:updateApplication"" ""https://%is_host%:%is_port%/services/IdentityApplicationManagementService.IdentityApplicationManagementServiceHttpsSoap11Endpoint/"" EXIT /B REM Add a Twitter Identity Provider :add_identity_provider set IS_name=%~1 set IS_pass=%~2 set is_host=%~3 set is_port=%~4 IF ""%is_host%""==""127.0.0.1"" ( set is_host=localhost ) echo( echo ""Please enter your API key"" set /p key=""(This can be found in the Keys and Access token section in the Application settings)"" echo( echo ""Please enter your API secret"" set /p secret=""(This can be found in the Keys and Access token section in the Application settings)"" echo( echo ""Creating Identity Provider..."" curl -s -k --user %~1:%~2 -H ""Content-Type: text/xml"" -H ""SOAPAction: urn:addIdP"" -o NUL https://%is_host%:%is_port%/services/IdentityProviderMgtService.IdentityProviderMgtServiceHttpsSoap11Endpoint/ -d ""https://%is_host%:%is_port%/oauth2/tokentruehttp://wso2.org/claims/roletwitterIDPtrueTwitterAuthenticatorAPIKey%key%APISecret%secret%callbackUrlhttps://%is_host%:%is_port%/commonauthfalsetwittertrueTwitterAuthenticatorAPIKey%key%APISecret%secret%callbackUrlhttps://%is_host%:%is_port%/commonauthtruePRIMARYtruetruefalseIDP-twitter"" IF %ERRORLEVEL% NEQ 0 ( echo ""!! Problem occurred while creating the identity provider. !!"" echo( exit -1 ) echo ""** The identity provider was successfully created. **"" echo( EXIT /B :run_step01 set is_host=%~1 set is_port=%~2 set tomcat_domain=%~3 set tomcat_port=%~4 CALL :add_user admin admin %is_host% %is_port% CALL :configure_selfsignup ""urn:updateResidentIdP"" ""https://%is_host%:%is_port%/services/IdentityProviderMgtService.IdentityProviderMgtServiceHttpsSoap11Endpoint/"" ""YWRtaW46YWRtaW4="" %is_host% %is_port% CALL :add_service_provider ""pickup"" ""urn:createApplication"" ""https://%is_host%:%is_port%/services/IdentityApplicationManagementService.IdentityApplicationManagementServiceHttpsSoap11Endpoint/"" ""Y2FtZXJvbjpjYW1lcm9uMTIz"" %is_host% %is_port% %tomcat_host% %tomcat_port% CALL :add_service_provider ""pick-my-book"" ""urn:createApplication"" ""https://%is_host%:%is_port%/services/IdentityApplicationManagementService.IdentityApplicationManagementServiceHttpsSoap11Endpoint/"" ""Y2FtZXJvbjpjYW1lcm9uMTIz"" %is_host% %is_port% %tomcat_host% %tomcat_port% CALL :add_service_provider ""notification-center"" ""urn:createApplication"" ""https://%is_host%:%is_port%/services/IdentityApplicationManagementService.IdentityApplicationManagementServiceHttpsSoap11Endpoint/"" ""Y2FtZXJvbjpjYW1lcm9uMTIz"" %is_host% %is_port% %tomcat_host% %tomcat_port% CALL :configure_oidc ""pickup"" ""urn:registerOAuthApplicationData"" ""https://%is_host%:%is_port%/services/OAuthAdminService.OAuthAdminServiceHttpsSoap11Endpoint/"" ""Y2FtZXJvbjpjYW1lcm9uMTIz"" CALL :configure_oidc ""pick-my-book"" ""urn:registerOAuthApplicationData"" ""https://%is_host%:%is_port%/services/OAuthAdminService.OAuthAdminServiceHttpsSoap11Endpoint/"" ""Y2FtZXJvbjpjYW1lcm9uMTIz"" CALL :configure_oidc ""notification-center"" ""urn:registerOAuthApplicationData"" ""https://%is_host%:%is_port%/services/OAuthAdminService.OAuthAdminServiceHttpsSoap11Endpoint/"" ""Y2FtZXJvbjpjYW1lcm9uMTIz"" CALL :update_application_oidc ""pickup"" ""Y2FtZXJvbjpjYW1lcm9uMTIz"" ""ZGlzcGF0Y2g="" ""ZGlzcGF0Y2gxMjM0"" ""urn:updateApplication"" ""https://%is_host%:%is_port%/services/IdentityApplicationManagementService.IdentityApplicationManagementServiceHttpsSoap11Endpoint/"" CALL :update_application_oidc ""pick-my-book"" ""Y2FtZXJvbjpjYW1lcm9uMTIz"" ""c3dpZnRhcHA="" ""c3dpZnRhcHAxMjM="" ""urn:updateApplication"" ""https://%is_host%:%is_port%/services/IdentityApplicationManagementService.IdentityApplicationManagementServiceHttpsSoap11Endpoint/"" CALL :update_application_oidc ""notification-center"" ""Y2FtZXJvbjpjYW1lcm9uMTIz"" ""bm90aWZpY2F0aW9u"" ""bm90aWZpY2F0aW9uMTIz"" ""urn:updateApplication"" ""https://%is_host%:%is_port%/services/IdentityApplicationManagementService.IdentityApplicationManagementServiceHttpsSoap11Endpoint/"" EXIT /B :run_step02 CALL :add_users admin admin CALL :add_consents admin admin EXIT /B :next_step_02 set is_host=%~1 set is_port=%~1 echo ""Now multiple users will be added with consents to the system."" CALL :run_step02 echo ""Now you can try out the scenario 5 !"" echo ""Once you finish, press 'q' to delete the set-up"" set /p nextStep2=Enter q to delete the set up. IF ""%nextStep2%""==""q"" ( CALL :delete_setup %is_host% %is_port% ) ELSE ( echo Set up is not deleted. Please delete the set-up manually. ) EXIT /B :add_user set IS_name=%~1 set IS_pass=%~2 set is_host=%~3 set is_port=%~4 set request_data=add-role.xml REM The following command can be used to create a user. curl -s -k --user %~1:%~2 --data ""{""schemas"":[],""name"":{""familyName"":""Smith"",""givenName"":""Cameron""},""userName"":""cameron"",""password"":""cameron123"",""emails"":""cameron@gmail.com"",""addresses"":{""country"":""Canada""}}"" --header ""Content-Type:application/json"" -o NUL https://%is_host%:%is_port%/wso2/scim/Users IF %ERRORLEVEL% NEQ 0 ( echo !! Problem occurred while creating user Cameron. !! echo( exit -1 ) echo ** The user Cameron was successfully created. ** echo( echo Creating a role named Manager... REM The following command will add a role to the user. curl -s -k --user %~1:%~2 -d @%request_data% -H ""Content-Type: text/xml"" -H ""SOAPAction: urn:addRole"" -o NUL https://%is_host%:%is_port%/services/RemoteUserStoreManagerService.RemoteUserStoreManagerServiceHttpsSoap11Endpoint/ IF %ERRORLEVEL% NEQ 0 ( echo !! Problem occurred while creating role manager. !! echo( CALL :delete_user %is_host% %is_port% echo( exit -1 ) echo ** The role Manager was successfully created. ** echo( EXIT /B :add_users set IS_name=%~1 set IS_pass=%~2 curl -s -k --user %~1:%~2 --data ""{""schemas"":[],""name"":{""familyName"":""Richards"",""givenName"":""Alex""},""userName"":""alex"",""password"":""alex123"",""emails"":""alex@gmail.com"",""addresses"":{""country"":""Canada""}}"" --header ""Content-Type:application/json"" -o NUL https://%is_host%:%is_port%/wso2/scim/Users IF %ERRORLEVEL% NEQ 0 ( echo !! Problem occurred while creating user Alex. !! echo( exit -1 ) echo ** The user Alex was successfully created. ** echo( curl -s -k --user %~1:%~2 --data ""{""schemas"":[],""name"":{""familyName"":""Lively"",""givenName"":""Blake""},""userName"":""blake"",""password"":""blake123"",""emails"":""blake@gmail.com"",""addresses"":{""country"":""Canada""}}"" --header ""Content-Type:application/json"" -o NUL https://%is_host%:%is_port%/wso2/scim/Users IF %ERRORLEVEL% NEQ 0 ( echo !! Problem occurred while creating user Blake. !! echo( exit -1 ) echo ** The user Blake was successfully created. ** echo( curl -s -k --user %~1:%~2 --data ""{""schemas"":[],""name"":{""familyName"":""Mathews"",""givenName"":""Chris""},""userName"":""chris"",""password"":""chris123"",""emails"":""chris@gmail.com"",""addresses"":{""country"":""Canada""}}"" --header ""Content-Type:application/json"" -o NUL https://%is_host%:%is_port%/wso2/scim/Users IF %ERRORLEVEL% NEQ 0 ( echo !! Problem occurred while creating user Chris. !! echo( exit -1 ) echo ** The user Chris was successfully created. ** echo( curl -s -k --user %~1:%~2 --data ""{""schemas"":[],""name"":{""familyName"":""Garret"",""givenName"":""Dale""},""userName"":""dale"",""password"":""dale123"",""emails"":""dale@gmail.com"",""addresses"":{""country"":""Canada""}}"" --header ""Content-Type:application/json"" -o NUL https://%is_host%:%is_port%/wso2/scim/Users IF %ERRORLEVEL% NEQ 0 ( echo !! Problem occurred while creating user Dale. !! echo( exit -1 ) echo ** The user Dale was successfully created. ** echo( curl -s -k --user %~1:%~2 --data ""{""schemas"":[],""name"":{""familyName"":""Simon"",""givenName"":""Eddie""},""userName"":""eddie"",""password"":""eddie123"",""emails"":""eddie@gmail.com"",""addresses"":{""country"":""Canada""}}"" --header ""Content-Type:application/json"" -o NUL https://%is_host%:%is_port%/wso2/scim/Users IF %ERRORLEVEL% NEQ 0 ( echo !! Problem occurred while creating user Eddie. !! echo( exit -1 ) echo ** The user Eddie was successfully created. ** echo( curl -s -k --user %~1:%~2 --data ""{""schemas"":[],""name"":{""familyName"":""Colin"",""givenName"":""Gray""},""userName"":""gray"",""password"":""gray123"",""emails"":""gray@gmail.com"",""addresses"":{""country"":""Canada""}}"" --header ""Content-Type:application/json"" -o NUL https://%is_host%:%is_port%/wso2/scim/Users IF %ERRORLEVEL% NEQ 0 ( echo !! Problem occurred while creating user Gray. !! echo( exit -1 ) echo ** The user Gray was successfully created. ** echo( curl -s -k --user %~1:%~2 --data ""{""schemas"":[],""name"":{""familyName"":""Brown"",""givenName"":""Harper""},""userName"":""harper"",""password"":""harper123"",""emails"":""harper@gmail.com"",""addresses"":{""country"":""Canada""}}"" --header ""Content-Type:application/json"" -o NUL https://%is_host%:%is_port%/wso2/scim/Users IF %ERRORLEVEL% NEQ 0 ( echo !! Problem occurred while creating user Harper. !! echo( exit -1 ) echo ** The user Harper was successfully created. ** echo( curl -s -k --user %~1:%~2 --data ""{""schemas"":[],""name"":{""familyName"":""Smith"",""givenName"":""Jean""},""userName"":""jean"",""password"":""jean123"",""emails"":""jean@gmail.com"",""addresses"":{""country"":""Canada""}}"" --header ""Content-Type:application/json"" -o NUL https://%is_host%:%is_port%/wso2/scim/Users IF %ERRORLEVEL% NEQ 0 ( echo !! Problem occurred while creating user Jean. !! echo( exit -1 ) echo ** The user Jean was successfully created. ** echo( curl -s -k --user %~1:%~2 --data ""{""schemas"":[],""name"":{""familyName"":""Thomas"",""givenName"":""Kelly""},""userName"":""kelly"",""password"":""kelly123"",""emails"":""kelly@gmail.com"",""addresses"":{""country"":""Canada""}}"" --header ""Content-Type:application/json"" -o NUL https://%is_host%:%is_port%/wso2/scim/Users IF %ERRORLEVEL% NEQ 0 ( echo !! Problem occurred while creating user Kelly. !! echo( exit -1 ) echo ** The user Kelly was successfully created. ** echo( curl -s -k --user %~1:%~2 --data ""{""schemas"":[],""name"":{""familyName"":""Moore"",""givenName"":""Ray""},""userName"":""ray"",""password"":""ray123"",""emails"":""ray@gmail.com"",""addresses"":{""country"":""Canada""}}"" --header ""Content-Type:application/json"" -o NUL https://%is_host%:%is_port%/wso2/scim/Users IF %ERRORLEVEL% NEQ 0 ( echo !! Problem occurred while creating user Ray. !! echo( exit -1 ) echo ** The user Ray was successfully created. ** echo( EXIT /B :add_consents echo Adding consents to the users created... echo( FOR /F ""tokens=*"" %%A IN ('dir /b GDPR-*.jar') DO SET jarname=%%A FOR /L %%b IN (1,1,2) DO IF ""!jarname:~-1!""=="" "" SET jarname=!jarname:~0,-1! FOR /F ""tokens=*"" %%A IN ('java -cp ""%jarname%;lib/httpclient-4.5.3.jar;lib/httpcore-4.4.6.jar;lib/json-20180130.jar;lib/commons-logging-1.2.jar"" CategoryIdRetriever') DO SET cat_id=%%A FOR /L %%b IN (1,1,2) DO IF ""!cat_id:~-1!""=="" "" SET cat_id=!cat_id:~0,-1! FOR /F ""tokens=*"" %%A IN ('java -cp ""%jarname%;lib/httpclient-4.5.3.jar;lib/httpcore-4.4.6.jar;lib/json-20180130.jar;lib/commons-logging-1.2.jar"" PurposeIdRetriever') DO SET purp_id=%%A FOR /L %%b IN (1,1,2) DO IF ""!purp_id:~-1!""=="" "" SET purp_id=!purp_id:~0,-1! curl -s -k -X POST ""https://%is_host%:%is_port%/api/identity/consent-mgt/v1.0/consents"" -H ""Authorization: Basic YWxleDphbGV4MTIz"" -H ""accept: application/json"" -H ""Content-Type: application/json"" -o NUL -d ""{\\""services\\"":[{\\""service\\"":\\""127.0.0.1\\"",\\""serviceDisplayName\\"": \\""Resident IDP\\"",\\""serviceDescription\\"": \\""Resident IDP\\"",\\""tenantDomain\\"":\\""carbon.super\\"",\\""purposes\\"":[{\\""purposeId\\"":%purp_id%,\\""purposeCategoryId\\"":[1],\\""consentType\\"":\\""EXPLICIT\\"",\\""piiCategory\\"":[{\\""piiCategoryId\\"":2,\\""validity\\"":\\""DATE_UNTIL:INDEFINITE\\""},{\\""piiCategoryId\\"":%cat_id%,\\""validity\\"":\\""DATE_UNTIL:INDEFINITE\\""}],\\""primaryPurpose\\"":true,\\""termination\\"":\\""DATE_UNTIL:INDEFINITE\\"",\\""thirdPartyDisclosure\\"":false,\\""thirdPartyName\\"":null}]}],\\""collectionMethod\\"":\\""Sign-Up\\"",\\""jurisdiction\\"":\\""CA\\"",\\""language\\"":\\""EN\\"",\\""policyURL\\"":\\""https://%is_host%:%is_port%/authenticationendpoint/privacy_policy.do\\"",\\""properties\\"":[{\\""key\\"":\\""publicKey\\"",\\""value\\"":\\""MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAluZFdW1ynitztkWLC6xKegbRWxky+5P0p4ShYEOkHs30QI2VCuR6Qo4Bz5rTgLBrky03W1GAVrZxuvKRGj9V9+PmjdGtau4CTXu9pLLcqnruaczoSdvBYA3lS9a7zgFU0+s6kMl2EhB+rk7gXluEep7lIOenzfl2f6IoTKa2fVgVd3YKiSGsyL4tztS70vmmX121qm0sTJdKWP4HxXyqK9neolXI9fYyHOYILVNZ69z/73OOVhkh/mvTmWZLM7GM6sApmyLX6OXUp8z0pkY+vT/9+zRxxQs7GurC4/C1nK3rI/0ySUgGEafO1atNjYmlFN+M3tZX6nEcA6g94IavyQIDAQAB\\""}]}"" curl -s -k -X POST ""https://%is_host%:%is_port%/api/identity/consent-mgt/v1.0/consents"" -H ""Authorization: Basic Ymxha2U6Ymxha2UxMjM="" -H ""accept: application/json"" -H ""Content-Type: application/json"" -o NUL -d ""{\\""services\\"":[{\\""service\\"":\\""127.0.0.1\\"",\\""serviceDisplayName\\"": \\""Resident IDP\\"",\\""serviceDescription\\"": \\""Resident IDP\\"",\\""tenantDomain\\"":\\""carbon.super\\"",\\""purposes\\"":[{\\""purposeId\\"":%purp_id%,\\""purposeCategoryId\\"":[1],\\""consentType\\"":\\""EXPLICIT\\"",\\""piiCategory\\"":[{\\""piiCategoryId\\"":2,\\""validity\\"":\\""DATE_UNTIL:INDEFINITE\\""}],\\""primaryPurpose\\"":true,\\""termination\\"":\\""DATE_UNTIL:INDEFINITE\\"",\\""thirdPartyDisclosure\\"":false,\\""thirdPartyName\\"":null}]}],\\""collectionMethod\\"":\\""Sign-Up\\"",\\""jurisdiction\\"":\\""CA\\"",\\""language\\"":\\""EN\\"",\\""policyURL\\"":\\""https://%is_host%:%is_port%/authenticationendpoint/privacy_policy.do\\"",\\""properties\\"":[{\\""key\\"":\\""publicKey\\"",\\""value\\"":\\""MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAluZFdW1ynitztkWLC6xKegbRWxky+5P0p4ShYEOkHs30QI2VCuR6Qo4Bz5rTgLBrky03W1GAVrZxuvKRGj9V9+PmjdGtau4CTXu9pLLcqnruaczoSdvBYA3lS9a7zgFU0+s6kMl2EhB+rk7gXluEep7lIOenzfl2f6IoTKa2fVgVd3YKiSGsyL4tztS70vmmX121qm0sTJdKWP4HxXyqK9neolXI9fYyHOYILVNZ69z/73OOVhkh/mvTmWZLM7GM6sApmyLX6OXUp8z0pkY+vT/9+zRxxQs7GurC4/C1nK3rI/0ySUgGEafO1atNjYmlFN+M3tZX6nEcA6g94IavyQIDAQAB\\""}]}"" curl -s -k -X POST ""https://%is_host%:%is_port%/api/identity/consent-mgt/v1.0/consents"" -H ""Authorization: Basic Y2hyaXM6Y2hyaXMxMjM="" -H ""accept: application/json"" -H ""Content-Type: application/json"" -o NUL -d ""{\\""services\\"":[{\\""service\\"":\\""127.0.0.1\\"",\\""serviceDisplayName\\"": \\""Resident IDP\\"",\\""serviceDescription\\"": \\""Resident IDP\\"",\\""tenantDomain\\"":\\""carbon.super\\"",\\""purposes\\"":[{\\""purposeId\\"":%purp_id%,\\""purposeCategoryId\\"":[1],\\""consentType\\"":\\""EXPLICIT\\"",\\""piiCategory\\"":[{\\""piiCategoryId\\"":2,\\""validity\\"":\\""DATE_UNTIL:INDEFINITE\\""},{\\""piiCategoryId\\"":%cat_id%,\\""validity\\"":\\""DATE_UNTIL:INDEFINITE\\""}],\\""primaryPurpose\\"":true,\\""termination\\"":\\""DATE_UNTIL:INDEFINITE\\"",\\""thirdPartyDisclosure\\"":false,\\""thirdPartyName\\"":null}]}],\\""collectionMethod\\"":\\""Sign-Up\\"",\\""jurisdiction\\"":\\""CA\\"",\\""language\\"":\\""EN\\"",\\""policyURL\\"":\\""https://%is_host%:%is_port%/authenticationendpoint/privacy_policy.do\\"",\\""properties\\"":[{\\""key\\"":\\""publicKey\\"",\\""value\\"":\\""MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAluZFdW1ynitztkWLC6xKegbRWxky+5P0p4ShYEOkHs30QI2VCuR6Qo4Bz5rTgLBrky03W1GAVrZxuvKRGj9V9+PmjdGtau4CTXu9pLLcqnruaczoSdvBYA3lS9a7zgFU0+s6kMl2EhB+rk7gXluEep7lIOenzfl2f6IoTKa2fVgVd3YKiSGsyL4tztS70vmmX121qm0sTJdKWP4HxXyqK9neolXI9fYyHOYILVNZ69z/73OOVhkh/mvTmWZLM7GM6sApmyLX6OXUp8z0pkY+vT/9+zRxxQs7GurC4/C1nK3rI/0ySUgGEafO1atNjYmlFN+M3tZX6nEcA6g94IavyQIDAQAB\\""}]}"" curl -s -k -X POST ""https://%is_host%:%is_port%/api/identity/consent-mgt/v1.0/consents"" -H ""Authorization: Basic ZGFsZTpkYWxlMTIz"" -H ""accept: application/json"" -H ""Content-Type: application/json"" -o NUL -d ""{\\""services\\"":[{\\""service\\"":\\""127.0.0.1\\"",\\""serviceDisplayName\\"": \\""Resident IDP\\"",\\""serviceDescription\\"": \\""Resident IDP\\"",\\""tenantDomain\\"":\\""carbon.super\\"",\\""purposes\\"":[{\\""purposeId\\"":%purp_id%,\\""purposeCategoryId\\"":[1],\\""consentType\\"":\\""EXPLICIT\\"",\\""piiCategory\\"":[{\\""piiCategoryId\\"":2,\\""validity\\"":\\""DATE_UNTIL:INDEFINITE\\""}],\\""primaryPurpose\\"":true,\\""termination\\"":\\""DATE_UNTIL:INDEFINITE\\"",\\""thirdPartyDisclosure\\"":false,\\""thirdPartyName\\"":null}]}],\\""collectionMethod\\"":\\""Sign-Up\\"",\\""jurisdiction\\"":\\""CA\\"",\\""language\\"":\\""EN\\"",\\""policyURL\\"":\\""https://%is_host%:%is_port%/authenticationendpoint/privacy_policy.do\\"",\\""properties\\"":[{\\""key\\"":\\""publicKey\\"",\\""value\\"":\\""MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAluZFdW1ynitztkWLC6xKegbRWxky+5P0p4ShYEOkHs30QI2VCuR6Qo4Bz5rTgLBrky03W1GAVrZxuvKRGj9V9+PmjdGtau4CTXu9pLLcqnruaczoSdvBYA3lS9a7zgFU0+s6kMl2EhB+rk7gXluEep7lIOenzfl2f6IoTKa2fVgVd3YKiSGsyL4tztS70vmmX121qm0sTJdKWP4HxXyqK9neolXI9fYyHOYILVNZ69z/73OOVhkh/mvTmWZLM7GM6sApmyLX6OXUp8z0pkY+vT/9+zRxxQs7GurC4/C1nK3rI/0ySUgGEafO1atNjYmlFN+M3tZX6nEcA6g94IavyQIDAQAB\\""}]}"" curl -s -k -X POST ""https://%is_host%:%is_port%/api/identity/consent-mgt/v1.0/consents"" -H ""Authorization: Basic ZWRkaWU6ZWRkaWUxMjM="" -H ""accept: application/json"" -H ""Content-Type: application/json"" -o NUL -d ""{\\""services\\"":[{\\""service\\"":\\""127.0.0.1\\"",\\""serviceDisplayName\\"": \\""Resident IDP\\"",\\""serviceDescription\\"": \\""Resident IDP\\"",\\""tenantDomain\\"":\\""carbon.super\\"",\\""purposes\\"":[{\\""purposeId\\"":%purp_id%,\\""purposeCategoryId\\"":[1],\\""consentType\\"":\\""EXPLICIT\\"",\\""piiCategory\\"":[{\\""piiCategoryId\\"":2,\\""validity\\"":\\""DATE_UNTIL:INDEFINITE\\""},{\\""piiCategoryId\\"":%cat_id%,\\""validity\\"":\\""DATE_UNTIL:INDEFINITE\\""}],\\""primaryPurpose\\"":true,\\""termination\\"":\\""DATE_UNTIL:INDEFINITE\\"",\\""thirdPartyDisclosure\\"":false,\\""thirdPartyName\\"":null}]}],\\""collectionMethod\\"":\\""Sign-Up\\"",\\""jurisdiction\\"":\\""CA\\"",\\""language\\"":\\""EN\\"",\\""policyURL\\"":\\""https://%is_host%:%is_port%/authenticationendpoint/privacy_policy.do\\"",\\""properties\\"":[{\\""key\\"":\\""publicKey\\"",\\""value\\"":\\""MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAluZFdW1ynitztkWLC6xKegbRWxky+5P0p4ShYEOkHs30QI2VCuR6Qo4Bz5rTgLBrky03W1GAVrZxuvKRGj9V9+PmjdGtau4CTXu9pLLcqnruaczoSdvBYA3lS9a7zgFU0+s6kMl2EhB+rk7gXluEep7lIOenzfl2f6IoTKa2fVgVd3YKiSGsyL4tztS70vmmX121qm0sTJdKWP4HxXyqK9neolXI9fYyHOYILVNZ69z/73OOVhkh/mvTmWZLM7GM6sApmyLX6OXUp8z0pkY+vT/9+zRxxQs7GurC4/C1nK3rI/0ySUgGEafO1atNjYmlFN+M3tZX6nEcA6g94IavyQIDAQAB\\""}]}"" curl -s -k -X POST ""https://%is_host%:%is_port%/api/identity/consent-mgt/v1.0/consents"" -H ""Authorization: Basic Z3JheTpncmF5MTIz"" -H ""accept: application/json"" -H ""Content-Type: application/json"" -o NUL -d ""{\\""services\\"":[{\\""service\\"":\\""127.0.0.1\\"",\\""serviceDisplayName\\"": \\""Resident IDP\\"",\\""serviceDescription\\"": \\""Resident IDP\\"",\\""tenantDomain\\"":\\""carbon.super\\"",\\""purposes\\"":[{\\""purposeId\\"":%purp_id%,\\""purposeCategoryId\\"":[1],\\""consentType\\"":\\""EXPLICIT\\"",\\""piiCategory\\"":[{\\""piiCategoryId\\"":2,\\""validity\\"":\\""DATE_UNTIL:INDEFINITE\\""}],\\""primaryPurpose\\"":true,\\""termination\\"":\\""DATE_UNTIL:INDEFINITE\\"",\\""thirdPartyDisclosure\\"":false,\\""thirdPartyName\\"":null}]}],\\""collectionMethod\\"":\\""Sign-Up\\"",\\""jurisdiction\\"":\\""CA\\"",\\""language\\"":\\""EN\\"",\\""policyURL\\"":\\""https://%is_host%:%is_port%/authenticationendpoint/privacy_policy.do\\"",\\""properties\\"":[{\\""key\\"":\\""publicKey\\"",\\""value\\"":\\""MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAluZFdW1ynitztkWLC6xKegbRWxky+5P0p4ShYEOkHs30QI2VCuR6Qo4Bz5rTgLBrky03W1GAVrZxuvKRGj9V9+PmjdGtau4CTXu9pLLcqnruaczoSdvBYA3lS9a7zgFU0+s6kMl2EhB+rk7gXluEep7lIOenzfl2f6IoTKa2fVgVd3YKiSGsyL4tztS70vmmX121qm0sTJdKWP4HxXyqK9neolXI9fYyHOYILVNZ69z/73OOVhkh/mvTmWZLM7GM6sApmyLX6OXUp8z0pkY+vT/9+zRxxQs7GurC4/C1nK3rI/0ySUgGEafO1atNjYmlFN+M3tZX6nEcA6g94IavyQIDAQAB\\""}]}"" curl -s -k -X POST ""https://%is_host%:%is_port%/api/identity/consent-mgt/v1.0/consents"" -H ""Authorization: Basic aGFycGVyOmhhcnBlcjEyMw=="" -H ""accept: application/json"" -H ""Content-Type: application/json"" -o NUL -d ""{\\""services\\"":[{\\""service\\"":\\""127.0.0.1\\"",\\""serviceDisplayName\\"": \\""Resident IDP\\"",\\""serviceDescription\\"": \\""Resident IDP\\"",\\""tenantDomain\\"":\\""carbon.super\\"",\\""purposes\\"":[{\\""purposeId\\"":%purp_id%,\\""purposeCategoryId\\"":[1],\\""consentType\\"":\\""EXPLICIT\\"",\\""piiCategory\\"":[{\\""piiCategoryId\\"":2,\\""validity\\"":\\""DATE_UNTIL:INDEFINITE\\""},{\\""piiCategoryId\\"":%cat_id%,\\""validity\\"":\\""DATE_UNTIL:INDEFINITE\\""}],\\""primaryPurpose\\"":true,\\""termination\\"":\\""DATE_UNTIL:INDEFINITE\\"",\\""thirdPartyDisclosure\\"":false,\\""thirdPartyName\\"":null}]}],\\""collectionMethod\\"":\\""Sign-Up\\"",\\""jurisdiction\\"":\\""CA\\"",\\""language\\"":\\""EN\\"",\\""policyURL\\"":\\""https://%is_host%:%is_port%/authenticationendpoint/privacy_policy.do\\"",\\""properties\\"":[{\\""key\\"":\\""publicKey\\"",\\""value\\"":\\""MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAluZFdW1ynitztkWLC6xKegbRWxky+5P0p4ShYEOkHs30QI2VCuR6Qo4Bz5rTgLBrky03W1GAVrZxuvKRGj9V9+PmjdGtau4CTXu9pLLcqnruaczoSdvBYA3lS9a7zgFU0+s6kMl2EhB+rk7gXluEep7lIOenzfl2f6IoTKa2fVgVd3YKiSGsyL4tztS70vmmX121qm0sTJdKWP4HxXyqK9neolXI9fYyHOYILVNZ69z/73OOVhkh/mvTmWZLM7GM6sApmyLX6OXUp8z0pkY+vT/9+zRxxQs7GurC4/C1nK3rI/0ySUgGEafO1atNjYmlFN+M3tZX6nEcA6g94IavyQIDAQAB\\""}]}"" curl -s -k -X POST ""https://%is_host%:%is_port%/api/identity/consent-mgt/v1.0/consents"" -H ""Authorization: Basic amVhbjpqZWFuMTIz"" -H ""accept: application/json"" -H ""Content-Type: application/json"" -o NUL -d ""{\\""services\\"":[{\\""service\\"":\\""127.0.0.1\\"",\\""serviceDisplayName\\"": \\""Resident IDP\\"",\\""serviceDescription\\"": \\""Resident IDP\\"",\\""tenantDomain\\"":\\""carbon.super\\"",\\""purposes\\"":[{\\""purposeId\\"":%purp_id%,\\""purposeCategoryId\\"":[1],\\""consentType\\"":\\""EXPLICIT\\"",\\""piiCategory\\"":[{\\""piiCategoryId\\"":2,\\""validity\\"":\\""DATE_UNTIL:INDEFINITE\\""}],\\""primaryPurpose\\"":true,\\""termination\\"":\\""DATE_UNTIL:INDEFINITE\\"",\\""thirdPartyDisclosure\\"":false,\\""thirdPartyName\\"":null}]}],\\""collectionMethod\\"":\\""Sign-Up\\"",\\""jurisdiction\\"":\\""CA\\"",\\""language\\"":\\""EN\\"",\\""policyURL\\"":\\""https://%is_host%:%is_port%/authenticationendpoint/privacy_policy.do\\"",\\""properties\\"":[{\\""key\\"":\\""publicKey\\"",\\""value\\"":\\""MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAluZFdW1ynitztkWLC6xKegbRWxky+5P0p4ShYEOkHs30QI2VCuR6Qo4Bz5rTgLBrky03W1GAVrZxuvKRGj9V9+PmjdGtau4CTXu9pLLcqnruaczoSdvBYA3lS9a7zgFU0+s6kMl2EhB+rk7gXluEep7lIOenzfl2f6IoTKa2fVgVd3YKiSGsyL4tztS70vmmX121qm0sTJdKWP4HxXyqK9neolXI9fYyHOYILVNZ69z/73OOVhkh/mvTmWZLM7GM6sApmyLX6OXUp8z0pkY+vT/9+zRxxQs7GurC4/C1nK3rI/0ySUgGEafO1atNjYmlFN+M3tZX6nEcA6g94IavyQIDAQAB\\""}]}"" curl -s -k -X POST ""https://%is_host%:%is_port%/api/identity/consent-mgt/v1.0/consents"" -H ""Authorization: Basic a2VsbHk6a2VsbHkxMjM="" -H ""accept: application/json"" -H ""Content-Type: application/json"" -o NUL -d ""{\\""services\\"":[{\\""service\\"":\\""127.0.0.1\\"",\\""serviceDisplayName\\"": \\""Resident IDP\\"",\\""serviceDescription\\"": \\""Resident IDP\\"",\\""tenantDomain\\"":\\""carbon.super\\"",\\""purposes\\"":[{\\""purposeId\\"":%purp_id%,\\""purposeCategoryId\\"":[1],\\""consentType\\"":\\""EXPLICIT\\"",\\""piiCategory\\"":[{\\""piiCategoryId\\"":2,\\""validity\\"":\\""DATE_UNTIL:INDEFINITE\\""},{\\""piiCategoryId\\"":%cat_id%,\\""validity\\"":\\""DATE_UNTIL:INDEFINITE\\""}],\\""primaryPurpose\\"":true,\\""termination\\"":\\""DATE_UNTIL:INDEFINITE\\"",\\""thirdPartyDisclosure\\"":false,\\""thirdPartyName\\"":null}]}],\\""collectionMethod\\"":\\""Sign-Up\\"",\\""jurisdiction\\"":\\""CA\\"",\\""language\\"":\\""EN\\"",\\""policyURL\\"":\\""https://%is_host%:%is_port%/authenticationendpoint/privacy_policy.do\\"",\\""properties\\"":[{\\""key\\"":\\""publicKey\\"",\\""value\\"":\\""MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAluZFdW1ynitztkWLC6xKegbRWxky+5P0p4ShYEOkHs30QI2VCuR6Qo4Bz5rTgLBrky03W1GAVrZxuvKRGj9V9+PmjdGtau4CTXu9pLLcqnruaczoSdvBYA3lS9a7zgFU0+s6kMl2EhB+rk7gXluEep7lIOenzfl2f6IoTKa2fVgVd3YKiSGsyL4tztS70vmmX121qm0sTJdKWP4HxXyqK9neolXI9fYyHOYILVNZ69z/73OOVhkh/mvTmWZLM7GM6sApmyLX6OXUp8z0pkY+vT/9+zRxxQs7GurC4/C1nK3rI/0ySUgGEafO1atNjYmlFN+M3tZX6nEcA6g94IavyQIDAQAB\\""}]}"" curl -s -k -X POST ""https://%is_host%:%is_port%/api/identity/consent-mgt/v1.0/consents"" -H ""Authorization: Basic cmF5OnJheTEyMw=="" -H ""accept: application/json"" -H ""Content-Type: application/json"" -o NUL -d ""{\\""services\\"":[{\\""service\\"":\\""127.0.0.1\\"",\\""serviceDisplayName\\"": \\""Resident IDP\\"",\\""serviceDescription\\"": \\""Resident IDP\\"",\\""tenantDomain\\"":\\""carbon.super\\"",\\""purposes\\"":[{\\""purposeId\\"":%purp_id%,\\""purposeCategoryId\\"":[1],\\""consentType\\"":\\""EXPLICIT\\"",\\""piiCategory\\"":[{\\""piiCategoryId\\"":2,\\""validity\\"":\\""DATE_UNTIL:INDEFINITE\\""}],\\""primaryPurpose\\"":true,\\""termination\\"":\\""DATE_UNTIL:INDEFINITE\\"",\\""thirdPartyDisclosure\\"":false,\\""thirdPartyName\\"":null}]}],\\""collectionMethod\\"":\\""Sign-Up\\"",\\""jurisdiction\\"":\\""CA\\"",\\""language\\"":\\""EN\\"",\\""policyURL\\"":\\""https://%is_host%:%is_port%/authenticationendpoint/privacy_policy.do\\"",\\""properties\\"":[{\\""key\\"":\\""publicKey\\"",\\""value\\"":\\""MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAluZFdW1ynitztkWLC6xKegbRWxky+5P0p4ShYEOkHs30QI2VCuR6Qo4Bz5rTgLBrky03W1GAVrZxuvKRGj9V9+PmjdGtau4CTXu9pLLcqnruaczoSdvBYA3lS9a7zgFU0+s6kMl2EhB+rk7gXluEep7lIOenzfl2f6IoTKa2fVgVd3YKiSGsyL4tztS70vmmX121qm0sTJdKWP4HxXyqK9neolXI9fYyHOYILVNZ69z/73OOVhkh/mvTmWZLM7GM6sApmyLX6OXUp8z0pkY+vT/9+zRxxQs7GurC4/C1nK3rI/0ySUgGEafO1atNjYmlFN+M3tZX6nEcA6g94IavyQIDAQAB\\""}]}"" IF %ERRORLEVEL% NEQ 0 ( echo !! Problem occurred while adding consents. !! echo( exit -1 ) echo ** The consents were successfully added. ** echo( EXIT /B :configure_selfsignup set soap_action=%~1 set endpoint=%~2 set auth=%~3 set is_host=%~4 set is_port=%~5 set request_data=enable-selfsignup.xml IF NOT EXIST ""%request_data%"" ( echo ""%request_data% File does not exists."" exit -1 ) curl -s -k -d @%request_data% -H ""Authorization: Basic %~3"" -H ""Content-Type: text/xml"" -H ""SOAPAction: %~1"" -o NUL %~2 IF %ERRORLEVEL% NEQ 0 ( echo ""!! Problem occurred while updating the identity provider. !!"" echo( exit -1 ) echo ""** Identity Provider successfully updated. **"" echo( EXIT /B :add_service_provider set sp_name=%~1 set soap_action=%~2 set endpoint=%~3 set auth=%~4 set request_data=create-sp-%~1.xml IF NOT EXIST ""%request_data%"" ( echo ""%request_data% File does not exists."" exit -1 ) echo Creating Service Provider %~1... REM Send the SOAP request to create the new SP. curl -s -k -d @%request_data% -H ""Authorization: Basic %~4"" -H ""Content-Type: text/xml"" -H ""SOAPAction: %~2"" -o NUL %~3 IF %ERRORLEVEL% NEQ 0 ( echo !! Problem occurred while creating the service provider. !! echo( REM CALL :delete_sp dispatch Common urn:deleteApplication https://%is_host%:%is_port%/services/IdentityApplicationManagementService.IdentityApplicationManagementServiceHttpsSoap11Endpoint/ Y2FtZXJvbjpjYW1lcm9uMTIz REM CALL :delete_sp swift Common urn:deleteApplication https://%is_host%:%is_port%/services/IdentityApplicationManagementService.IdentityApplicationManagementServiceHttpsSoap11Endpoint/ Y2FtZXJvbjpjYW1lcm9uMTIz REM CALL :delete_user echo( exit -1 ) echo ** Service Provider %~1 successfully created. ** echo( EXIT /B :configure_oidc set sp_name=%~1 set soap_action=%~2 set endpoint=%~3 set auth=%~4 set request_data=oidc-config-%~1.xml echo Configuring OIDC web SSO for %~1... REM Configure OIDC for the created SPs. curl -s -k -d @%request_data% -H ""Authorization: Basic %~4"" -H ""Content-Type: text/xml"" -H ""SOAPAction: %~2"" -o NUL %~3 echo ""** OIDC successfully configured for the Service Provider %~1. **"" echo( EXIT /B :update_application_oidc set sp_name=%~1 set auth=%~2 set key=%~3 set secret=%~4 set soap_action=%~5 set endpoint=%~6 set request_data=get-app-%sp_name%.xml IF NOT EXIST ""%request_data%"" ( echo ""%request_data% File does not exists."" exit -1 ) IF EXIST ""response_unformatted.xml"" ( DEL response_unformatted.xml ) curl -s -k -d @%request_data% -H ""Authorization: Basic %~2"" -H ""Content-Type: text/xml"" -H ""SOAPAction: urn:getApplication"" https://%is_host%:%is_port%/services/IdentityApplicationManagementService.IdentityApplicationManagementServiceHttpsSoap11Endpoint/ > response_unformatted.xml IF %ERRORLEVEL% NEQ 0 ( echo ""!! Problem occurred while getting application details for %sp_name%.... !!"" echo( REM CALL :delete_sp dispatch Common urn:deleteApplication https://%is_host%:%is_port%/services/IdentityApplicationManagementService.IdentityApplicationManagementServiceHttpsSoap11Endpoint/ Y2FtZXJvbjpjYW1lcm9uMTIz REM CALL :delete_sp swift Common urn:deleteApplication https://%is_host%:%is_port%/services/IdentityApplicationManagementService.IdentityApplicationManagementServiceHttpsSoap11Endpoint/ Y2FtZXJvbjpjYW1lcm9uMTIz REM CALL :delete_user echo( exit -1 ) FOR /F ""tokens=*"" %%A IN ('dir /b QSG-*.jar') DO SET jarname=%%A FOR /L %%b IN (1,1,2) DO IF ""!jarname:~-1!""=="" "" SET jarname=!jarname:~0,-1! FOR /F ""tokens=*"" %%A IN ('java -jar %jarname%') DO SET app_id=%%A FOR /L %%b IN (1,1,2) DO IF ""!app_id:~-1!""=="" "" SET app_id=!app_id:~0,-1! echo( echo Updating application %~1... REM Send the SOAP request to Update the Application. curl -s -k -H ""Authorization: Basic %~2"" -H ""Content-Type: text/xml"" -H ""SOAPAction: %~5"" -o NUL %~6 -d ""%app_id%%~1falsetrueoauth application%~3oauth2falsefalseoauthConsumerSecretfalse%~4falsePRIMARYfalsedefaulthttp://wso2.org/claims/fullnamefalsecarbon.super adminPRIMARY"" IF %ERRORLEVEL% NEQ 0 ( echo ""!! Problem occurred while updating application %sp_name%.... !!"" echo( REM CALL :delete_sp dispatch Common urn:deleteApplication https://%is_host%:%is_port%/services/IdentityApplicationManagementService.IdentityApplicationManagementServiceHttpsSoap11Endpoint/ Y2FtZXJvbjpjYW1lcm9uMTIz REM CALL :delete_sp swift Common urn:deleteApplication https://%is_host%:%is_port%/services/IdentityApplicationManagementService.IdentityApplicationManagementServiceHttpsSoap11Endpoint/ Y2FtZXJvbjpjYW1lcm9uMTIz REM CALL :delete_user echo( exit -1 ) echo ** Successfully updated the application %~1. ** EXIT /B :delete_setup set is_host=%~1 set is_port=%~2 echo ""If you have finished trying out the sample web apps, you can clean the process now."" echo ""Do you want to clean up the setup?"" echo( echo ""Press y - YES"" echo ""Press n - NO"" echo( set /p clean=""Please enter the response... "" set result=false IF ""%clean%""==""y"" set result=true IF ""%clean%""==""Y"" set result=true IF ""%result%"" == ""true"" ( CALL :delete_sp ""pickup"" ""urn:deleteApplication"" ""https://%is_host%:%is_port%/services/IdentityApplicationManagementService.IdentityApplicationManagementServiceHttpsSoap11Endpoint/"" ""Y2FtZXJvbjpjYW1lcm9uMTIz"" CALL :delete_sp ""pick-my-book"" ""urn:deleteApplication"" ""https://%is_host%:%is_port%/services/IdentityApplicationManagementService.IdentityApplicationManagementServiceHttpsSoap11Endpoint/"" ""Y2FtZXJvbjpjYW1lcm9uMTIz"" CALL :delete_sp ""notification-center"" ""urn:deleteApplication"" ""https://%is_host%:%is_port%/services/IdentityApplicationManagementService.IdentityApplicationManagementServiceHttpsSoap11Endpoint/"" ""Y2FtZXJvbjpjYW1lcm9uMTIz"" CALL :delete_user %is_host% %is_port% CALL :delete_users %is_host% %is_port% ) IF ""%result%"" == ""false"" ( exit -1 ) EXIT /B :delete_user set is_host=%~1 set is_port=%~2 set request_data1=delete-cameron.xml set request_data2=delete-role.xml echo( echo ""Deleting the user named cameron..."" REM Send the SOAP request to delete the user. curl -s -k -d @%QSG%\\%request_data1% -H ""Authorization: Basic YWRtaW46YWRtaW4="" -H ""Content-Type: text/xml"" -H ""SOAPAction: urn:deleteUser"" -o NUL https://%is_host%:%is_port%/services/RemoteUserStoreManagerService.RemoteUserStoreManagerServiceHttpsSoap11Endpoint/ IF %ERRORLEVEL% NEQ 0 ( echo !! Problem occurred while deleting the user cameron. !! echo( exit -1 ) echo ** The user cameron was successfully deleted. ** echo( echo ""Deleting the role named Manager..."" REM Send the SOAP request to delete the role. curl -s -k -d @%QSG%\\%request_data2% -H ""Authorization: Basic YWRtaW46YWRtaW4="" -H ""Content-Type: text/xml"" -H ""SOAPAction: urn:deleteRole"" -o NUL https://%is_host%:%is_port%/services/RemoteUserStoreManagerService.RemoteUserStoreManagerServiceHttpsSoap11Endpoint/ IF %ERRORLEVEL% NEQ 0 ( echo !! Problem occurred while deleting the role Manager. !! echo( exit -1 ) echo ** The role Manager was successfully deleted. ** echo( EXIT /B :delete_users set is_host=%~1 set is_port=%~2 set request_data1=delete-alex.xml set request_data2=delete-blake.xml set request_data3=delete-chris.xml set request_data4=delete-dale.xml set request_data5=delete-eddie.xml set request_data6=delete-gray.xml set request_data7=delete-harper.xml set request_data8=delete-jean.xml set request_data9=delete-kelly.xml set request_data10=delete-ray.xml echo( echo ""Deleting the user named Alex..."" REM Send the SOAP request to delete the user. curl -s -k -d @%QSG%\\%request_data1% -H ""Authorization: Basic YWRtaW46YWRtaW4="" -H ""Content-Type: text/xml"" -H ""SOAPAction: urn:deleteUser"" -o NUL https://%is_host%:%is_port%/services/RemoteUserStoreManagerService.RemoteUserStoreManagerServiceHttpsSoap11Endpoint/ IF %ERRORLEVEL% NEQ 0 ( echo !! Problem occurred while deleting the user Alex. !! echo( exit -1 ) echo ** The user Alex was successfully deleted. ** echo( echo( echo ""Deleting the user named Blake..."" REM Send the SOAP request to delete the user. curl -s -k -d @%QSG%\\%request_data2% -H ""Authorization: Basic YWRtaW46YWRtaW4="" -H ""Content-Type: text/xml"" -H ""SOAPAction: urn:deleteUser"" -o NUL https://%is_host%:%is_port%/services/RemoteUserStoreManagerService.RemoteUserStoreManagerServiceHttpsSoap11Endpoint/ IF %ERRORLEVEL% NEQ 0 ( echo !! Problem occurred while deleting the user Blake. !! echo( exit -1 ) echo ** The user Blake was successfully deleted. ** echo( echo( echo ""Deleting the user named Chris..."" REM Send the SOAP request to delete the user. curl -s -k -d @%QSG%\\%request_data3% -H ""Authorization: Basic YWRtaW46YWRtaW4="" -H ""Content-Type: text/xml"" -H ""SOAPAction: urn:deleteUser"" -o NUL https://%is_host%:%is_port%/services/RemoteUserStoreManagerService.RemoteUserStoreManagerServiceHttpsSoap11Endpoint/ IF %ERRORLEVEL% NEQ 0 ( echo !! Problem occurred while deleting the user Chris. !! echo( exit -1 ) echo ** The user Chris was successfully deleted. ** echo( echo( echo ""Deleting the user named Dale..."" REM Send the SOAP request to delete the user. curl -s -k -d @%QSG%\\%request_data4% -H ""Authorization: Basic YWRtaW46YWRtaW4="" -H ""Content-Type: text/xml"" -H ""SOAPAction: urn:deleteUser"" -o NUL https://%is_host%:%is_port%/services/RemoteUserStoreManagerService.RemoteUserStoreManagerServiceHttpsSoap11Endpoint/ IF %ERRORLEVEL% NEQ 0 ( echo !! Problem occurred while deleting the user Dale. !! echo( exit -1 ) echo ** The user Dale was successfully deleted. ** echo( echo( echo ""Deleting the user named Eddie..."" REM Send the SOAP request to delete the user. curl -s -k -d @%QSG%\\%request_data5% -H ""Authorization: Basic YWRtaW46YWRtaW4="" -H ""Content-Type: text/xml"" -H ""SOAPAction: urn:deleteUser"" -o NUL https://%is_host%:%is_port%/services/RemoteUserStoreManagerService.RemoteUserStoreManagerServiceHttpsSoap11Endpoint/ IF %ERRORLEVEL% NEQ 0 ( echo !! Problem occurred while deleting the user Eddie. !! echo( exit -1 ) echo ** The user Eddie was successfully deleted. ** echo( echo( echo ""Deleting the user named Gray..."" REM Send the SOAP request to delete the user. curl -s -k -d @%QSG%\\%request_data6% -H ""Authorization: Basic YWRtaW46YWRtaW4="" -H ""Content-Type: text/xml"" -H ""SOAPAction: urn:deleteUser"" -o NUL https://%is_host%:%is_port%/services/RemoteUserStoreManagerService.RemoteUserStoreManagerServiceHttpsSoap11Endpoint/ IF %ERRORLEVEL% NEQ 0 ( echo !! Problem occurred while deleting the user Gray. !! echo( exit -1 ) echo ** The user Gray was successfully deleted. ** echo( echo( echo ""Deleting the user named Harper..."" REM Send the SOAP request to delete the user. curl -s -k -d @%QSG%\\%request_data7% -H ""Authorization: Basic YWRtaW46YWRtaW4="" -H ""Content-Type: text/xml"" -H ""SOAPAction: urn:deleteUser"" -o NUL https://%is_host%:%is_port%/services/RemoteUserStoreManagerService.RemoteUserStoreManagerServiceHttpsSoap11Endpoint/ IF %ERRORLEVEL% NEQ 0 ( echo !! Problem occurred while deleting the user Harper. !! echo( exit -1 ) echo ** The user Harper was successfully deleted. ** echo( echo( echo ""Deleting the user named Jean..."" REM Send the SOAP request to delete the user. curl -s -k -d @%QSG%\\%request_data8% -H ""Authorization: Basic YWRtaW46YWRtaW4="" -H ""Content-Type: text/xml"" -H ""SOAPAction: urn:deleteUser"" -o NUL https://%is_host%:%is_port%/services/RemoteUserStoreManagerService.RemoteUserStoreManagerServiceHttpsSoap11Endpoint/ IF %ERRORLEVEL% NEQ 0 ( echo !! Problem occurred while deleting the user Jean. !! echo( exit -1 ) echo ** The user Jean was successfully deleted. ** echo( echo( echo ""Deleting the user named Kelly..."" REM Send the SOAP request to delete the user. curl -s -k -d @%QSG%\\%request_data9% -H ""Authorization: Basic YWRtaW46YWRtaW4="" -H ""Content-Type: text/xml"" -H ""SOAPAction: urn:deleteUser"" -o NUL https://%is_host%:%is_port%/services/RemoteUserStoreManagerService.RemoteUserStoreManagerServiceHttpsSoap11Endpoint/ IF %ERRORLEVEL% NEQ 0 ( echo !! Problem occurred while deleting the user Kelly. !! echo( exit -1 ) echo ** The user Kelly was successfully deleted. ** echo( echo( echo ""Deleting the user named Ray..."" REM Send the SOAP request to delete the user. curl -s -k -d @%QSG%\\%request_data10% -H ""Authorization: Basic YWRtaW46YWRtaW4="" -H ""Content-Type: text/xml"" -H ""SOAPAction: urn:deleteUser"" -o NUL https://%is_host%:%is_port%/services/RemoteUserStoreManagerService.RemoteUserStoreManagerServiceHttpsSoap11Endpoint/ IF %ERRORLEVEL% NEQ 0 ( echo !! Problem occurred while deleting the user Ray. !! echo( exit -1 ) echo ** The user Ray was successfully deleted. ** echo( EXIT /B :delete_sp set sp_name=%~1 set soap_action=%~2 set endpoint=%~3 set auth=%~4 set request_data=delete-sp-%~1.xml IF NOT EXIST ""%request_data%"" ( echo %request_data% File does not exists. exit -1 ) echo( echo Deleting Service Provider %~1... REM Send the SOAP request to delete a SP. curl -s -k -d @%request_data% -H ""Authorization: Basic %~4"" -H ""Content-Type: text/xml"" -H ""SOAPAction: %~2"" -o NUL %~3 IF %ERRORLEVEL% NEQ 0 ( echo !! Problem occurred while deleting the service provider. !! echo( exit -1 ) echo ** Service Provider %~1 successfully deleted. ** EXIT /B :delete_idp set soap_action=%~1 set endpoint=%~2 set request_data=delete-idp-twitter.xml IF NOT EXIST ""%~1"" ( echo ""%~1 Directory not exists."" exit -1 ) IF NOT EXIST ""%request_data%"" ( echo ""%request_data% File does not exists."" exit -1 ) echo( echo ""Deleting Identity Provider IDP-twitter..."" REM Send the SOAP request to delete twitter Idp. curl -s -k -d @%QSG%\\%request_data% -H ""Authorization: Basic YWRtaW46YWRtaW4="" -H ""Content-Type: text/xml"" -H ""SOAPAction: %~2"" -o NUL %~3 IF %ERRORLEVEL% NEQ 0 ( echo ""!! Problem occurred while deleting the service provider. !!"" echo( exit -1 ) echo ""** Identity Provider IDP-twitter successfully deleted. **"" echo( EXIT /B ",16133,True,3674.7715679985486,median "// The complete list is available here: https://github.com/olikraus/u8g2/wiki/u8x8setupcpp // Please update the pin numbers according to your setup. Use U8X8_PIN_NONE if the reset pin is not connected //U8X8_NULL u8x8; // null device, a 8x8 pixel display which does nothing //U8X8_SSD1306_128X64_NONAME_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1306_128X64_NONAME_4W_HW_SPI u8x8(/* cs=*/ 6, /* dc=*/ 4, /* reset=*/ 12); // Arduboy (DevKit) //U8X8_SSD1306_128X64_NONAME_4W_HW_SPI u8x8(/* cs=*/ 12, /* dc=*/ 4, /* reset=*/ 6); // Arduboy 10 (Production, Kickstarter Edition) //U8X8_SSD1306_128X64_NONAME_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1306_128X64_NONAME_3W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* reset=*/ 8); //U8X8_SSD1306_128X64_NONAME_3W_HW_SPI u8x8(/* cs=*/ 10, /* reset=*/ 8); //U8X8_SSD1306_128X64_NONAME_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_SSD1306_128X64_ALT0_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); // same as the NONAME variant, but may solve the ""every 2nd line skipped"" problem //U8X8_SSD1306_128X64_NONAME_SW_I2C u8x8(/* clock=*/ 2, /* data=*/ 0, /* reset=*/ U8X8_PIN_NONE); // Digispark ATTiny85 //U8X8_SSD1306_128X64_NONAME_SW_I2C u8x8(/* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // OLEDs without Reset of the Display //U8X8_SSD1306_128X64_VCOMH0_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but maximizes setContrast() range //U8X8_SSD1306_128X64_ALT0_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but may solve the ""every 2nd line skipped"" problem //U8X8_SSD1306_102X64_EA_OLEDS102_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but may solve the ""every 2nd line skipped"" problem //U8X8_SH1106_128X64_NONAME_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SH1106_128X64_NONAME_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_SH1106_128X64_VCOMH0_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but maximizes setContrast() range //U8X8_SH1106_128X64_WINSTAR_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // same as the NONAME variant, but uses updated SH1106 init sequence //U8X8_SH1106_128X32_VISIONOX_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_SH1106_128X32_VISIONOX_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SH1106_72X40_WISE_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SH1107_64X128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SH1107_128X128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SH1107_128X128_HW_I2C u8x8(/* reset=*/ 8); //U8X8_SH1107_128X80_HW_I2C u8x8(/* reset=*/ 8); //U8X8_SH1107_PIMORONI_128X128_HW_I2C u8x8(/* reset=*/ 8); //U8X8_SH1107_SEEED_128X128_SW_I2C u8x8(/* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); //U8X8_SH1107_SEEED_128X128_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_SH1107_SEEED_96X96_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SH1108_160X160_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1306_128X32_UNIVISION_SW_I2C u8x8(/* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // Adafruit Feather ESP8266/32u4 Boards + FeatherWing OLED //U8X8_SSD1306_128X32_UNIVISION_SW_I2C u8x8(/* clock=*/ 21, /* data=*/ 20, /* reset=*/ U8X8_PIN_NONE); // Adafruit Feather M0 Basic Proto + FeatherWing OLED //U8X8_SSD1306_128X32_UNIVISION_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); // Adafruit ESP8266/32u4/ARM Boards + FeatherWing OLED //U8X8_SSD1306_128X32_UNIVISION_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE, /* clock=*/ SCL, /* data=*/ SDA); // pin remapping with ESP8266 HW I2C //U8X8_SSD1306_128X32_WINSTAR_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE, /* clock=*/ SCL, /* data=*/ SDA); // pin remapping with ESP8266 HW I2C //U8X8_SSD1306_64X48_ER_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); // EastRising 0.66"" OLED breakout board, Uno: A4=SDA, A5=SCL, 5V powered //U8X8_SSD1306_48X64_WINSTAR_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_SSD1306_64X32_NONAME_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_SSD1306_64X32_1F_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_SSD1306_96X16_ER_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); // EastRising 0.69"" //U8X8_SSD1306_72X40_ER_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); // EastRising 0.42"" //U8X8_SSD1306_128X64_NONAME_6800 u8x8(13, 11, 2, 3, 4, 5, 6, A4, /*enable=*/ 7, /*cs=*/ 10, /*dc=*/ 9, /*reset=*/ 8); //U8X8_SSD1306_128X64_NONAME_8080 u8x8(13, 11, 2, 3, 4, 5, 6, A4, /*enable=*/ 7, /*cs=*/ 10, /*dc=*/ 9, /*reset=*/ 8); //U8X8_SSD1309_128X64_NONAME0_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1309_128X64_NONAME0_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1309_128X64_NONAME2_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1309_128X64_NONAME2_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1316_128X32_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1316_128X32_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1317_96X96_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // not tested, not confirmed //U8X8_SSD1317_96X96_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // not tested, not confirmed //U8X8_SSD1318_128X96_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1318_128X96_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1320_160X132_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1320_160X132_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1322_NHD_256X64_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1322_NHD_256X64_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1322_NHD_128X64_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1322_NHD_128X64_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1325_NHD_128X64_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1325_NHD_128X64_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD0323_OS128064_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD0323_OS128064_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1326_ER_256X32_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // experimental driver for ER-OLED018-1 //U8X8_SSD1327_SEEED_96X96_SW_I2C u8x8(/* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ U8X8_PIN_NONE); // Seeedstudio Grove OLED 96x96 //U8X8_SSD1327_SEEED_96X96_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); // Seeedstudio Grove OLED 96x96 //U8X8_SSD1327_EA_W128128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1327_EA_W128128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1327_MIDAS_128X128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1327_MIDAS_128X128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1327_WS_128X128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1327_WS_128X128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1327_VISIONOX_128X96_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1327_VISIONOX_128X96_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1329_128X96_NONAME_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1329_128X96_NONAME_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1329_96X96_NONAME_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1329_96X96_NONAME_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1329_96X96_NONAME_4W_HW_SPI u8x8(/* cs=*/ A4, /* dc=*/ A2, /* reset=*/ U8X8_PIN_NONE); // Adafruit Feather 32u4 Basic Proto //U8X8_SSD1305_128X32_NONAME_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1305_128X32_NONAME_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1305_128X32_ADAFRUIT_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1305_128X32_ADAFRUIT_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1305_128X64_ADAFRUIT_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1305_128X64_ADAFRUIT_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1305_128X64_RAYSTAR_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_SSD1305_128X64_RAYSTAR_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_KS0108_128X64 u8x8(8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*dc=*/ 17, /*cs0=*/ 14, /*cs1=*/ 15, /*cs2=*/ U8X8_PIN_NONE, /* reset=*/ U8X8_PIN_NONE); // Set R/W to low! //U8X8_KS0108_ERM19264 u8x8(8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*dc=*/ 17, /*cs0=*/ 14, /*cs1=*/ 15, /*cs2=*/ 16, /* reset=*/ U8X8_PIN_NONE); // Set R/W to low! //U8X8_HD44102_100X64 u8x8(4, 5, 6, 7, 8, 9, 10, 11, /*enable=*/ 2, /*dc=*/ 3, /*cs0=*/ A0, /*cs1=*/ A1, /*cs2=*/ A2, /* reset=*/ U8X8_PIN_NONE); // Set R/W to low! //U8X8_T7932_150X32 u8x8(4, 5, 6, 7, 8, 9, 10, 11, /*enable=*/ 2, /*dc=*/ 3, /*cs0=*/ A0, /*cs1=*/ A1, /*cs2=*/ A2, /* reset=*/ U8X8_PIN_NONE); // Set R/W to low! //U8X8_UC1701_EA_DOGS102_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1701_EA_DOGS102_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_PCD8544_84X48_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Nokia 5110 Display //U8X8_PCD8544_84X48_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Nokia 5110 Display //U8X8_PCF8812_96X65_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Could be also PCF8814 //U8X8_PCF8812_96X65_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Could be also PCF8814 //U8X8_HX1230_96X68_3W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* reset=*/ 8); //U8X8_HX1230_96X68_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7528_ERC16064_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7528_ERC16064_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_EA_DOGM128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_EA_DOGM128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_64128N_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_64128N_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_EA_DOGM132_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); // DOGM132 Shield //U8X8_ST7565_EA_DOGM132_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); // DOGM132 Shield //U8X8_ST7565_ZOLEN_128X64_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_ZOLEN_128X64_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_LM6059_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Adafruit ST7565 GLCD //U8X8_ST7565_LM6059_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Adafruit ST7565 GLCD //U8X8_ST7565_KS0713_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // KS0713 controller //U8X8_ST7565_KS0713_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // KS0713 controller //U8X8_ST7565_LX12864_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_LX12864_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_ERC12864_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_ERC12864_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_ERC12864_ALT_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // contrast improved version for ERC12864 //U8X8_ST7565_ERC12864_ALT_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // contrast improved version for ERC12864 //U8X8_ST7565_NHD_C12832_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_NHD_C12832_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_NHD_C12864_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_NHD_C12864_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_JLX12864_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7565_JLX12864_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_PI_132X64_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); // Pax Instruments Shield, LCD_BL=6 //U8X8_ST7567_PI_132X64_4W_HW_SPI u8x8(/* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); // Pax Instruments Shield, LCD_BL=6 //U8X8_ST7567_JLX12864_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_JLX12864_4W_HW_SPI u8x8(/* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_OS12864_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_OS12864_4W_HW_SPI u8x8(/* cs=*/ 7, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_ENH_DG128064_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_ENH_DG128064_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_ENH_DG128064I_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_ENH_DG128064I_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7567_64X32_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_ST7567_HEM6432_HW_I2C u8x8(/* reset=*/ U8X8_PIN_NONE); //U8X8_ST7571_128X128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7571_128X128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7571_128X96_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7571_128X96_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75160_JM16096_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75160_JM16096_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX172104_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX172104_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX19296_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX19296_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256128_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_WO256X128_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_WO256X128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256160_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256160_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256160M_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256160M_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256160_ALT_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX256160_ALT_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX240160_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX240160_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75256_JLX25664_2ND_HW_I2C u8x8(/* reset=*/ 8); // Due, 2nd I2C //U8X8_ST75320_JLX320240_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST75320_JLX320240_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_NT7534_TG12864R_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_NT7534_TG12864R_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_ST7588_JLX12864_SW_I2C u8x8(/* clock=*/ SCL, /* data=*/ SDA, /* reset=*/ 5); //U8X8_ST7588_JLX12864_HW_I2C u8x8(/* reset=*/ 5); //U8X8_IST3020_ERC19264_6800 u8x8(44, 43, 42, 41, 40, 39, 38, 37, /*enable=*/ 28, /*cs=*/ 32, /*dc=*/ 30, /*reset=*/ 31); // Connect WR pin with GND //U8X8_IST3020_ERC19264_8080 u8x8(44, 43, 42, 41, 40, 39, 38, 37, /*enable=*/ 29, /*cs=*/ 32, /*dc=*/ 30, /*reset=*/ 31); // Connect RD pin with 3.3V //U8X8_IST3020_ERC19264_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_IST7920_128X128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Round display //U8X8_IST7920_128X128_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Round display //U8X8_UC1601_128X32_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1601_128X32_3W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* reset=*/ 8); //U8X8_UC1601_128X64_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1604_JLX19264_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1604_JLX19264_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1609_SLG19264_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1609_SLG19264_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1608_ERC24064_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Due, SW SPI, ERC24064-1 Test Board //U8X8_UC1608_DEM240064_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Due, SW SPI, ERC24064-1 Test Board //U8X8_UC1608_ERC240120_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1608_240X128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1610_EA_DOGXL160_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8X8_UC1610_EA_DOGXL160_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ U8X8_PIN_NONE); //U8X8_UC1611_EA_DOGM240_2ND_HW_I2C u8x8(/* reset=*/ 8); // Due, 2nd I2C, DOGM240 Test Board //U8X8_UC1611_EA_DOGM240_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // SW SPI, Due DOGXL240 Test Board //U8X8_UC1611_EA_DOGXL240_2ND_HW_I2C u8x8(/* reset=*/ 8); // Due, 2nd I2C, DOGXL240 Test Board //U8X8_UC1611_EA_DOGXL240_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // SW SPI, Due DOGXL240 Test Board //U8X8_UC1611_IDS4073_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1611_IDS4073_4W_HW_SPI u8x8( /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1611_EW50850_8080 u8x8(8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 3, /*dc=*/ 16, /*reset=*/ 17); // 240x160, Connect RD/WR1 pin with 3.3V, CS is aktive high //U8X8_UC1611_CG160160_8080 u8x8(8, 9, 10, 11, 4, 5, 6, 7, /*enable=*/ 18, /*cs=*/ 3, /*dc=*/ 16, /*reset=*/ 17); // Connect WR1 and CD1 pin with 3.3V, connect CS0 with cs, WR0 with enable, CD with dc //U8X8_UC1617_JLX128128_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1617_JLX128128_4W_HW_SPI u8x8( /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1638_192X96_4W_SW_SPI u8x8( /* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1638_192X96_4W_HW_SPI u8x8( /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_UC1638_192X96_SW_I2C u8x8(/* clock=*/ 13, /* data=*/ 11, /* reset=*/ 8); // u8g2 test board: I2C clock/data is same as SPI, I2C default address is 0x78 //U8X8_SSD1606_172X72_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // eInk/ePaper Display //U8X8_SSD1607_200X200_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // eInk/ePaper Display, original LUT from embedded artists //U8X8_SSD1607_GS_200X200_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Good Display //U8X8_SSD1607_WS_200X200_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // Waveshare //U8X8_IL3820_296X128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // eInk/ePaper Display, original LUT //U8X8_IL3820_V2_296X128_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); // eInk/ePaper Display, optimized (lesser screen flicker) //U8X8_ST7511_AVD_320X240_8080 u8x8(13, 11, 2, 3, 4, 5, 6, A4, /*enable/WR=*/ 7, /*cs=*/ 10, /*dc=*/ 9, /*reset=*/ 8); // Connect RD pin with 3.3V/5V //U8X8_S1D15721_240X64_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_S1D15721_240X64_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_GU800_128X64_4W_SW_SPI u8x8(/* clock=*/ 13, /* data=*/ 11, /* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); //U8X8_GU800_128X64_4W_HW_SPI u8x8(/* cs=*/ 10, /* dc=*/ 9, /* reset=*/ 8); ",12132,True,3491.952935885224,median