Comments (2)
Hi Blackoverflow, thank you for your feedback. I will improve this in future releases
from kaltracker.
I think it is realy a bug, some items add kcal some kj. I have investigated the openfood api and we can filter out the kcal numbers to compute right. I think it musst be here :
qml/components/IsProductFoundDialog.qml
{
var _json = openFoodFactJSON.model.get(0);
if (typeof _json !== "undefined" && typeof _json.product_name !== "undefined" ) {
logical_fields.ingestion.product_name = _json.product_name
logical_fields.ingestion.nutriscore = (typeof _json.nutriscore_grade == "undefined") ? "a" : _json.nutriscore_grade
logical_fields.ingestion.cal = (typeof _json.nutriments.energy_value == "undefined") ? 0 : _json.nutriments.energy_value
logical_fields.ingestion.fat = (typeof _json.nutriments.fat_100g == "undefined") ? 0.0 : _json.nutriments.fat_100g
logical_fields.ingestion.protein = (typeof _json.nutriments.proteins_100g == "undefined") ? 0.0 : _json.nutriments.proteins_100g
logical_fields.ingestion.carbo = (typeof _json.nutriments.carbohydrates_100g == "undefined") ? 0.0 : _json.nutriments.carbohydrates_100g
logical_fields.ingestion.nova_groups = (typeof _json.nova_groups == "undefined") ? "0" : _json.nova_groups
next_button.enabled = true
loading_circle.running = false
loading_circle.visible = false
}else{
loading_circle.running = false
loading_circle.visible = false
enter_manually.visible = true
is_code_empty = true
}
}
}
the _json.nutriments.energy_value
to not contain kcal consistently so we can use energy-kcal , energy-kcal_100g that holds the needed kcal value. but i do not know right now how to extract it from _json.nutriments.
from kaltracker.
Related Issues (20)
- Wrong color in Slots during Profile Config
- missing property on ExportData Page
- ubuntushape has wrong color in updateUserValuesPage
- Migration For Focal a.k.a UT 20.04
- New UX for profileCreation
- Create a Component For Kaltracker Background
- Add Animation To CaloriesChart
- Description of Activity Level Missing
- Remove unnecessary logs after ingestion & water
- Increase Radius
- Add MouseArea to Circle Instead of Icon in SlotAddMeal & SlotWaterTracker
- Parse Error
- App is asking for navigation_shape
- UpdateUserTable Still Has Reference to utFoods DB
- Scanning Products With 4 Grade at NOVA Group Returns 'Unkwon'
- OperationResultPopOver Incorrect Color On --dark-mode
- Possibility to add target calories manually
- Type Error: Cannot read property 'objectName' of null HOT 1
- QuickListFoods Show Empty State If ModelCount Is Empty
- Add smaller portions
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kaltracker.