-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #416: Add support for master thermostat.
- Loading branch information
Showing
141 changed files
with
3,052 additions
and
381 deletions.
There are no files selected for viewing
303 changes: 270 additions & 33 deletions
303
LibSuplaClient.xcframework/ios-arm64_armv7_armv7s/Headers/proto.h
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+21.6 KB
(100%)
LibSuplaClient.xcframework/ios-arm64_armv7_armv7s/libsupla-client-iphoneos.a
Binary file not shown.
303 changes: 270 additions & 33 deletions
303
LibSuplaClient.xcframework/ios-arm64_x86_64-simulator/Headers/proto.h
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+15.5 KB
(100%)
LibSuplaClient.xcframework/ios-arm64_x86_64-simulator/libsupla-client-iphonesimulator.a
Binary file not shown.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* | ||
Copyright (C) AC SOFTWARE SP. Z O.O. | ||
|
||
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 2 | ||
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 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, write to the Free Software | ||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
*/ | ||
|
||
extension Bool { | ||
func ifTrue<T>(_ valueProvider: () -> T) -> T? { | ||
if (self) { | ||
return valueProvider() | ||
} | ||
|
||
return nil | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
Copyright (C) AC SOFTWARE SP. Z O.O. | ||
|
||
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 2 | ||
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 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, write to the Free Software | ||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
*/ | ||
|
||
import SwiftUI | ||
|
||
struct LazyList<Content: View, Item: Identifiable>: View { | ||
var items: [Item] | ||
var content: (Item) -> Content | ||
|
||
var body: some View { | ||
ScrollView(.vertical) { | ||
if #available(iOS 14.0, *) { | ||
LazyVStack(spacing: 1) { | ||
ForEach(items) { item in | ||
content(item) | ||
.listRowInsets(EdgeInsets()) | ||
.listRowSeparatorInvisible() | ||
} | ||
} | ||
} else { | ||
SwiftUI.List(items) { item in | ||
content(item) | ||
.padding([.bottom], 1) | ||
.listRowInsets(EdgeInsets()) | ||
.listRowSeparatorInvisible() | ||
}.listStyle(.plain) | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// | ||
/* | ||
Copyright (C) AC SOFTWARE SP. Z O.O. | ||
|
||
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 2 | ||
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 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, write to the Free Software | ||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
*/ | ||
|
||
import SwiftUI | ||
|
||
final class UiSettings: ObservableObject { | ||
@Published var scale: CGFloat = 1.0 | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
/* | ||
Copyright (C) AC SOFTWARE SP. Z O.O. | ||
|
||
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 2 | ||
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 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, write to the Free Software | ||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. | ||
*/ | ||
|
||
import SwiftUI | ||
|
||
extension EnvironmentValues { | ||
@Entry var scaleFactor: CGFloat = 1.0 | ||
} | ||
|
||
extension View { | ||
func scale( | ||
_ scaleFactor: CGFloat, | ||
_ value: CGFloat, | ||
limit: CellScalingLimit = .none | ||
) -> CGFloat { | ||
SUPLA.scale(scaleFactor, value, limit: limit) | ||
} | ||
} | ||
|
||
extension CGFloat { | ||
func scale( | ||
_ value: CGFloat, | ||
limit: CellScalingLimit = .none | ||
) -> CGFloat { | ||
return SUPLA.scale(self, value, limit: limit) | ||
} | ||
} | ||
|
||
private func scale( | ||
_ scaleFactor: CGFloat, | ||
_ value: CGFloat, | ||
limit: CellScalingLimit = .none | ||
) -> CGFloat { | ||
var scale = scaleFactor | ||
switch (limit) { | ||
case .lower(let val): | ||
if (scaleFactor < val) { scale = val } | ||
case .upper(let val): | ||
if (scaleFactor > val) { scale = val } | ||
default: break | ||
} | ||
|
||
return value * scale | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.