|
|
|
@ -298,6 +298,7 @@ public class ConfigSubscribe : IJob
|
|
|
|
|
int offset = 0, length = 0;
|
|
|
|
|
string model = "";
|
|
|
|
|
float? gimbalRoll= 0, gimbalPitch=0;
|
|
|
|
|
float? digitalZoomRatio = 1;
|
|
|
|
|
var fileUrl = "http://" + _minioService.endPoint + "/" + _minioService._bucketName +
|
|
|
|
|
"/" + objectKey;
|
|
|
|
|
using (var httpClient = new HttpClient())
|
|
|
|
@ -335,10 +336,14 @@ public class ConfigSubscribe : IJob
|
|
|
|
|
{
|
|
|
|
|
switch (keyValuePair.Key)
|
|
|
|
|
{
|
|
|
|
|
case "GimbalPitchDegree":
|
|
|
|
|
// // drone-dji:GimbalPitchDegree: -90.00
|
|
|
|
|
//drone-dji:GimbalReverse: 0
|
|
|
|
|
//drone-dji:GimbalRollDegree: +180.00
|
|
|
|
|
//drone-dji:GimbalYawDegree: -96.40
|
|
|
|
|
case "drone-dji:GimbalPitchDegree":
|
|
|
|
|
gimbalPitch = float.Parse(keyValuePair.Value);
|
|
|
|
|
break;
|
|
|
|
|
case "GimbalRollDegree":
|
|
|
|
|
case "drone-dji:GimbalRollDegree":
|
|
|
|
|
gimbalRoll = float.Parse(keyValuePair.Value);
|
|
|
|
|
break;
|
|
|
|
|
}
|
|
|
|
@ -349,6 +354,7 @@ public class ConfigSubscribe : IJob
|
|
|
|
|
{
|
|
|
|
|
if (directory is ExifDirectoryBase)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
if (directory.Name.Equals("Exif IFD0"))
|
|
|
|
|
{
|
|
|
|
|
foreach (var tag in directory.Tags)
|
|
|
|
@ -362,8 +368,13 @@ public class ConfigSubscribe : IJob
|
|
|
|
|
|
|
|
|
|
if (directory.Name.Equals("Exif SubIFD"))
|
|
|
|
|
{
|
|
|
|
|
// Digital Zoom Ratio: 1 Exif SubIFD
|
|
|
|
|
foreach (var tag in directory.Tags)
|
|
|
|
|
{
|
|
|
|
|
if (tag.Name.Equals("Digital Zoom Ratio"))
|
|
|
|
|
{
|
|
|
|
|
digitalZoomRatio = float.Parse(tag.Description);
|
|
|
|
|
}
|
|
|
|
|
if (tag.Name.Equals("Exif Image Width"))
|
|
|
|
|
{
|
|
|
|
|
width = int.Parse(tag.Description.Replace("pixels", "")
|
|
|
|
@ -468,7 +479,8 @@ public class ConfigSubscribe : IJob
|
|
|
|
|
PayloadModelName = model,
|
|
|
|
|
Type = type,
|
|
|
|
|
GimbalPitchDegree = gimbalPitch,
|
|
|
|
|
GimbalRollDegree = gimbalRoll
|
|
|
|
|
GimbalRollDegree = gimbalRoll,
|
|
|
|
|
DigitalZoomRatio = digitalZoomRatio
|
|
|
|
|
};
|
|
|
|
|
// 添加事务
|
|
|
|
|
await _sqlSugarClient.Insertable(fileUpload).ExecuteCommandAsync();
|
|
|
|
|