--From DWIN Developer Forum
In hac re urgemus consideracionem conciliandi fons aperta causa DWIN Developer Forum - Multi-munus ponderatoris. Ingeniarius in 4-unc COF tegumentum captiosus utitur, et per commercium inter T5L OS core et HX711 moduli et 5kg pressionis sensorem institutum adoptat, utentes facile percipere possunt functiones ostensionis ostentationis ut pondus, unitas pretium, pretium totalis, tare, etc. ., necnon functiones numerandi, sequi ponderis, curvarum mutationum, ac perspicacitatis accurationis correctionem, etc., ut facile est inter varias applicationes missionum versari ut experientia opportuna et efficax perpendentia fruatur.
1. III Development
![f26af533d43728cd210e0f7af5e7acc](https://ecdn6.globalso.com/upload/p/1355/source/2024-06/665f077223d2b27894.png)
2.C51 Design
Pars relationis codicem ponderator ad functionem pretium cursus efficiendam talis est:
// Pricing Page=====================
#definire VALUATION_UNIT_PRICE_ADDR 0x1010
#definire VALUATION_GRAM_ADDR 0x1000
#definire VALUATION_TOTAL_PRICES_ADDR 0x1020
uint32_t valuation_decorticate = 0; // Pricing Tare Weight
uint32_t valuation_unit_price = 0; //Unitas pretium
// Unit Price Renovare
inanis paginae_valuation_unit_price_refresh()
{
uint8_t test_display[10] = {0};
si (valuation_unit_price
{
test_display[0] = aestimatio_unit_price / 100 % 10 + 0x30;
test_display [1] = '.';
test_display[2] = valuation_unit_price / 10 % 10 + 0x30;
test_display[3] = valuation_unit_price / 1 % 10 + 0x30;
dgus_show_text_value_set(VALUATION_UNIT_PRICE_ADDR, test_display, 4);
}
aliud si (valuation_unit_price
{
test_display[0] = aestimatio_unit_price / 1000 % 10 + 0x30;
test_display[1] = valuation_unit_price / 100 % 10 + 0x30;
test_display[2] = '.';
test_display[3] = valuation_unit_price / 10 % 10 + 0x30;
test_display[4] = valuation_unit_price / 1 % 10 + 0x30;
dgus_show_text_value_set(VALUATION_UNIT_PRICE_ADDR, test_display, 4);
}
aliud si (valuation_unit_price
{
test_display[0] = valuation_unit_price / 10000 % 10 + 0x30;
test_display[1] = valuation_unit_price / 1000 % 10 + 0x30;
test_display[2] = valuation_unit_price / 100 % 10 + 0x30;
test_display[3] = '.';
test_display[4] = valuation_unit_price / 10 % 10 + 0x30;
test_display[5] = valuation_unit_price / 1 % 10 + 0x30;
dgus_show_text_value_set(VALUATION_UNIT_PRICE_ADDR, test_display, 4);
}
aliud si (valuation_unit_price
{
test_display[0] = valuation_unit_price / 100000 % 10 + 0x30;
test_display[1] = valuation_unit_price / 10000 % 10 + 0x30;
test_display[2] = valuation_unit_price / 1000 % 10 + 0x30;
test_display[3] = valuation_unit_price / 100 % 10 + 0x30;
test_display[4] = '.';
test_display[5] = aestimatio_unit_price / 10 % 10 + 0x30;
test_display[6] = valuation_unit_price / 1 % 10 + 0x30;
dgus_show_text_value_set(VALUATION_UNIT_PRICE_ADDR, test_display, 4);
}
}
// Pondus Renovare
inanis page_valuation_weight_refresh()
{
uint8_t test_display[10] = {0x30};
uint32_t gram_display = 0;
si (gram_value> = valuation_decorticate)
{
gram_display = gram_value - valuation_decorticate;
si (gram_display
{
test_display[0] = gram_display / 1 % 10 + 0x30;
dgus_show_text_value_set(VALUATION_GRAM_ADDR, test_display, 3);
}
aut si (gram_display
{
test_display[0] = gram_display / 10 % 10 + 0x30;
test_display[1] = gram_display / 1 % 10 + 0x30;
dgus_show_text_value_set(VALUATION_GRAM_ADDR, test_display, 3);
}
aut si (gram_display
{
test_display[0] = gram_display / 100 % 10 + 0x30;
test_display[1] = gram_display / 10 % 10 + 0x30;
test_display[2] = gram_display / 1 % 10 + 0x30;
dgus_show_text_value_set(VALUATION_GRAM_ADDR, test_display, 3);
}
aut si (gram_display
{
test_display[0] = gram_display / 1000 % 10 + 0x30;
test_display[1] = gram_display / 100 % 10 + 0x30;
test_display[2] = gram_display / 10 % 10 + 0x30;
test_display[3] = gram_display / 1 % 10 + 0x30;
dgus_show_text_value_set(VALUATION_GRAM_ADDR, test_display, 3);
}
aut si (gram_display
{
test_display[0] = gram_display / 10000 % 10 + 0x30;
test_display[1] = gram_display / 1000 % 10 + 0x30;
test_display[2] = gram_display / 100 % 10 + 0x30;
test_display[3] = gram_display / 10 % 10 + 0x30;
test_display[4] = gram_display / 1 % 10 + 0x30;
dgus_show_text_value_set(VALUATION_GRAM_ADDR, test_display, 3);
}
}
aliud
{
dgus_show_text_value_set(VALUATION_GRAM_ADDR, test_display, 3);
}
}
// Total Price Renovare
inanis page_valuation_price_renovare()
{
uint32_t price_value = 0;
uint8_t test_display[10] = {0x30, '.', 0x30, 0x30};
si (gram_value> = valuation_decorticate)
{
pretium = valorem = valorem * valorem * 2 / 1000 ;
si (price_value
{
test_display[0] = price_value/100 % 10 + 0x30;
test_display [1] = '.';
test_display[2] = price_value / 10 % 10 + 0x30;
test_display[3] = price_value / 1 % 10 + 0x30;
dgus_show_text_value_set(VALUATION_TOTAL_PRICES_ADDR, test_display, 4);
}
aliud si (price_value
{
test_display[0] = price_value / 1000 % 10 + 0x30;
test_display[1] = price_value / 100 % 10 + 0x30;
test_display[2] = '.';
test_display[3] = price_value / 10 % 10 + 0x30;
test_display[4] = price_value / 1 % 10 + 0x30;
dgus_show_text_value_set(VALUATION_TOTAL_PRICES_ADDR, test_display, 4);
}
aliud si (price_value
{
test_display[0] = price_value / 10000 % 10 + 0x30;
test_display[1] = price_value / 1000 % 10 + 0x30;
test_display[2] = price_value / 100 % 10 + 0x30;
test_display[3] = '.';
test_display[4] = price_value / 10 % 10 + 0x30;
test_display[5] = price_value / 1 % 10 + 0x30;
dgus_show_text_value_set(VALUATION_TOTAL_PRICES_ADDR, test_display, 4);
}
aliud si (price_value
{
test_display[0] = price_value / 10000 % 10 + 0x30;
test_display[1] = price_value / 10000 % 10 + 0x30;
test_display[2] = price_value / 1000 % 10 + 0x30;
test_display[3] = price_value/100 % 10 + 0x30;
test_display[4] = '.';
test_display[5] = price_value / 10 % 10 + 0x30;
test_display[6] = price_value / 1 % 10 + 0x30;
dgus_show_text_value_set(VALUATION_TOTAL_PRICES_ADDR, test_display, 4);
}
}
aliud
{
dgus_show_text_value_set(VALUATION_TOTAL_PRICES_ADDR, test_display, 4);
}
}
inanis page_valuation_decorticate()
{
valuation_decorticate = gram_value;
page_valuation_weight_renovare();
}
inanis pagina_valuation_1()
{
si (valuation_unit_price
{
precium = valuation_unit_price * 10 + 1 ;
page_valuation_unit_price_refresh();
}
}
inanis pagina_valuation_2()
{
si (valuation_unit_price
{
precium = valuation_unit_price 10 + 2;
page_valuation_unit_price_refresh();
}
}
inanis page_valuation_3()
{
si (valuation_unit_price
{
precium = valuation_unit_price 10 + 3;
page_valuation_unit_price_refresh();
}
}
inanis pagina_valuation_4()
{
si (valuation_unit_price
{
precium = valuation_unit_price * 10 + 4 ;
page_valuation_unit_price_refresh();
}
}
inanis pagina_valuation_5()
{
si (valuation_unit_price
{
appretiatio, pretii 10 + 5;
page_valuation_unit_price_refresh();
}
}
inanis pagina_valuation_6()
{
si (valuation_unit_price
{
appretiatio, precium 10 + 6;
page_valuation_unit_price_refresh();
}
}
inanis pagina_valuation_7()
{
si (valuation_unit_price
{
precium 10 + 7;
page_valuation_unit_price_refresh();
}
}
inanis pagina_valuation_8()
{
si (valuation_unit_price
{
precium = valuation_unit_price 10 + 8;
page_valuation_unit_price_refresh();
}
}
inanis pagina_valuation_9()
{
si (valuation_unit_price
{
precium = valuation_unit_price 10 + 9;
page_valuation_unit_price_refresh();
}
}
inanis pagina_valuation_0()
{
si (valuation_unit_price
{
appretiatio pretii 10 + 0;
page_valuation_unit_price_refresh();
}
}
inanis page_valuation_back()
{
precium = valorem / 10;
page_valuation_unit_price_refresh();
}
inanis page_valuation_clear()
{
valorem_ = 0;
page_valuation_unit_price_refresh();
}
Post tempus: Apr-28-2024