Skip to content

Commit 184aa30

Browse files
GroundSdk release 7.6.0-rc1
1 parent a4dadd9 commit 184aa30

11 files changed

Lines changed: 110 additions & 44 deletions

LICENSE

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
Copyright (C) 2019 Parrot Drones SAS
32

43
Redistribution and use in source and binary forms, with or without
@@ -26,4 +25,4 @@
2625
AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
2726
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
2827
OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
29-
SUCH DAMAGE.
28+
SUCH DAMAGE.

SdkCore.framework/Headers/Arsdk.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
#import "Logger.h"
2828
#import "LogBinRecorderConfig.h"
2929
#import "LogTxtRecorderConfig.h"
30+
#import "LogEventRecorderConfig.h"
3031

3132
#import "NSData+zlib.h"
3233
#import "NSData+Crypto.h"
@@ -35,7 +36,6 @@
3536
#import "NoAckStorage.h"
3637
#import "Anonymizer.h"
3738

38-
#import "SdkCore+EventLogger.h"
3939
#import "SdkCoreFileSource.h"
4040
#import "SdkCoreMediaInfo.h"
4141
#import "SdkCoreRenderer.h"

SdkCore.framework/Headers/ArsdkFeatureAlarms.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,11 @@ typedef NS_ENUM(NSInteger, ArsdkFeatureAlarmsType) {
4545
/** DRI is not functional. */
4646
ArsdkFeatureAlarmsTypeDriFailing = 9,
4747

48+
/** Video Signal Processing is not available. */
49+
ArsdkFeatureAlarmsTypeVideoDspFault = 10,
50+
4851
};
49-
#define ArsdkFeatureAlarmsTypeCnt 10
52+
#define ArsdkFeatureAlarmsTypeCnt 11
5053

