From 01ac08186355e85cab4a7c6f4403180184894f23 Mon Sep 17 00:00:00 2001
From: riku <risaku@163.com>
Date: 星期六, 09 十月 2021 14:38:44 +0800
Subject: [PATCH] 1. 新增网格化数据统计功能

---
 src/main/kotlin/com/flightfeather/uav/model/epw/EPWDataPrep.kt |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/main/kotlin/com/flightfeather/uav/model/epw/EPWDataPrep.kt b/src/main/kotlin/com/flightfeather/uav/model/epw/EPWDataPrep.kt
index 3f23d11..5da6409 100644
--- a/src/main/kotlin/com/flightfeather/uav/model/epw/EPWDataPrep.kt
+++ b/src/main/kotlin/com/flightfeather/uav/model/epw/EPWDataPrep.kt
@@ -86,7 +86,8 @@
         }
 
         lastData.clear()
-        mDataList.subList(mDataList.lastIndex - ncal + 1, mDataList.lastIndex + 1).forEach {
+        val s = if ((mDataList.lastIndex - ncal + 1) < 0) 0 else mDataList.lastIndex - ncal + 1
+        mDataList.subList(s, mDataList.lastIndex + 1).forEach {
             lastData.add(it.copy())
         }
 

--
Gitblit v1.9.3