5154
/** takeoff readiness checks. */
5255
typedef NS_ENUM(NSInteger, ArsdkFeatureAlarmsTakeoffChecklistType) {

SdkCore.framework/Headers/ArsdkFeatureControllerInfo.h

Lines changed: 53 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,11 @@ typedef NS_ENUM(NSInteger, ArsdkFeatureControllerInfoSupportedCommand) {
3939
/** Gps v2 command is supported. */
4040
ArsdkFeatureControllerInfoSupportedCommandGpsV2 = 1,
4141

42+
/** Barometer v2 command is supported. */
43+
ArsdkFeatureControllerInfoSupportedCommandBarometerV2 = 2,
44+
4245
};
43-
#define ArsdkFeatureControllerInfoSupportedCommandCnt 2
46+
#define ArsdkFeatureControllerInfoSupportedCommandCnt 3
4447

4548
@interface ArsdkFeatureControllerInfoSupportedCommandBitField : NSObject
4649

@@ -94,6 +97,32 @@ typedef NS_ENUM(NSInteger, ArsdkFeatureControllerInfoAvailableData) {
9497

9598
@end
9699

100+
/** Available data for barometer. */
101+
typedef NS_ENUM(NSInteger, ArsdkFeatureControllerInfoBarometerAvailableData) {
102+
/**
103+
Unknown value from SdkCore.
104+
Only used if the received value cannot be matched with a declared value.
105+
This might occur when the drone or rc has a different sdk base from the controller.
106+
*/
107+
ArsdkFeatureControllerInfoBarometerAvailableDataSdkCoreUnknown = -1,
108+
109+
/** Atmospheric pressure in Pa. */
110+
ArsdkFeatureControllerInfoBarometerAvailableDataPressure = 0,
111+
112+
/** Barometer sensor temperature in Kelvin. */
113+
ArsdkFeatureControllerInfoBarometerAvailableDataTemperature = 1,
114+
115+
};
116+
#define ArsdkFeatureControllerInfoBarometerAvailableDataCnt 2
117+
118+
@interface ArsdkFeatureControllerInfoBarometerAvailableDataBitField : NSObject
119+
120+
+ (BOOL)isSet:(ArsdkFeatureControllerInfoBarometerAvailableData)val inBitField:(NSUInteger)bitfield;
121+
122+
+ (void)forAllSetIn:(NSUInteger)bitfield execute:(void (NS_NOESCAPE ^)(ArsdkFeatureControllerInfoBarometerAvailableData val))cb;
123+
124+
@end
125+
97126
@protocol ArsdkFeatureControllerInfoCallback<NSObject>
98127

99128
@optional
@@ -194,5 +223,28 @@ NS_SWIFT_NAME(gpsV2Encoder(source:latitude:longitude:amslAltitude:wgs84Altitude:
194223
+ (int (^)(struct arsdk_cmd *))magnetoTemperatureEncoder:(float)temp
195224
NS_SWIFT_NAME(magnetoTemperatureEncoder(temp:));
196225

226+
/**
227+
Barometer available data.
228+
229+
- parameter source: Barometer data source.
230+
- parameter available_data: Available data.
231+
- returns: a block that encodes the command
232+
*/
233+
+ (int (^)(struct arsdk_cmd *))barometerV2AvailableDataEncoder:(ArsdkFeatureControllerInfoSource)source availableDataBitField:(NSUInteger)availableDataBitField
234+
NS_SWIFT_NAME(barometerV2AvailableDataEncoder(source:availableDataBitField:));
235+
236+
/**
237+
238+
239+
- parameter source: Barometer data source.
240+
- parameter pressure: Atmospheric pressure in Pa
241+
- parameter temperature: Barometer sensor temperature in Kelvin. This field is only used when source is "main" or "auxiliary"
242+
- parameter timestamp: Timestamp of the barometer info (in milliseconds), from a monotonic clock (not necessarily linked to utc
243+
clock)
244+
- returns: a block that encodes the command
245+
*/
246+
+ (int (^)(struct arsdk_cmd *))barometerV2Encoder:(ArsdkFeatureControllerInfoSource)source pressure:(float)pressure temperature:(float)temperature timestamp:(uint64_t)timestamp
247+
NS_SWIFT_NAME(barometerV2Encoder(source:pressure:temperature:timestamp:));
248+
197249
@end
198250

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (C) 2020 Parrot Drones SAS
1+
// Copyright (C) 2023 Parrot Drones SAS
22
//
33
// Redistribution and use in source and binary forms, with or without
44
// modification, are permitted provided that the following conditions
@@ -28,34 +28,11 @@
2828
// SUCH DAMAGE.
2929

3030
#import <Foundation/Foundation.h>
31-
32-
/** Event logger. */
33-
@interface SdkCoreEventLogger: NSObject
34-
35-
36-
/**
37-
Starts the logger.
38-
39-
@param directory: directory where event logs will be recorded
40-
@param properties: properties to add in header
41-
*/
42-
- (void)start:(nonnull NSString *)directory properties:(nonnull NSDictionary *)properties;
43-
44-
/**
45-
Logs a message.
46-
47-
@param message: message to be logged
48-
*/
49-
- (void)log:(nonnull NSString *)message;
50-
51-
/**
52-
Stops the logger.
53-
*/
54-
- (void)stop;
31+
#import "LogBinRecorderConfig.h"
5532

5633
/**
57-
Closes current event log session and starts a new one, creating a new log file.
34+
Event log file recorder configuration.
5835
*/
59-
- (void)newSession;
36+
@interface LogEventRecorderConfig: LogBinRecorderConfig
6037

6138
@end

SdkCore.framework/Headers/Logger.h

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
#import <Foundation/Foundation.h>
3131
#import "LogBinRecorderConfig.h"
3232
#import "LogTxtRecorderConfig.h"
33+
#import "LogEventRecorderConfig.h"
3334

3435
typedef NS_ENUM(NSInteger, Level) {
3536
LOG_CRIT = 2, /* critical conditions */
@@ -73,6 +74,20 @@ typedef NS_ENUM(NSInteger, Level) {
7374

7475
@end
7576

77+
/** Provides control over a event log recorder instance. */
78+
@protocol EventLogRecorder <RotatingLogRecorder>
79+
80+
/**
81+
Updates a header property.
82+
83+
@param key: key
84+
@param value: value
85+
*/
86+
- (void)updateProperty:(nonnull NSString *)key value:(nonnull NSString *)value
87+
NS_SWIFT_NAME(updateProperty(key:value:));
88+
89+
@end
90+
7691
/** Common logger based on ulog, using. */
7792
@interface ULog : NSObject
7893

@@ -107,6 +122,20 @@ NS_SWIFT_NAME(redirectToSystemLog(enabled:));
107122
+ (nullable id<RotatingLogRecorder>)redirectToLogTxt:(nonnull LogTxtRecorderConfig *)config
108123
NS_SWIFT_NAME(redirectToLogTxt(config:));
109124

125+
/**
126+
Enables redirecting log messages to event binary file `.bin` recorder.
127+
128+
@param config log recorder configuration
129+
@param roProperties: custom read only header properties
130+
@param rwProperties: custom read write header properties
131+
132+
@return a new LogEventRecorder instance, that allows to control the log recording.
133+
*/
134+
+ (nullable id<EventLogRecorder>)redirectToLogEvent:(nonnull LogEventRecorderConfig *)config
135+
roProperties:(nullable NSDictionary<NSString*, NSString*> *)roProperties
136+
rwProperties:(nullable NSDictionary<NSString*, NSString*> *)rwProperties
137+
NS_SWIFT_NAME(redirectToLogEvent(config:roProperties:rwProperties:));
138+
110139
/**
111140
Send a critical log.
112141

SdkCore.framework/Headers/SdkCoreRenderer.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,13 @@ typedef NS_ENUM(NSInteger, SdkCoreStreamRenderingFillMode) {
4949
*/
5050
@protocol SdkCoreRendererListener <NSObject>
5151

52+
/**
53+
Called when the preferred display framerate should change.
54+
55+
@param fps: the preferred count of frames per second
56+
*/
57+
- (void)onPreferredFpsChanged:(float)fps;
58+
5259
/**
5360
Called when the native renderer is ready to render a frame.
5461
*/

SdkCore.framework/Info.plist

-1 Bytes
Binary file not shown.

SdkCore.framework/SdkCore

-20.9 MB
Binary file not shown.

SdkCore.framework/cmd-res.tar.gz

1.96 KB
Binary file not shown.

0 commit comments

Comments
 (0)